-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase Fuel Efficiency of Large Boilers 10x
- Loading branch information
1 parent
08eb5b0
commit 3509e88
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/com/nomiceu/nomilabs/mixin/gregtech/BoilerRecipeLogicMixin.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 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; | ||
} | ||
} |
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