Fix dupe glitch
This commit is contained in:
@@ -74,12 +74,12 @@ public class TileGrid extends TileMachine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onCrafted(ContainerGrid container) {
|
public void onCrafted(ContainerGrid container) {
|
||||||
if (isConnected() && !worldObj.isRemote) {
|
if (!worldObj.isRemote) {
|
||||||
for (int i = 0; i < craftingInventory.getSizeInventory(); ++i) {
|
for (int i = 0; i < craftingInventory.getSizeInventory(); ++i) {
|
||||||
ItemStack slot = craftingInventory.getStackInSlot(i);
|
ItemStack slot = craftingInventory.getStackInSlot(i);
|
||||||
|
|
||||||
if (slot != null) {
|
if (slot != null) {
|
||||||
if (slot.stackSize == 1) {
|
if (slot.stackSize == 1 && isConnected()) {
|
||||||
craftingInventory.setInventorySlotContents(i, getController().take(slot.copy()));
|
craftingInventory.setInventorySlotContents(i, getController().take(slot.copy()));
|
||||||
} else {
|
} else {
|
||||||
craftingInventory.decrStackSize(i, 1);
|
craftingInventory.decrStackSize(i, 1);
|
||||||
|
Reference in New Issue
Block a user