From c1b9f8a794aefa331ddf3f890ceb69bce57d4a53 Mon Sep 17 00:00:00 2001 From: ThinkingBeanz <110514609+ThinkingBeanz@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:11:59 +0300 Subject: [PATCH 1/2] Compatibility with modern Expanded Storage Changed some lines of code so that the mod is compatible with newer versions of Expanded Storage. If compiling doesn't work, try running this command in cmd: ``` gradlew -Dorg.gradle.java.home="C:\Program Files\Java\jdk-17 ``` The mod won't crash when using newer versions of Expanded Storage (which apparently got deleted from curseforge along with the older one), but I don't think it places horizontal double chests correctly when a contraption is stopped. The fix is a few months old, so I don't remember a lot other than that it works. --- gradle.properties | 3 +-- .../expandedstorage/ExpandedStorageRegistry.java | 10 +++++----- .../mixin/expandedstorage/AbstractChestBlockMixin.java | 4 ++-- src/main/resources/META-INF/mods.toml | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/gradle.properties b/gradle.properties index 203ccd7..3f8a85b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,8 +14,7 @@ ironchests_versioncode = 3795374 storagedrawers_versioncode = 3807626 framedcompactingdrawers_versioncode = 3808242 immersiveengineering_versioncode = 3823066 -expandedstorage_versioncode = 3818505 -ninjaphenixs_container_library_versioncode = 3813786 +expandedstorage_versioncode = 4541065 supermartijn642score_versioncode = 3863129 trashcans_versioncode = 3773710 shetiphiancore_versioncode = 3832652 diff --git a/src/main/java/com/juh9870/moremountedstorages/integrations/expandedstorage/ExpandedStorageRegistry.java b/src/main/java/com/juh9870/moremountedstorages/integrations/expandedstorage/ExpandedStorageRegistry.java index 7e500e2..ded87e0 100644 --- a/src/main/java/com/juh9870/moremountedstorages/integrations/expandedstorage/ExpandedStorageRegistry.java +++ b/src/main/java/com/juh9870/moremountedstorages/integrations/expandedstorage/ExpandedStorageRegistry.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.Level; import net.minecraftforge.common.util.Lazy; import net.minecraftforge.items.IItemHandler; -import ellemes.expandedstorage.Common; +import ellemes.expandedstorage.common.CommonMain; import ninjaphenix.expandedstorage.api.EsChestType; import ninjaphenix.expandedstorage.api.ExpandedStorageAccessors; @@ -60,10 +60,10 @@ public boolean canUseAsStorage(BlockEntity te) { @Override public BlockEntityType[] affectedStorages() { return new BlockEntityType[]{ - Common.getBarrelBlockEntityType(), - Common.getChestBlockEntityType(), - Common.getOldChestBlockEntityType(), - Common.getMiniChestBlockEntityType(), + CommonMain.getBarrelBlockEntityType(), + CommonMain.getChestBlockEntityType(), + CommonMain.getOldChestBlockEntityType(), + CommonMain.getMiniStorageBlockEntityType(), }; } diff --git a/src/main/java/com/juh9870/moremountedstorages/mixin/expandedstorage/AbstractChestBlockMixin.java b/src/main/java/com/juh9870/moremountedstorages/mixin/expandedstorage/AbstractChestBlockMixin.java index 2b0bc50..de3a7a3 100644 --- a/src/main/java/com/juh9870/moremountedstorages/mixin/expandedstorage/AbstractChestBlockMixin.java +++ b/src/main/java/com/juh9870/moremountedstorages/mixin/expandedstorage/AbstractChestBlockMixin.java @@ -1,6 +1,6 @@ package com.juh9870.moremountedstorages.mixin.expandedstorage; -import ellemes.expandedstorage.block.OpenableBlock; +import ellemes.expandedstorage.common.block.OpenableBlock; import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; @@ -14,7 +14,7 @@ public class AbstractChestBlockMixin { @Redirect( at = @At( value = "INVOKE", - target = "Lellemes/expandedstorage/block/OpenableBlock;rotate(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/Rotation;)Lnet/minecraft/world/level/block/state/BlockState;" + target = "Lellemes/expandedstorage/common/block/OpenableBlock;rotate(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/Rotation;)Lnet/minecraft/world/level/block/state/BlockState;" ), method = "rotate", remap = false diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 7de8ff9..08ad4be 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -17,7 +17,7 @@ Suppoted mods: - Immersive Engineering https://www.curseforge.com/minecraft/mc-mods/immersive-engineering - Industrial Foregoing https://www.curseforge.com/minecraft/mc-mods/industrial-foregoing - PneumaticCraft: Repressurized https://www.curseforge.com/minecraft/mc-mods/pneumaticcraft-repressurized - - Expanded Storage: https://www.curseforge.com/minecraft/mc-mods/expanded-storage-forge + - Expanded Storage: https://www.curseforge.com/minecraft/mc-mods/expanded-storage - EnderChests: https://www.curseforge.com/minecraft/mc-mods/enderchests - DimStorage: https://www.curseforge.com/minecraft/mc-mods/dimstorage''' [[dependencies.moremountedstorages]] #optional @@ -78,7 +78,7 @@ Suppoted mods: [[dependencies.moremountedstorages]] modId="expandedstorage" mandatory=false - versionRange="[7.4.0-beta.4,)" #keep updated + versionRange="[8.3.3,)" #keep updated ordering="AFTER" side="BOTH" [[dependencies.moremountedstorages]] From b1f0a07c79a2dd5f3d325f5bba867875709d50f9 Mon Sep 17 00:00:00 2001 From: ThinkingBeanz <110514609+ThinkingBeanz@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:25:40 +0300 Subject: [PATCH 2/2] Update build.gradle changed version from '1.2.2' to '1.3.0' --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6d86422..9b7e2c9 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ mixin { add sourceSets.main, "moremountedstorages.refmap.json" } -version = '1.2.2' +version = '1.3.0' group = 'com.juh9870.moremountedstorages' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'moremountedstorages'