ctrlQCraftingFix
This commit is contained in:
1 parent
60844cea9f
commit
514317326b
1 file changed
-11
@@ -52,39 +52,28 @@ public class ContainerMixin
|
|||||||
|
|
||||||
private ItemStack dropAllCrafting(PlayerEntity playerIn, int index, List<Slot> invSlotParam)
|
private ItemStack dropAllCrafting(PlayerEntity playerIn, int index, List<Slot> invSlotParam)
|
||||||
{
|
{
|
||||||
|
|
||||||
ItemStack itemstack = ItemStack.EMPTY;
|
ItemStack itemstack = ItemStack.EMPTY;
|
||||||
Slot slot = invSlotParam.get(index);
|
Slot slot = invSlotParam.get(index);
|
||||||
|
|
||||||
if (slot != null && slot.hasStack())
|
if (slot != null && slot.hasStack())
|
||||||
{
|
{
|
||||||
ItemStack itemstack1 = slot.getStack();
|
ItemStack itemstack1 = slot.getStack();
|
||||||
itemstack = itemstack1.copy();
|
itemstack = itemstack1.copy();
|
||||||
|
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
{
|
{
|
||||||
playerIn.dropItem(itemstack, true);
|
playerIn.dropItem(itemstack, true);
|
||||||
|
|
||||||
itemstack1.setAmount(0);
|
itemstack1.setAmount(0);
|
||||||
|
|
||||||
slot.onStackChanged(itemstack1, itemstack);
|
slot.onStackChanged(itemstack1, itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemstack.getAmount() == itemstack1.getAmount())
|
if (itemstack.getAmount() == itemstack1.getAmount())
|
||||||
{
|
{
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack itemstack2 = slot.onTakeItem(playerIn, itemstack1);
|
ItemStack itemstack2 = slot.onTakeItem(playerIn, itemstack1);
|
||||||
|
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
{
|
{
|
||||||
playerIn.dropItem(itemstack2, false);
|
playerIn.dropItem(itemstack2, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return itemstack;
|
return itemstack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user