diff --git a/src/main/java/blusunrize/immersiveengineering/common/util/VanillaFurnaceHeater.java b/src/main/java/blusunrize/immersiveengineering/common/util/VanillaFurnaceHeater.java index b82b586ed4..2cdd2bfc8f 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/util/VanillaFurnaceHeater.java +++ b/src/main/java/blusunrize/immersiveengineering/common/util/VanillaFurnaceHeater.java @@ -6,7 +6,6 @@ import net.minecraft.world.inventory.ContainerData; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.AbstractCookingRecipe; -import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.block.AbstractFurnaceBlock; import net.minecraft.world.level.block.entity.FurnaceBlockEntity; import net.minecraft.world.level.block.state.BlockState; @@ -31,8 +30,7 @@ boolean canCook() ItemStack input = furnace.getItem(DATA_LIT_TIME); if(input.isEmpty()) return false; - RecipeType type = ((FurnaceTEAccess)furnace).getRecipeType(); - Optional output = furnace.getLevel().getRecipeManager().getRecipeFor(type, furnace, furnace.getLevel()); + Optional output = ((FurnaceTEAccess)furnace).getQuickCheck().getRecipeFor(furnace, furnace.getLevel()); if(output.isEmpty()) return false; ItemStack existingOutput = furnace.getItem(2); @@ -78,7 +76,7 @@ public int doHeatTick(int energyAvailable, boolean redstone) } } // Speed up once fully charged - if(canCook&&furnaceData.get(DATA_LIT_TIME) >= FULLY_HEATED_LIT_TIME&&furnaceData.get(DATA_COOKING_PROGRESS) < BURN_TIME_STANDARD-1) + if(canCook&&furnaceData.get(DATA_LIT_TIME) >= FULLY_HEATED_LIT_TIME&&furnaceData.get(DATA_COOKING_PROGRESS) < furnaceData.get(DATA_COOKING_TOTAL_TIME)-1) { int energyToUse = ExternalHeaterHandler.defaultFurnaceSpeedupCost; if(energyAvailable-energyConsumed > energyToUse) diff --git a/src/main/java/blusunrize/immersiveengineering/mixin/accessors/FurnaceTEAccess.java b/src/main/java/blusunrize/immersiveengineering/mixin/accessors/FurnaceTEAccess.java index 80c2adc18d..636dd5195d 100644 --- a/src/main/java/blusunrize/immersiveengineering/mixin/accessors/FurnaceTEAccess.java +++ b/src/main/java/blusunrize/immersiveengineering/mixin/accessors/FurnaceTEAccess.java @@ -9,9 +9,10 @@ package blusunrize.immersiveengineering.mixin.accessors; +import net.minecraft.world.Container; import net.minecraft.world.inventory.ContainerData; import net.minecraft.world.item.crafting.AbstractCookingRecipe; -import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.item.crafting.RecipeManager; import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; @@ -20,10 +21,9 @@ @Mixin(AbstractFurnaceBlockEntity.class) public interface FurnaceTEAccess { - // This is a Forge-added field in 1.19, so it does not need to be remapped - @Accessor(remap = false) + @Accessor @Final - RecipeType getRecipeType(); + RecipeManager.CachedCheck getQuickCheck(); @Accessor @Final