From c24afc34d5953288004e2670894b4289e5f0a94c Mon Sep 17 00:00:00 2001 From: Integer Limit <103940576+IntegerLimit@users.noreply.github.com> Date: Thu, 14 Nov 2024 21:20:52 +1100 Subject: [PATCH] Update Tooltips for Large Boilers --- .../MetaTileEntityLargeBoilerMixin.java | 18 ++++++++++++++++++ .../resources/mixins.nomilabs.gregtech.json | 1 + 2 files changed, 19 insertions(+) create mode 100644 src/main/java/com/nomiceu/nomilabs/mixin/gregtech/MetaTileEntityLargeBoilerMixin.java diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/gregtech/MetaTileEntityLargeBoilerMixin.java b/src/main/java/com/nomiceu/nomilabs/mixin/gregtech/MetaTileEntityLargeBoilerMixin.java new file mode 100644 index 0000000..5f447cf --- /dev/null +++ b/src/main/java/com/nomiceu/nomilabs/mixin/gregtech/MetaTileEntityLargeBoilerMixin.java @@ -0,0 +1,18 @@ +package com.nomiceu.nomilabs.mixin.gregtech; + +import gregtech.common.metatileentities.multi.BoilerType; +import gregtech.common.metatileentities.multi.MetaTileEntityLargeBoiler; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +/** + * Updates Tooltips for the 10x Fuel Efficiency Increase in {@link BoilerRecipeLogicMixin}. + */ +@Mixin(value = MetaTileEntityLargeBoiler.class, remap = false) +public class MetaTileEntityLargeBoilerMixin { + @Redirect(method = "addInformation", at = @At(value = "INVOKE", target = "Lgregtech/common/metatileentities/multi/BoilerType;runtimeBoost(I)I", remap = false), remap = true) + private int getNewRuntimeBoost(BoilerType instance, int ticks) { + return instance.runtimeBoost(ticks * 10); + } +} diff --git a/src/main/resources/mixins.nomilabs.gregtech.json b/src/main/resources/mixins.nomilabs.gregtech.json index fbf5ec1..c9f1865 100644 --- a/src/main/resources/mixins.nomilabs.gregtech.json +++ b/src/main/resources/mixins.nomilabs.gregtech.json @@ -20,6 +20,7 @@ "MaterialRecipeHandlerMixin", "MaterialStackMixin", "MetaItemsMixin", + "MetaTileEntityLargeBoilerMixin", "MetaTileEntityMEStockingBusMixin", "MetaTileEntityMEStockingHatchMixin", "MetaTileEntityProcessingArrayMixin",