diff --git a/.gitignore b/.gitignore index 4b3afc6..97ab8fc 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ eclipse run classes +/includedMods/ diff --git a/build.gradle b/build.gradle index 08663cd..021953b 100644 --- a/build.gradle +++ b/build.gradle @@ -91,15 +91,17 @@ repositories { dependencies { - minecraft 'net.minecraftforge:forge:1.18.2-40.1.0' + minecraft 'net.minecraftforge:forge:1.18.2-40.1.18' implementation fg.deobf (project.dependencies.create('com.hrznstudio:titanium:1.18.2-3.5.0-32')) - compileOnly fg.deobf("mezz.jei:jei-1.18.2:9.5.3.143:api") - runtimeOnly fg.deobf("mezz.jei:jei-1.18.2:9.5.3.143") + compileOnly fg.deobf("mezz.jei:jei-1.18.2:9.7.0.180:api") + runtimeOnly fg.deobf("mezz.jei:jei-1.18.2:9.7.0.180") runtimeOnly fg.deobf("curse.maven:refined-storage-243076:3712882") implementation fg.deobf("curse.maven:the-one-probe-245211:3671753") //implementation fg.deobf("curse.maven:allthecompressed-514045:3723881") //runtimeOnly fg.deobf("curse.maven:create-328085:3600402") //runtimeOnly fg.deobf("curse.maven:flywheel-486392:3600401") + runtimeOnly fg.deobf("curse.maven:mekanism-268560:3810540") + runtimeOnly fg.deobf("curse.maven:refined-pipes-370696:3816785") annotationProcessor "org.spongepowered:mixin:0.8.5:processor" } diff --git a/src/main/java/com/buuz135/functionalstorage/block/tile/CompactingDrawerTile.java b/src/main/java/com/buuz135/functionalstorage/block/tile/CompactingDrawerTile.java index e2ee0f4..6e08486 100644 --- a/src/main/java/com/buuz135/functionalstorage/block/tile/CompactingDrawerTile.java +++ b/src/main/java/com/buuz135/functionalstorage/block/tile/CompactingDrawerTile.java @@ -87,8 +87,7 @@ public class CompactingDrawerTile extends ControllableDrawerTile { return super.getCapability(cap, side); } + public InteractionResult onSlotActivated(Player playerIn, InteractionHand hand, Direction facing, double hitX, double hitY, double hitZ, int slot) { + ItemStack stack = playerIn.getItemInHand(hand); + if (stack.getItem().equals(FunctionalStorage.CONFIGURATION_TOOL.get()) || stack.getItem().equals(FunctionalStorage.LINKING_TOOL.get())) return InteractionResult.PASS; + if (slot != -1 && isLocked() && !playerIn.getItemInHand(hand).isEmpty()){ + BigInventoryHandler.BigStack bigStack = getHandler().getStoredStacks().get(slot); + if (bigStack.getStack().isEmpty()){ + bigStack.setStack(playerIn.getItemInHand(hand)); + } + } + return super.onSlotActivated(playerIn, hand, facing, hitX, hitY, hitZ, slot); + } + @NotNull @Override public DrawerTile getSelf() {