From 4a02e18e6353fe9386956ac014ca23e5c752accc Mon Sep 17 00:00:00 2001 From: Irgendwer01 <67506320+Irgendwer01@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:59:35 +0100 Subject: [PATCH] Fix Effortless Building only being able to use the stack in hand --- .../mixin/UTInventoryHelperMixin.java | 23 ------------------- .../mixin/UTSurvivalHelperMixin.java | 1 - .../mixins.mods.effortlessbuilding.json | 2 +- 3 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTInventoryHelperMixin.java diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTInventoryHelperMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTInventoryHelperMixin.java deleted file mode 100644 index de47440c..00000000 --- a/src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTInventoryHelperMixin.java +++ /dev/null @@ -1,23 +0,0 @@ -package mod.acgaming.universaltweaks.mods.effortlessbuilding.mixin; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -import mod.acgaming.universaltweaks.config.UTConfigMods; -import nl.requios.effortlessbuilding.helper.InventoryHelper; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(InventoryHelper.class) -public class UTInventoryHelperMixin -{ - - @Inject(method = "findItemStackInInventory", at = @At("HEAD"), cancellable = true, remap = false) - private static void utFindItemStackInInventory(EntityPlayer player, Block block, CallbackInfoReturnable cir) - { - if (UTConfigMods.EFFORTLESS_BUILDING.utEFTransmutationFixToggle) cir.setReturnValue(ItemStack.EMPTY); - } -} \ No newline at end of file diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTSurvivalHelperMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTSurvivalHelperMixin.java index 1a2f2793..ff6068a5 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTSurvivalHelperMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/effortlessbuilding/mixin/UTSurvivalHelperMixin.java @@ -25,7 +25,6 @@ private static void utPlaceBlock(World world, EntityPlayer player, BlockPos pos, { if (!UTConfigMods.EFFORTLESS_BUILDING.utEFTransmutationFixToggle) return; int meta = blockState.getBlock().damageDropped(blockState); - origstack = ItemStack.EMPTY; for (int i = 0; i < player.inventory.mainInventory.size(); i++) { ItemStack stack = player.inventory.mainInventory.get(i); diff --git a/src/main/resources/mixins.mods.effortlessbuilding.json b/src/main/resources/mixins.mods.effortlessbuilding.json index 0fac2b38..f5ac2e0e 100644 --- a/src/main/resources/mixins.mods.effortlessbuilding.json +++ b/src/main/resources/mixins.mods.effortlessbuilding.json @@ -3,5 +3,5 @@ "refmap": "universaltweaks.refmap.json", "minVersion": "0.8", "compatibilityLevel": "JAVA_8", - "mixins": ["UTInventoryHelperMixin", "UTSurvivalHelperMixin", "UTUndoRedoMixin"] + "mixins": ["UTSurvivalHelperMixin", "UTUndoRedoMixin"] } \ No newline at end of file