From 4de1295c55cbbcf7757ede9e05a10bdc04b20617 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 30 Dec 2016 12:35:55 +0100 Subject: [PATCH] Made the ESD less performance intensive by giving it a cooldown --- .../mod/tile/TileEntityInputter.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java index 533276ebe..deaa83d22 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java @@ -260,12 +260,15 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt //Is Block not powered by Redstone? if(!this.isRedstonePowered){ - if(!(this.sideToPull == this.sideToPut && this.slotToPullStart == this.slotToPutStart && this.slotToPullEnd == this.slotToPutEnd)){ - if(this.sideToPull != -1 && this.placeToPull != null){ - this.newPulling(); - } - if(StackUtil.isValid(this.slots[0]) && this.sideToPut != -1 && this.placeToPut != null){ - this.newPutting(); + if(this.ticksElapsed%30 == 0){ + if(!(this.sideToPull == this.sideToPut && this.slotToPullStart == this.slotToPutStart && this.slotToPullEnd == this.slotToPutEnd)){ + if(!StackUtil.isValid(this.slots[0]) && this.sideToPull != -1 && this.placeToPull != null){ + this.newPulling(); + } + + if(StackUtil.isValid(this.slots[0]) && this.sideToPut != -1 && this.placeToPut != null){ + this.newPutting(); + } } } }