diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/wooden/WatermillBlockEntity.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/wooden/WatermillBlockEntity.java index 0a87a5b86d..523398db8c 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/wooden/WatermillBlockEntity.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/wooden/WatermillBlockEntity.java @@ -45,7 +45,7 @@ public class WatermillBlockEntity extends IEBaseBlockEntity implements IETickabl public boolean multiblock = false; private boolean beingBroken = false; public double perTick; - private static final int globalSyncDelay = 10*20; + private static final int globalSyncDelay = 20*20; private int globalSyncDelayCounter = 1; public WatermillBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) @@ -63,6 +63,8 @@ public void tickClient() @Override public void tickServer() { +// if(isDummy()) +// return; if(isBlocked())//TODO throttle? { setPerTickAndAdvance(0); @@ -112,6 +114,8 @@ public void tickServer() private void setPerTickAndAdvance(double newValue) { + if(isDummy()) + return; if(newValue!=perTick) { globalSyncDelayCounter = globalSyncDelay; @@ -120,10 +124,9 @@ private void setPerTickAndAdvance(double newValue) } else if(globalSyncDelayCounter >= 0) globalSyncDelayCounter--; - if(globalSyncDelayCounter==0) { - float newrot = syncedRot(); + float newrot = (float)(level.getGameTime()*perTick); if(rotation!=newrot) { rotation = newrot; @@ -132,7 +135,8 @@ else if(globalSyncDelayCounter >= 0) } } else - rotation = (float)(rotation+perTick)%1; + rotation += perTick; + rotation %= 1; } private boolean canUse(@Nullable BlockEntity tileEntity) @@ -350,9 +354,4 @@ public void breakDummies(BlockPos pos, BlockState state) } } } - - private float syncedRot() - { - return ((float)(level.getGameTime()*perTick))%1; - } }