mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
feat: only input slot change need rebuild
This commit is contained in:
1 parent
f377cac87d
commit
6aba01fb2c
1 file changed
+17
-1
@@ -53,9 +53,25 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
|
||||
return new ToolStationContainer(inventoryplayer, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack stack) {
|
||||
super.setInventorySlotContents(slot, stack);
|
||||
if (slot != 0) {
|
||||
buildTool(toolName);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slot, int amount) {
|
||||
ItemStack itemstack = super.decrStackSize(slot, amount);
|
||||
if (slot != 0) {
|
||||
buildTool(toolName);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
buildTool(toolName);
|
||||
if (this.worldObj != null) {
|
||||
this.blockMetadata = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
|
||||
Reference in new issue
Block a user