Fixed Grid "last changed" date not changing when using clear button or JEI transfer. Fixes #2022
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- Fixed a duplication bug with a disconnected Crafting Grid (raoulvdberge)
|
||||
- Fixed oredict autocrafting sometimes reporting that a craftable item is missing (raoulvdberge)
|
||||
- Fixed fluid autocrafting without item inputs locking when there's not enough space for the fluids (raoulvdberge)
|
||||
- Fixed Grid "last changed" date not changing when using clear button or JEI transfer (raoulvdberge)
|
||||
- Removed handling of reusable items in autocrafting, to avoid problems (raoulvdberge)
|
||||
- You can no longer start a crafting task if it has missing items or fluids (raoulvdberge)
|
||||
|
||||
|
||||
@@ -345,6 +345,8 @@ public class NetworkNodeGrid extends NetworkNode implements IGridNetworkAware, I
|
||||
return;
|
||||
} else {
|
||||
network.insertItem(slot, slot.getCount(), Action.PERFORM);
|
||||
|
||||
network.getItemStorageTracker().changed(player, slot.copy());
|
||||
}
|
||||
} else {
|
||||
// If we aren't connected, try to insert into player inventory. If it fails, stop.
|
||||
@@ -375,6 +377,8 @@ public class NetworkNodeGrid extends NetworkNode implements IGridNetworkAware, I
|
||||
if (took != null) {
|
||||
grid.getCraftingMatrix().setInventorySlotContents(i, StackUtils.nullToEmpty(took));
|
||||
|
||||
network.getItemStorageTracker().changed(player, took.copy());
|
||||
|
||||
found = true;
|
||||
|
||||
break;
|
||||
@@ -461,7 +465,13 @@ public class NetworkNodeGrid extends NetworkNode implements IGridNetworkAware, I
|
||||
}
|
||||
} else if (!slot.isEmpty()) {
|
||||
if (slot.getCount() == 1 && network != null) {
|
||||
matrix.setInventorySlotContents(i, StackUtils.nullToEmpty(network.extractItem(slot, 1, Action.PERFORM)));
|
||||
ItemStack refill = StackUtils.nullToEmpty(network.extractItem(slot, 1, Action.PERFORM));
|
||||
|
||||
matrix.setInventorySlotContents(i, refill);
|
||||
|
||||
if (!refill.isEmpty()) {
|
||||
network.getItemStorageTracker().changed(player, refill.copy());
|
||||
}
|
||||
} else {
|
||||
matrix.decrStackSize(i, 1);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,10 @@ public class MessageGridClear extends MessageHandlerPlayerToServer<MessageGridCl
|
||||
|
||||
if (!slot.isEmpty()) {
|
||||
matrix.setInventorySlotContents(i, StackUtils.nullToEmpty(grid.getNetwork().insertItem(slot, slot.getCount(), Action.PERFORM)));
|
||||
|
||||
if (player != null) {
|
||||
grid.getNetwork().getItemStorageTracker().changed(player, slot.copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (grid.getGridType() == GridType.PATTERN) {
|
||||
|
||||
Reference in New Issue
Block a user