Skip to content

Commit

Permalink
Remove remap overrides that fail in build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcl committed Jul 9, 2023
1 parent d94ab88 commit 58dd53c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public abstract class MixinContainerStorageCore extends Container {
@Invoker(value = "rowCount", remap = false)
protected abstract int invokeRowCount();

@Inject(method = "slotClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/inventory/Container;slotClick(IILnet/minecraft/inventory/ClickType;Lnet/minecraft/entity/player/EntityPlayer;)Lnet/minecraft/item/ItemStack;"), remap = false, locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true)
@Inject(method = "slotClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/inventory/Container;slotClick(IILnet/minecraft/inventory/ClickType;Lnet/minecraft/entity/player/EntityPlayer;)Lnet/minecraft/item/ItemStack;"), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true)
private void injectSlotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player, CallbackInfoReturnable<ItemStack> cir, ItemStack val) {
if (slotId != -999) {
Slot slot = this.getSlot(slotId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public MixinContainerStorageCoreCrafting(EntityPlayer player, World world, int x
super(player, world, x, y, z);
}

@Redirect(method = "transferStackInSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isItemEqual(Lnet/minecraft/item/ItemStack;)Z", ordinal = 0), remap = false)
@Redirect(method = "transferStackInSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isItemEqual(Lnet/minecraft/item/ItemStack;)Z", ordinal = 0))
private boolean redirectTransferStackInSlotIsItemEqual0(ItemStack stack, ItemStack other) {
return true;
}

@Redirect(method = "transferStackInSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isItemEqual(Lnet/minecraft/item/ItemStack;)Z", ordinal = 1), remap = false)
@Redirect(method = "transferStackInSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isItemEqual(Lnet/minecraft/item/ItemStack;)Z", ordinal = 1))
private boolean redirectTransferStackInSlotIsItemEqual1(ItemStack stack, ItemStack other) {
return false;
}

@Redirect(method = "transferStackInSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/inventory/InventoryCrafting;getStackInSlot(I)Lnet/minecraft/item/ItemStack;", ordinal = 0), remap = false)
@Redirect(method = "transferStackInSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/inventory/InventoryCrafting;getStackInSlot(I)Lnet/minecraft/item/ItemStack;", ordinal = 0))
private ItemStack redirectTransferStackInSlotGetStackInSlot(InventoryCrafting inv, int index) {
return inv.getStackInSlot(index).copy();
}
Expand All @@ -36,7 +36,7 @@ private int modifyConstantTryToPopulateCraftingGrid(int original) {
return Integer.MAX_VALUE;
}

@Redirect(method = "tryToPopulateCraftingGrid", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;setCount(I)V"), remap = false)
@Redirect(method = "tryToPopulateCraftingGrid", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;setCount(I)V"))
private void redirectTryToPopulateCraftingGridSetCount(ItemStack itemStack, int count) {
if (itemStack.getCount() > 1) {
itemStack.setCount(itemStack.getCount() - 1);
Expand Down

0 comments on commit 58dd53c

Please sign in to comment.