mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-19 11:49:35 +00:00
Add missing markDirty() calls on inventory slot changes
This commit is contained in:
1 parent
e6959ea331
commit
4e0fd22ce7
2 files changed
+8
No files matched your search
@@ -75,9 +75,11 @@ public class TileEntityDireCrafting extends TileLudicrous implements IInventory,
|
||||
if(result.stackSize <= decrement) {
|
||||
ItemStack craft = result;
|
||||
result = null;
|
||||
markDirty();
|
||||
return craft;
|
||||
}
|
||||
ItemStack split = result.splitStack(decrement);
|
||||
markDirty();
|
||||
if(result.stackSize <= 0)
|
||||
result = null;
|
||||
return split;
|
||||
@@ -90,9 +92,11 @@ public class TileEntityDireCrafting extends TileLudicrous implements IInventory,
|
||||
if(matrix[slot - 1].stackSize <= decrement){
|
||||
ItemStack ingredient = matrix[slot - 1];
|
||||
matrix[slot - 1] = null;
|
||||
markDirty();
|
||||
return ingredient;
|
||||
}
|
||||
ItemStack split = matrix[slot - 1].splitStack(decrement);
|
||||
markDirty();
|
||||
if(matrix[slot - 1].stackSize <= 0)
|
||||
matrix[slot - 1] = null;
|
||||
return split;
|
||||
@@ -127,9 +131,11 @@ public class TileEntityDireCrafting extends TileLudicrous implements IInventory,
|
||||
public void setInventorySlotContents(int slot, ItemStack stack){
|
||||
if(slot == 0){
|
||||
result = stack;
|
||||
markDirty();
|
||||
}
|
||||
else if(slot <= matrix.length){
|
||||
matrix[slot - 1] = stack;
|
||||
markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,11 +75,13 @@ public class TileEntityNeutron extends TileLudicrous implements IInventory {
|
||||
ItemStack take = neutrons.splitStack(decrement);
|
||||
if(neutrons.stackSize <= 0)
|
||||
neutrons = null;
|
||||
markDirty();
|
||||
return take;
|
||||
}
|
||||
else {
|
||||
ItemStack take = neutrons;
|
||||
neutrons = null;
|
||||
markDirty();
|
||||
return take;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user