From 0a115399617b423c911947e7dca6d41abb8eb97d Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Tue, 14 Sep 2021 13:17:14 -0700 Subject: [PATCH] LightPacking utility class --- .../pulley/AbstractPulleyInstance.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java index f8a7bc4ad..ca11cb7e6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java @@ -9,6 +9,7 @@ import com.jozufozu.flywheel.core.instancing.SelectInstance; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; import com.jozufozu.flywheel.light.GridAlignedBB; import com.jozufozu.flywheel.light.IMovingListener; +import com.jozufozu.flywheel.light.LightPacking; import com.jozufozu.flywheel.light.LightProvider; import com.jozufozu.flywheel.light.ImmutableBox; import com.jozufozu.flywheel.light.LightUpdater; @@ -75,8 +76,8 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID short packed = light.getPackedLight(pos.getX(), pos.getY() - i, pos.getZ()); data.setPosition(getInstancePosition()) .nudge(0, -offset, 0) - .setBlockLight(LightVolume.unpackBlock(packed)) - .setSkyLight(LightVolume.unpackSky(packed)); + .setBlockLight(LightPacking.getBlock(packed)) + .setSkyLight(LightPacking.getSky(packed)); }); halfRope.update() @@ -88,8 +89,8 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID short packed = light.getPackedLight(pos.getX(), pos.getY(), pos.getZ()); rope1.setPosition(getInstancePosition()) .nudge(0, -halfRopeNudge, 0) - .setBlockLight(LightVolume.unpackBlock(packed)) - .setSkyLight(LightVolume.unpackSky(packed)); + .setBlockLight(LightPacking.getBlock(packed)) + .setSkyLight(LightPacking.getSky(packed)); }); if (isRunning()) { @@ -101,8 +102,8 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID rope.get(i) .setPosition(getInstancePosition()) .nudge(0, -offset + i + 1, 0) - .setBlockLight(LightVolume.unpackBlock(packed)) - .setSkyLight(LightVolume.unpackSky(packed)); + .setBlockLight(LightPacking.getBlock(packed)) + .setSkyLight(LightPacking.getSky(packed)); } } else { rope.clear();