mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
LightPacking utility class
This commit is contained in:
parent
069506ae09
commit
0a11539961
1 changed files with 7 additions and 6 deletions
|
@ -9,6 +9,7 @@ import com.jozufozu.flywheel.core.instancing.SelectInstance;
|
||||||
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
|
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
|
||||||
import com.jozufozu.flywheel.light.GridAlignedBB;
|
import com.jozufozu.flywheel.light.GridAlignedBB;
|
||||||
import com.jozufozu.flywheel.light.IMovingListener;
|
import com.jozufozu.flywheel.light.IMovingListener;
|
||||||
|
import com.jozufozu.flywheel.light.LightPacking;
|
||||||
import com.jozufozu.flywheel.light.LightProvider;
|
import com.jozufozu.flywheel.light.LightProvider;
|
||||||
import com.jozufozu.flywheel.light.ImmutableBox;
|
import com.jozufozu.flywheel.light.ImmutableBox;
|
||||||
import com.jozufozu.flywheel.light.LightUpdater;
|
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());
|
short packed = light.getPackedLight(pos.getX(), pos.getY() - i, pos.getZ());
|
||||||
data.setPosition(getInstancePosition())
|
data.setPosition(getInstancePosition())
|
||||||
.nudge(0, -offset, 0)
|
.nudge(0, -offset, 0)
|
||||||
.setBlockLight(LightVolume.unpackBlock(packed))
|
.setBlockLight(LightPacking.getBlock(packed))
|
||||||
.setSkyLight(LightVolume.unpackSky(packed));
|
.setSkyLight(LightPacking.getSky(packed));
|
||||||
});
|
});
|
||||||
|
|
||||||
halfRope.update()
|
halfRope.update()
|
||||||
|
@ -88,8 +89,8 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID
|
||||||
short packed = light.getPackedLight(pos.getX(), pos.getY(), pos.getZ());
|
short packed = light.getPackedLight(pos.getX(), pos.getY(), pos.getZ());
|
||||||
rope1.setPosition(getInstancePosition())
|
rope1.setPosition(getInstancePosition())
|
||||||
.nudge(0, -halfRopeNudge, 0)
|
.nudge(0, -halfRopeNudge, 0)
|
||||||
.setBlockLight(LightVolume.unpackBlock(packed))
|
.setBlockLight(LightPacking.getBlock(packed))
|
||||||
.setSkyLight(LightVolume.unpackSky(packed));
|
.setSkyLight(LightPacking.getSky(packed));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isRunning()) {
|
if (isRunning()) {
|
||||||
|
@ -101,8 +102,8 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID
|
||||||
rope.get(i)
|
rope.get(i)
|
||||||
.setPosition(getInstancePosition())
|
.setPosition(getInstancePosition())
|
||||||
.nudge(0, -offset + i + 1, 0)
|
.nudge(0, -offset + i + 1, 0)
|
||||||
.setBlockLight(LightVolume.unpackBlock(packed))
|
.setBlockLight(LightPacking.getBlock(packed))
|
||||||
.setSkyLight(LightVolume.unpackSky(packed));
|
.setSkyLight(LightPacking.getSky(packed));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rope.clear();
|
rope.clear();
|
||||||
|
|
Loading…
Reference in a new issue