Skip to content

Commit 6292156

Browse files
committed
fix cannon anim playing during pause
1 parent 7dbe0ff commit 6292156

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/kotlin/org/valkyrienskies/clockwork/content/logistics/solid/delivery/cannon/DeliveryCannonRenderer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class DeliveryCannonRenderer(context: BlockEntityRendererProvider.Context?): Fre
4545
var mount = CachedBufferer.partial(ClockworkPartials.CANNON_MOUNT,be.blockState)
4646
var barrel = CachedBufferer.partial(ClockworkPartials.CANNON_BARREL,be.blockState)
4747

48-
val mult = if(be.gunPowderTicks>0) 3 else 1
48+
val mult = if (Minecraft.getInstance().isPaused) 0 else if(be.gunPowderTicks>0) 3 else 1
4949

5050
val xResult = turn(be.xLastRotation, be.xTargetRotation, 1.0*mult)
5151
val yResult = turn(be.yLastRotation, be.yTargetRotation, 0.75*mult)
@@ -92,7 +92,7 @@ class DeliveryCannonRenderer(context: BlockEntityRendererProvider.Context?): Fre
9292
if (!be.transportStack.isEmpty && be.maxProgress > 0) {
9393

9494

95-
be.clientProgress=min(be.clientProgress+partialTicks.toDouble()/3.0,be.maxProgress)
95+
if (!Minecraft.getInstance().isPaused) be.clientProgress=min(be.clientProgress+partialTicks.toDouble()/3.0,be.maxProgress)
9696

9797

9898
if (!be.didParticles) {

0 commit comments

Comments
 (0)