diff --git a/src/main/java/com/cleanroommc/neverenoughanimations/animations/SwapHolder.java b/src/main/java/com/cleanroommc/neverenoughanimations/animations/SwapHolder.java index eda1b15..5adffc0 100644 --- a/src/main/java/com/cleanroommc/neverenoughanimations/animations/SwapHolder.java +++ b/src/main/java/com/cleanroommc/neverenoughanimations/animations/SwapHolder.java @@ -1,6 +1,7 @@ package com.cleanroommc.neverenoughanimations.animations; import com.cleanroommc.neverenoughanimations.IItemLocation; +import com.cleanroommc.neverenoughanimations.NEAConfig; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; @@ -21,6 +22,7 @@ public class SwapHolder { private ItemStack hotbarStack; public boolean init(Slot hoveredSlot, List slots, int hotbarIndex) { + if (NEAConfig.isBlacklisted(Minecraft.getMinecraft().currentScreen)) return false; this.targetSlot = hoveredSlot; this.hotbarSlot = findHotbarSlot(slots, hotbarIndex); if (this.hotbarSlot == null) { diff --git a/src/main/java/com/cleanroommc/neverenoughanimations/core/mixin/ContainerMixin.java b/src/main/java/com/cleanroommc/neverenoughanimations/core/mixin/ContainerMixin.java index 17f93d9..fcbb05f 100644 --- a/src/main/java/com/cleanroommc/neverenoughanimations/core/mixin/ContainerMixin.java +++ b/src/main/java/com/cleanroommc/neverenoughanimations/core/mixin/ContainerMixin.java @@ -122,14 +122,14 @@ public void throwItem(int slotId, int dragType, ClickType clickTypeIn, EntityPla IItemLocation slot = IItemLocation.of(this.inventorySlots.get(slotId)); if (slot.nea$getStack().isEmpty()) { // only animate when shift is held (throw hole stack) or only one item is left - ItemPickupThrowAnimation.animateRemove(slot.nea$getX(), slot.nea$getY(), throwing.get(), false); + ItemPickupThrowAnimation.animate(slot.nea$getX(), slot.nea$getY(), throwing.get(), false); } } @ModifyArg(method = "slotClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/EntityPlayer;dropItem(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/item/EntityItem;")) - public ItemStack animateThrow(ItemStack itemStackIn, @Local(ordinal = 0) int slot) { + public ItemStack animateThrow(ItemStack itemStackIn, @Local(ordinal = 0, argsOnly = true) int slot) { if (slot == -999) { - ItemPickupThrowAnimation.animateRemove(NEA.getMouseX() - 8, NEA.getMouseY() - 8, itemStackIn.copy(), true); + ItemPickupThrowAnimation.animate(NEA.getMouseX() - 8, NEA.getMouseY() - 8, itemStackIn.copy(), true); } return itemStackIn; }