Skip to content

Commit

Permalink
Increase Fuel Efficiency of Large Boilers 10x
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Nov 14, 2024
1 parent 08eb5b0 commit 3509e88
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.nomiceu.nomilabs.mixin.gregtech;

import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityFurnace;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import gregtech.api.capability.impl.BoilerRecipeLogic;

/**
* Makes fuels last 10x as long in large boilers, to fix fuel efficiency disparity between it and small boilers.
*/
@Mixin(value = BoilerRecipeLogic.class, remap = false)
public class BoilerRecipeLogicMixin {

@Redirect(method = "trySearchNewRecipe",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/tileentity/TileEntityFurnace;getItemBurnTime(Lnet/minecraft/item/ItemStack;)I",
remap = true))
private int increaseFuelBurnTime(ItemStack itemStack) {
return TileEntityFurnace.getItemBurnTime(itemStack) * 10;
}
}
1 change: 1 addition & 0 deletions src/main/resources/mixins.nomilabs.gregtech.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"AccessibleDecompositionRecipeHandler",
"AccessibleMaterialInfo",
"AccessibleModHandler",
"BoilerRecipeLogicMixin",
"FluidStorageKeyAccessor",
"FluidStorageKeysMixin",
"GTRecipeInputMixin",
Expand Down

0 comments on commit 3509e88

Please sign in to comment.