From c9e087b51616fdcb5b42652b085fc8fcb3482849 Mon Sep 17 00:00:00 2001 From: cech12 Date: Mon, 29 May 2023 10:01:16 +0200 Subject: [PATCH] re-add Immersive Engineering 1.19.4-9.4.0+ support --- CHANGELOG.md | 6 ++++++ build.gradle | 4 ++-- gradle.properties | 8 ++++---- .../java/cech12/brickfurnace/compat/EventHandler.java | 8 ++++---- .../immersiveengineering/BrickFurnaceHeater.java | 10 +++++----- .../immersiveengineering/ImmersiveEngineering.java | 3 +-- src/main/resources/META-INF/mods.toml | 6 +++--- 7 files changed, 25 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d0452..0762a8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/). +## [1.19.4-1.10.1.0] - 2023-05-29 +### Changed +- Update mod to Forge 1.19.4-45.0.59 +- Update compat with JEI to 1.19.4-13.1.0.9 +- re-add Immersive Engineering 1.19.4-9.4.0+ support + ## [1.19.4-1.10.0.0] - 2023-04-04 ### Changed - Update mod to Forge 1.19.4-45.0.40 diff --git a/build.gradle b/build.gradle index 4413e3c..df4146d 100644 --- a/build.gradle +++ b/build.gradle @@ -138,8 +138,8 @@ dependencies { implementation fg.deobf("mcjty.theoneprobe:theoneprobe:$top_version") {transitive = false} //Immersive Engineering - //runtimeOnly fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}") - //compileOnly fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}:api") + runtimeOnly fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}") + compileOnly fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}:api") } // Example for how to get properties into the manifest for reading by the runtime.. diff --git a/gradle.properties b/gradle.properties index b19ce97..959dcd3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,15 +4,15 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false mod_id=brickfurnace -mod_version=1.10.0.0 +mod_version=1.10.1.0 minecraft_version=1.19.4 -forge_version=45.0.40 +forge_version=45.0.59 # jei -jei_version=13.0.0.1 +jei_version=13.1.0.9 #the one probe top_version=1.19.4-8.0.0-1 # immersive engineering -#immersive_engineering_version=1.19.3-9.2.0-160 +immersive_engineering_version=1.19.4-9.4.0-166.1 diff --git a/src/main/java/cech12/brickfurnace/compat/EventHandler.java b/src/main/java/cech12/brickfurnace/compat/EventHandler.java index 98cc7b4..80136ba 100644 --- a/src/main/java/cech12/brickfurnace/compat/EventHandler.java +++ b/src/main/java/cech12/brickfurnace/compat/EventHandler.java @@ -1,6 +1,6 @@ package cech12.brickfurnace.compat; -//import cech12.brickfurnace.compat.immersiveengineering.ImmersiveEngineering; +import cech12.brickfurnace.compat.immersiveengineering.ImmersiveEngineering; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.event.AttachCapabilitiesEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -14,9 +14,9 @@ public class EventHandler { @SubscribeEvent public static void onCapabilitiesAttachBlockEntity(AttachCapabilitiesEvent event) { - //if (ModList.get().isLoaded("immersiveengineering")) { - // ImmersiveEngineering.onCapabilitiesAttachBlockEntity(event); - //} + if (ModList.get().isLoaded("immersiveengineering")) { + ImmersiveEngineering.onCapabilitiesAttachBlockEntity(event); + } } } diff --git a/src/main/java/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java b/src/main/java/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java index cf47c28..a0bec1b 100644 --- a/src/main/java/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java +++ b/src/main/java/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java @@ -1,8 +1,9 @@ package cech12.brickfurnace.compat.immersiveengineering; -/* + import blusunrize.immersiveengineering.api.tool.ExternalHeaterHandler; import cech12.brickfurnace.blockentity.AbstractBrickFurnaceBlockEntity; import cech12.brickfurnace.blockentity.BrickFurnaceBlockEntity; +import net.minecraft.core.RegistryAccess; import net.minecraft.world.inventory.ContainerData; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.AbstractCookingRecipe; @@ -20,12 +21,12 @@ public BrickFurnaceHeater(BrickFurnaceBlockEntity furnace) { this.furnace = furnace; } - boolean canCook() { + boolean canCook(RegistryAccess registryAccess) { ItemStack input = furnace.getItem(AbstractBrickFurnaceBlockEntity.INPUT); if (input.isEmpty()) return false; AbstractCookingRecipe recipe = furnace.getRecipe(); if (recipe == null) return false; - ItemStack outStack = recipe.getResultItem(); + ItemStack outStack = recipe.getResultItem(registryAccess); if (outStack.isEmpty()) return false; ItemStack existingOutput = furnace.getItem(2); if (existingOutput.isEmpty()) return true; @@ -39,7 +40,7 @@ public int doHeatTick(int energyAvailable, boolean redstone) { long now = furnace.getLevel().getGameTime(); if (now < blockedUntilGameTime) return 0; int energyConsumed = 0; - boolean canCook = canCook(); + boolean canCook = canCook(furnace.getLevel().registryAccess()); if (canCook || redstone) { ContainerData furnaceData = furnace.getContainerData(); int burnTime = furnaceData.get(DATA_LIT_TIME); @@ -81,4 +82,3 @@ public void setFurnaceActive() { } } } - */ diff --git a/src/main/java/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java b/src/main/java/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java index c28638c..682c746 100644 --- a/src/main/java/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java +++ b/src/main/java/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java @@ -1,5 +1,5 @@ package cech12.brickfurnace.compat.immersiveengineering; -/* + import blusunrize.immersiveengineering.api.tool.ExternalHeaterHandler; import blusunrize.immersiveengineering.api.utils.CapabilityUtils; import cech12.brickfurnace.BrickFurnaceMod; @@ -42,4 +42,3 @@ public LazyOptional getCapability(@Nonnull Capability cap, @Nullabl } } - */ diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 84ff63f..5080a7f 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -15,7 +15,7 @@ license="The MIT License (MIT)" [[dependencies.brickfurnace]] modId="forge" mandatory=true - versionRange="[45.0.40,)" + versionRange="[45.0.59,)" ordering="NONE" side="BOTH" [[dependencies.brickfurnace]] @@ -27,7 +27,7 @@ license="The MIT License (MIT)" [[dependencies.brickfurnace]] modId="jei" mandatory=false - versionRange="[13.0.0.1,)" + versionRange="[13.1.0.9,)" referralUrl="https://github.com/mezz/JustEnoughItems" ordering="NONE" side="BOTH" @@ -41,7 +41,7 @@ license="The MIT License (MIT)" [[dependencies.brickfurnace]] modId="immersiveengineering" mandatory=false - versionRange="[1.19.3-9.2.0,)" + versionRange="[1.19.4-9.4.0,)" referralUrl="https://github.com/BluSunrize/ImmersiveEngineering" ordering="NONE" side="BOTH" \ No newline at end of file