-
-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conversion chance to Orechid recipe displays
- Applies to Orechid, Orechid Ignem, and Marimorphosis. For the latter it also shows biome-specific chance, if different from base chance. - Implemented for JEI (XPlat), REI (Fabric), and EMI (Fabric), ensuring the displays look similar across mods and supporting REI's dark theme.
- Loading branch information
1 parent
9711bd0
commit 39fc60a
Showing
18 changed files
with
451 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Fabric/src/main/java/vazkii/botania/fabric/integration/emi/MarimorphosisEmiRecipe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package vazkii.botania.fabric.integration.emi; | ||
|
||
import dev.emi.emi.api.stack.EmiIngredient; | ||
|
||
import net.minecraft.network.chat.Component; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import vazkii.botania.client.integration.shared.OrechidUIHelper; | ||
import vazkii.botania.common.crafting.MarimorphosisRecipe; | ||
|
||
import java.util.stream.Stream; | ||
|
||
public class MarimorphosisEmiRecipe extends OrechidEmiRecipe { | ||
public MarimorphosisEmiRecipe( | ||
MarimorphosisRecipe recipe, | ||
EmiIngredient orechid) { | ||
super(BotaniaEmiPlugin.MARIMORPHOSIS, recipe, orechid); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
protected Stream<Component> getChanceTooltipComponents(double chance) { | ||
Stream<Component> genericChanceTooltipComponents = super.getChanceTooltipComponents(chance); | ||
Stream<Component> biomeChanceTooltipComponents = OrechidUIHelper.getBiomeChanceAndRatioTooltipComponents(chance, recipe); | ||
return Stream.concat(genericChanceTooltipComponents, biomeChanceTooltipComponents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Fabric/src/main/java/vazkii/botania/fabric/integration/rei/MarimorphosisREICategory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package vazkii.botania.fabric.integration.rei; | ||
|
||
import net.minecraft.network.chat.Component; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import vazkii.botania.api.recipe.OrechidRecipe; | ||
import vazkii.botania.client.integration.shared.OrechidUIHelper; | ||
import vazkii.botania.common.block.BotaniaFlowerBlocks; | ||
|
||
import java.util.stream.Stream; | ||
|
||
public class MarimorphosisREICategory extends OrechidREICategory { | ||
public MarimorphosisREICategory() { | ||
super(BotaniaREICategoryIdentifiers.MARIMORPHOSIS, BotaniaFlowerBlocks.marimorphosis); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
protected Stream<Component> getChanceTooltipComponents(double chance, OrechidRecipe recipe) { | ||
Stream<Component> genericChanceTooltipComponents = super.getChanceTooltipComponents(chance, recipe); | ||
Stream<Component> biomeChanceTooltipComponents = OrechidUIHelper.getBiomeChanceAndRatioTooltipComponents(chance, recipe); | ||
return Stream.concat(genericChanceTooltipComponents, biomeChanceTooltipComponents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.