diff --git a/CHANGELOG.md b/CHANGELOG.md index 61b08c5..8095d6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ 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.20.4-3.1.1.0] - 2024-05-11 +### Added +- registering ItemHandlers to be more compatible with other mods (NeoForge) + +### Fixed +- Shining Block of Diamond recipe advancement triggered with first inventory change (Fabric/Quilt) + ## [1.20.4-3.1.0.0] - 2024-04-27 ### Added - add Fabric (>=0.96.11+1.20.4) support (Fabric, Quilt) diff --git a/fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json b/fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json index 831b85c..cf077bc 100644 --- a/fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json +++ b/fabric/src/main/resources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json @@ -11,7 +11,9 @@ "conditions": { "items": [ { - "item": "minecraft:diamond_block" + "items": [ + "minecraft:diamond_block" + ] } ] } diff --git a/gradle.properties b/gradle.properties index 7f97aa5..4961210 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # Project group=de.cech12.solarcooker -mod_version=3.1.0.0 +mod_version=3.1.1.0 mod_id=solarcooker mod_name=Solar Cooker mod_author=Cech12 diff --git a/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java b/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java index e410016..dd3284a 100644 --- a/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java +++ b/neoforge/src/main/java/de/cech12/solarcooker/NeoForgeSolarCookerMod.java @@ -18,7 +18,10 @@ import net.neoforged.fml.ModList; import net.neoforged.fml.common.Mod; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent; +import net.neoforged.neoforge.items.wrapper.SidedInvWrapper; @Mod(Constants.MOD_ID) @Mod.EventBusSubscriber(modid= Constants.MOD_ID, bus= Mod.EventBusSubscriber.Bus.MOD) @@ -45,6 +48,11 @@ public static void onClientRegister(FMLClientSetupEvent event) { BlockEntityRenderers.register(Constants.SOLAR_COOKER_ENTITY_TYPE.get(), SolarCookerBlockEntityRenderer::new); } + @SubscribeEvent + public static void registerCapabilities(RegisterCapabilitiesEvent event) { + event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, Constants.SOLAR_COOKER_ENTITY_TYPE.get(), SidedInvWrapper::new); + } + @SubscribeEvent public static void addItemsToTabs(BuildCreativeModeTabContentsEvent event) { if (event.getTabKey() == CreativeModeTabs.FUNCTIONAL_BLOCKS) {