From 03b51a5c230bc53d3a8aed4b96343b67001c9f17 Mon Sep 17 00:00:00 2001 From: cech12 Date: Sun, 27 Oct 2024 09:06:09 +0100 Subject: [PATCH] updated to Minecraft 1.21.1 (Fabric 0.105.0+1.21.1, Neoforge 21.1.62, Forge 52.0.21) - updated Cloth Config support (15.0.140) (Fabric/Quilt) - updated ModMenu support (11.0.2) (Fabric/Quilt) - updated JEI support (19.19.0.219) (Forge & NeoForge) - updated REI support (16.0.788) (Fabric/Quilt & NeoForge) - updated The One Probe support (1.21_neo-12.0.3) (NeoForge) - re-added Immersive Engineering (1.21.1-12.0.0) (NeoForge) - fixed JEI loading errors since 19.19.0.219 (all loaders) --- .github/workflows/cicd-workflow.yml | 6 --- CHANGELOG.md | 13 ++++++ .../jei/BrickBlastingCategory.java | 12 +----- .../jei/BrickSmeltingCategory.java | 12 +----- .../jei/BrickSmokingCategory.java | 12 +----- fabric/build.gradle | 2 +- .../cech12/brickfurnace/BrickFurnaceMod.java | 5 +-- gradle.properties | 40 +++++++++---------- neoforge/build.gradle | 6 +-- .../brickfurnace/compat/EventHandler.java | 7 ++-- .../BrickFurnaceHeater.java | 14 +++---- .../ImmersiveEngineering.java | 3 +- .../resources/META-INF/neoforge.mods.toml | 7 ++++ 13 files changed, 62 insertions(+), 77 deletions(-) diff --git a/.github/workflows/cicd-workflow.yml b/.github/workflows/cicd-workflow.yml index 4ede8f3..93ff17c 100644 --- a/.github/workflows/cicd-workflow.yml +++ b/.github/workflows/cicd-workflow.yml @@ -51,7 +51,6 @@ jobs: title-prefix: forge- curseforge-id: 363593 game-versions: | - 1.21 1.21.1 release-type: release loaders: | @@ -70,7 +69,6 @@ jobs: title-prefix: forge- modrinth-id: yzHyAUSI game-versions: | - 1.21 1.21.1 release-type: release loaders: | @@ -89,7 +87,6 @@ jobs: title-prefix: neoforge- curseforge-id: 363593 game-versions: | - 1.21 1.21.1 release-type: release loaders: | @@ -108,7 +105,6 @@ jobs: title-prefix: neoforge- modrinth-id: yzHyAUSI game-versions: | - 1.21 1.21.1 release-type: release loaders: | @@ -127,7 +123,6 @@ jobs: title-prefix: fabric- curseforge-id: 363593 game-versions: | - 1.21 1.21.1 release-type: release loaders: | @@ -147,7 +142,6 @@ jobs: title-prefix: fabric- modrinth-id: yzHyAUSI game-versions: | - 1.21 1.21.1 release-type: release loaders: | diff --git a/CHANGELOG.md b/CHANGELOG.md index a64ad9f..f269f2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ 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.21.1-4.2.0.0] - 2024-10-27 +### Changed +- updated to Minecraft 1.21.1 (Fabric 0.105.0+1.21.1, Neoforge 21.1.62, Forge 52.0.21) +- updated Cloth Config support (15.0.140) (Fabric/Quilt) +- updated ModMenu support (11.0.2) (Fabric/Quilt) +- updated JEI support (19.19.0.219) (Forge & NeoForge) +- updated REI support (16.0.788) (Fabric/Quilt & NeoForge) +- updated The One Probe support (1.21_neo-12.0.3) (NeoForge) +- re-added Immersive Engineering (1.21.1-12.0.0) (NeoForge) + +### Fixed +- fixed JEI loading errors since 19.19.0.219 (all loaders) + ## [1.21-4.1.1.0] - 2024-08-30 ### Changed - cook time factor config option is now a text field instead of a slider (thanks to NattoRiisa for the hint) #34 diff --git a/common/src/main/java/de/cech12/brickfurnace/jei/BrickBlastingCategory.java b/common/src/main/java/de/cech12/brickfurnace/jei/BrickBlastingCategory.java index 49c32d0..dd7cd99 100644 --- a/common/src/main/java/de/cech12/brickfurnace/jei/BrickBlastingCategory.java +++ b/common/src/main/java/de/cech12/brickfurnace/jei/BrickBlastingCategory.java @@ -8,19 +8,11 @@ import mezz.jei.library.plugins.vanilla.cooking.AbstractCookingCategory; import net.minecraft.world.item.crafting.RecipeHolder; -import javax.annotation.Nonnull; - public class BrickBlastingCategory extends AbstractCookingCategory { public BrickBlastingCategory(IGuiHelper guiHelper) { - super(guiHelper, Constants.BRICK_BLAST_FURNACE_BLOCK.get(), "gui.jei.category.blasting", (int) (100 * Services.CONFIG.getCookTimeFactor())); - } - - @Override - @Nonnull - public RecipeType> getRecipeType() { - Class> holderClass = (Class>) (Object) RecipeHolder.class; - return new RecipeType<>(Constants.id(Constants.BLASTING_NAME), holderClass); + super(guiHelper, new RecipeType<>(Constants.id(Constants.BLASTING_NAME), (Class>) (Object) RecipeHolder.class), + Constants.BRICK_BLAST_FURNACE_BLOCK.get(), "gui.jei.category.blasting", (int) (100 * Services.CONFIG.getCookTimeFactor())); } } diff --git a/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmeltingCategory.java b/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmeltingCategory.java index 5ea221d..719bd50 100644 --- a/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmeltingCategory.java +++ b/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmeltingCategory.java @@ -8,19 +8,11 @@ import mezz.jei.library.plugins.vanilla.cooking.AbstractCookingCategory; import net.minecraft.world.item.crafting.RecipeHolder; -import javax.annotation.Nonnull; - public class BrickSmeltingCategory extends AbstractCookingCategory { public BrickSmeltingCategory(IGuiHelper guiHelper) { - super(guiHelper, Constants.BRICK_FURNACE_BLOCK.get(), "gui.jei.category.smelting", (int) (200 * Services.CONFIG.getCookTimeFactor())); - } - - @Override - @Nonnull - public RecipeType> getRecipeType() { - Class> holderClass = (Class>) (Object) RecipeHolder.class; - return new RecipeType<>(Constants.id(Constants.SMELTING_NAME), holderClass); + super(guiHelper, new RecipeType<>(Constants.id(Constants.SMELTING_NAME), (Class>) (Object) RecipeHolder.class), + Constants.BRICK_FURNACE_BLOCK.get(), "gui.jei.category.smelting", (int) (200 * Services.CONFIG.getCookTimeFactor())); } } diff --git a/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmokingCategory.java b/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmokingCategory.java index f610393..55fb4a7 100644 --- a/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmokingCategory.java +++ b/common/src/main/java/de/cech12/brickfurnace/jei/BrickSmokingCategory.java @@ -8,19 +8,11 @@ import mezz.jei.library.plugins.vanilla.cooking.AbstractCookingCategory; import net.minecraft.world.item.crafting.RecipeHolder; -import javax.annotation.Nonnull; - public class BrickSmokingCategory extends AbstractCookingCategory { public BrickSmokingCategory(IGuiHelper guiHelper) { - super(guiHelper, Constants.BRICK_SMOKER_BLOCK.get(), "gui.jei.category.smoking", (int) (100 * Services.CONFIG.getCookTimeFactor())); - } - - @Override - @Nonnull - public RecipeType> getRecipeType() { - Class> holderClass = (Class>) (Object) RecipeHolder.class; - return new RecipeType<>(Constants.id(Constants.SMOKING_NAME), holderClass); + super(guiHelper, new RecipeType<>(Constants.id(Constants.SMOKING_NAME), (Class>) (Object) RecipeHolder.class), + Constants.BRICK_SMOKER_BLOCK.get(), "gui.jei.category.smoking", (int) (100 * Services.CONFIG.getCookTimeFactor())); } } diff --git a/fabric/build.gradle b/fabric/build.gradle index 2696b5c..f6676ba 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id 'idea' id 'maven-publish' - id 'fabric-loom' version '[1.6.6,1.7)' + id 'fabric-loom' version '[1.7.4,1.8)' } base { archivesName = "${mod_id}-fabric" diff --git a/forge/src/main/java/de/cech12/brickfurnace/BrickFurnaceMod.java b/forge/src/main/java/de/cech12/brickfurnace/BrickFurnaceMod.java index b1e71ce..7ef2a64 100644 --- a/forge/src/main/java/de/cech12/brickfurnace/BrickFurnaceMod.java +++ b/forge/src/main/java/de/cech12/brickfurnace/BrickFurnaceMod.java @@ -18,7 +18,6 @@ import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegisterEvent; -import java.util.Arrays; import java.util.HashSet; import java.util.Set; @@ -26,8 +25,8 @@ @Mod.EventBusSubscriber(modid= Constants.MOD_ID, bus= Mod.EventBusSubscriber.Bus.MOD) public class BrickFurnaceMod { - public BrickFurnaceMod() { - final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); + public BrickFurnaceMod(FMLJavaModLoadingContext context) { + final IEventBus eventBus = context.getModEventBus(); ModBlocks.BLOCKS.register(eventBus); ModBlockEntityTypes.BLOCK_ENTITY_TYPES.register(eventBus); ModItems.ITEMS.register(eventBus); diff --git a/gradle.properties b/gradle.properties index 17388a4..1e90f88 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # Project group=de.cech12.brickfurnace -mod_version=4.1.1.0 +mod_version=4.2.0.0 mod_id=brickfurnace mod_name=Brick Furnace mod_author=Cech12 @@ -15,41 +15,41 @@ description=A mod which adds Brick Furnaces. # Common java_version=21 -minecraft_version=1.21 -minecraft_version_range=[1.21, 1.22) +minecraft_version=1.21.1 +minecraft_version_range=[1.21.1, 1.22) # Fabric -fabric_version=0.100.3+1.21 -fabric_loader_version=0.15.11 -cloth_config_version=15.0.127 -mod_menu_version=11.0.1 +fabric_version=0.105.0+1.21.1 +fabric_loader_version=0.16.5 +cloth_config_version=15.0.140 +mod_menu_version=11.0.2 # Forge -forge_version=51.0.18 -forge_version_range=[51.0.18,) +forge_version=52.0.21 +forge_version_range=[52.0.21,) forge_loader_version_range=[50,) # NeoForge -neoforge_version=21.0.94-beta -neoforge_version_range=[21.0.94-beta,) +neoforge_version=21.1.62 +neoforge_version_range=[21.1.62,) neoforge_loader_version_range=[2,) # jei -jei_version=19.0.0.11 -jei_version_range=[19.0.0.11,) +jei_version=19.19.0.219 +jei_version_range=[19.19.0.219,) # rei -rei_version=16.0.729 -rei_version_range=[16.0.729,) -architectury_version=13.0.2 +rei_version=16.0.788 +rei_version_range=[16.0.788,) +architectury_version=13.0.8 #the one probe -top_version=1.21_neo-12.0.0-1 -top_version_range=[1.21_neo-12.0.0,) +top_version=1.21_neo-12.0.3-5 +top_version_range=[1.21_neo-12.0.3,) # immersive engineering -immersive_engineering_version=1.20.4-11.1.0-172.110 -immersive_engineering_version_range=[1.20.4-11.1.0,) +immersive_engineering_version=1.21.1-12.0.0-182.77 +immersive_engineering_version_range=[1.21.1-12.0.0,) # Gradle org.gradle.jvmargs=-Xmx3G diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 4bd9cae..452f933 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -1,7 +1,7 @@ plugins { id 'idea' id 'maven-publish' - id 'net.neoforged.gradle.userdev' version '7.0.150' + id 'net.neoforged.gradle.userdev' version '7.0.165' id 'java-library' } base { @@ -64,8 +64,8 @@ dependencies { implementation("mcjty.theoneprobe:theoneprobe:$top_version") {transitive = false} - //runtimeOnly("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}") - //compileOnly("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}:api") + runtimeOnly("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}") + compileOnly("blusunrize.immersiveengineering:ImmersiveEngineering:${project.immersive_engineering_version}:api") } // NeoGradle compiles the game, but we don't want to add our common code to the game's code diff --git a/neoforge/src/main/java/de/cech12/brickfurnace/compat/EventHandler.java b/neoforge/src/main/java/de/cech12/brickfurnace/compat/EventHandler.java index 917dac0..d8cafb7 100644 --- a/neoforge/src/main/java/de/cech12/brickfurnace/compat/EventHandler.java +++ b/neoforge/src/main/java/de/cech12/brickfurnace/compat/EventHandler.java @@ -1,13 +1,13 @@ package de.cech12.brickfurnace.compat; -/* + import de.cech12.brickfurnace.Constants; import de.cech12.brickfurnace.compat.immersiveengineering.ImmersiveEngineering; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.ModList; -import net.neoforged.fml.common.Mod; +import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; -@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD, modid= Constants.MOD_ID) +@EventBusSubscriber(bus=EventBusSubscriber.Bus.MOD, modid= Constants.MOD_ID) public class EventHandler { @SubscribeEvent @@ -18,4 +18,3 @@ public static void onCapabilitiesAttachBlockEntity(RegisterCapabilitiesEvent eve } } - */ diff --git a/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java b/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java index e06c378..bd850e1 100644 --- a/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java +++ b/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/BrickFurnaceHeater.java @@ -1,5 +1,5 @@ package de.cech12.brickfurnace.compat.immersiveengineering; -/* + import blusunrize.immersiveengineering.api.tool.ExternalHeaterHandler; import de.cech12.brickfurnace.blockentity.AbstractBrickFurnaceBlockEntity; import de.cech12.brickfurnace.blockentity.BrickFurnaceBlockEntity; @@ -8,10 +8,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.level.block.AbstractFurnaceBlock; +import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; import net.minecraft.world.level.block.state.BlockState; -import static net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity.*; - public class BrickFurnaceHeater implements ExternalHeaterHandler.IExternalHeatable { private static final int FULLY_HEATED_LIT_TIME = 200; private final BrickFurnaceBlockEntity furnace; @@ -43,7 +42,7 @@ public int doHeatTick(int energyAvailable, boolean redstone) { boolean canCook = canCook(furnace.getLevel().registryAccess()); if (canCook || redstone) { ContainerData furnaceData = furnace.getContainerData(); - int burnTime = furnaceData.get(DATA_LIT_TIME); + int burnTime = furnaceData.get(AbstractFurnaceBlockEntity.DATA_LIT_TIME); if (burnTime < FULLY_HEATED_LIT_TIME) { final int heatEnergyRatio = Math.max(1, ExternalHeaterHandler.defaultFurnaceEnergyCost); if (burnTime == 0 && energyAvailable < heatEnergyRatio) { @@ -56,17 +55,17 @@ public int doHeatTick(int energyAvailable, boolean redstone) { int energyToUse = Math.min(energyAvailable, heatAttempt*heatEnergyRatio); int heat = energyToUse/heatEnergyRatio; if (heat > 0) { - furnaceData.set(DATA_LIT_TIME, burnTime+heat); + furnaceData.set(AbstractFurnaceBlockEntity.DATA_LIT_TIME, burnTime+heat); energyConsumed += heat*heatEnergyRatio; setFurnaceActive(); } } // 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(AbstractFurnaceBlockEntity.DATA_LIT_TIME) >= FULLY_HEATED_LIT_TIME&&furnaceData.get(AbstractFurnaceBlockEntity.DATA_COOKING_PROGRESS) < AbstractFurnaceBlockEntity.BURN_TIME_STANDARD-1) { int energyToUse = ExternalHeaterHandler.defaultFurnaceSpeedupCost; if (energyAvailable - energyConsumed > energyToUse) { energyConsumed += energyToUse; - furnaceData.set(DATA_COOKING_PROGRESS, furnaceData.get(DATA_COOKING_PROGRESS)+1); + furnaceData.set(AbstractFurnaceBlockEntity.DATA_COOKING_PROGRESS, furnaceData.get(AbstractFurnaceBlockEntity.DATA_COOKING_PROGRESS)+1); } } } @@ -82,4 +81,3 @@ public void setFurnaceActive() { } } } - */ diff --git a/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java b/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java index 1d80086..e1215c1 100644 --- a/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java +++ b/neoforge/src/main/java/de/cech12/brickfurnace/compat/immersiveengineering/ImmersiveEngineering.java @@ -1,5 +1,5 @@ package de.cech12.brickfurnace.compat.immersiveengineering; -/* + import blusunrize.immersiveengineering.api.tool.ExternalHeaterHandler; import de.cech12.brickfurnace.Constants; import de.cech12.brickfurnace.blockentity.BrickFurnaceBlockEntity; @@ -16,4 +16,3 @@ public static void onCapabilitiesAttachBlockEntity(RegisterCapabilitiesEvent eve } } - */ diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index 3eef5b5..87b62d2 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -44,4 +44,11 @@ type="optional" versionRange="${top_version_range}" referralUrl="https://www.curseforge.com/minecraft/mc-mods/the-one-probe" ordering="NONE" +side="BOTH" +[[dependencies.${mod_id}]] +modId="immersiveengineering" +type="optional" +versionRange="${immersive_engineering_version_range}" +referralUrl="https://github.com/BluSunrize/ImmersiveEngineering" +ordering="NONE" side="BOTH" \ No newline at end of file