diff --git a/build.gradle b/build.gradle index 61e98e720..6272797a9 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { classpath 'com.google.code.gson:gson:2.8.1' - classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.142' + classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.147' classpath 'net.sf.proguard:proguard-gradle:6.1.0beta2' classpath 'org.ajoberstar.grgit:grgit-gradle:3.0.0' } diff --git a/gradle.properties b/gradle.properties index b46b21df2..fb120bd3a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,5 +3,5 @@ mod_version=1.84.1 # Minecraft properties mc_version=1.14.4 -forge_version=28.1.1 +forge_version=28.1.26 mappings_version=20190912-1.14.3 diff --git a/src/main/java/dan200/computercraft/shared/turtle/FurnaceRefuelHandler.java b/src/main/java/dan200/computercraft/shared/turtle/FurnaceRefuelHandler.java index 9c407c9b5..a62482988 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/FurnaceRefuelHandler.java +++ b/src/main/java/dan200/computercraft/shared/turtle/FurnaceRefuelHandler.java @@ -12,8 +12,7 @@ import dan200.computercraft.api.turtle.event.TurtleRefuelEvent; import dan200.computercraft.shared.util.InventoryUtil; import dan200.computercraft.shared.util.WorldUtil; import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.FurnaceTileEntity; -import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -52,15 +51,9 @@ public final class FurnaceRefuelHandler implements TurtleRefuelEvent.Handler return fuelToGive; } - private static int getFuelPerItem( @Nonnull ItemStack stack ) { - int basicBurnTime = stack.getBurnTime(); - int burnTime = ForgeEventFactory.getItemBurnTime( - stack, - basicBurnTime == -1 ? FurnaceTileEntity.getBurnTimes().getOrDefault( stack.getItem(), 0 ) : basicBurnTime - ); - return (burnTime * 5) / 100; + return (ForgeHooks.getBurnTime( stack ) * 5) / 100; } @SubscribeEvent