Instanced Bonus

- fixed PSI actor instance not updated with recent changes
This commit is contained in:
simibubi 2022-02-06 04:27:05 +01:00
parent a6e86520f5
commit 18a84006ca

View file

@ -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.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance; import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
public class PSIActorInstance extends ActorInstance { public class PSIActorInstance extends ActorInstance {
@ -22,9 +23,9 @@ public class PSIActorInstance extends ActorInstance {
@Override @Override
public void beginFrame() { public void beginFrame() {
PortableStorageInterfaceTileEntity psi = PortableStorageInterfaceRenderer.getTargetPSI(context); LerpedFloat lf = PortableStorageInterfaceMovement.getAnimation(context);
instance.tick(psi != null && psi.isConnected()); instance.tick(lf.settled());
instance.beginFrame(psi == null ? 0f : psi.getExtensionDistance(AnimationTickHolder.getPartialTicks())); instance.beginFrame(lf.getValue(AnimationTickHolder.getPartialTicks()));
} }
} }