diff options
author | miozune <miozune@gmail.com> | 2023-12-04 06:26:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 22:26:09 +0100 |
commit | b6caaf255da083516286321155ef339b60a07393 (patch) | |
tree | 89416c1d29e63de37cb43295a81913de3c24e015 /src/main/java/gtPlusPlus/api/recipe/MillingFrontend.java | |
parent | 4ff3ef790f4e22cc80986258f13f8a8643fda0dc (diff) | |
download | GT5-Unofficial-b6caaf255da083516286321155ef339b60a07393.tar.gz GT5-Unofficial-b6caaf255da083516286321155ef339b60a07393.tar.bz2 GT5-Unofficial-b6caaf255da083516286321155ef339b60a07393.zip |
Migrate to new RecipeMap (#788)
* Remove reference to GTPP_Recipe itself
* Remove GTPP_Recipe_Map_Internal
* Move recipemaps to separated class
* Remove unused recipemaps
* Migrate GT++ recipemaps
Remove sElementalDuplicatorRecipes in favor of GT replicatorRecipes supporting findRecipe
* Migrate the rest
* Adjust catalyst priorities
* Add ABS non-alloy recipe category
* Remove s prefixes from recipemaps
* Adapt to GT_StreamUtil rename
* Adjust recipe catalysts
* Fix build
* update gradle+bs+deps
(cherry picked from commit 8b185c7a4d881d38580cc98456265ebb751b6d93)
* update deps
---------
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gtPlusPlus/api/recipe/MillingFrontend.java')
-rw-r--r-- | src/main/java/gtPlusPlus/api/recipe/MillingFrontend.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/main/java/gtPlusPlus/api/recipe/MillingFrontend.java b/src/main/java/gtPlusPlus/api/recipe/MillingFrontend.java new file mode 100644 index 0000000000..924dcf3a0e --- /dev/null +++ b/src/main/java/gtPlusPlus/api/recipe/MillingFrontend.java @@ -0,0 +1,46 @@ +package gtPlusPlus.api.recipe; + +import static net.minecraft.util.EnumChatFormatting.GRAY; + +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import net.minecraft.util.StatCollector; + +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.recipe.RecipeMapFrontend; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.nei.GT_NEI_DefaultHandler; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class MillingFrontend extends RecipeMapFrontend { + + public MillingFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super(uiPropertiesBuilder, neiPropertiesBuilder); + } + + @Override + protected List<String> handleNEIItemInputTooltip(List<String> currentTip, + GT_NEI_DefaultHandler.FixedPositionedStack pStack) { + if (ItemUtils.isMillingBall(pStack.item)) { + currentTip.add(GRAY + StatCollector.translateToLocal("gtpp.nei.milling.not_consumed")); + } else { + super.handleNEIItemInputTooltip(currentTip, pStack); + } + return currentTip; + } + + @Override + protected void drawNEIOverlayForInput(GT_NEI_DefaultHandler.FixedPositionedStack stack) { + if (ItemUtils.isMillingBall(stack.item)) { + drawNEIOverlayText("NC*", stack); + } else { + super.drawNEIOverlayForInput(stack); + } + } +} |