From 18a84006ca5e81433c291270d85f7a7378cf4d31 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 6 Feb 2022 04:27:05 +0100 Subject: [PATCH] Instanced Bonus - fixed PSI actor instance not updated with recent changes --- .../contraptions/components/actors/PSIActorInstance.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PSIActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PSIActorInstance.java index 90d83d44e..8dad7184b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PSIActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PSIActorInstance.java @@ -5,6 +5,7 @@ import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance; import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.animation.LerpedFloat; public class PSIActorInstance extends ActorInstance { @@ -22,9 +23,9 @@ public class PSIActorInstance extends ActorInstance { @Override public void beginFrame() { - PortableStorageInterfaceTileEntity psi = PortableStorageInterfaceRenderer.getTargetPSI(context); - instance.tick(psi != null && psi.isConnected()); - instance.beginFrame(psi == null ? 0f : psi.getExtensionDistance(AnimationTickHolder.getPartialTicks())); + LerpedFloat lf = PortableStorageInterfaceMovement.getAnimation(context); + instance.tick(lf.settled()); + instance.beginFrame(lf.getValue(AnimationTickHolder.getPartialTicks())); } }