mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-29 08:26:37 +01:00
Fix misaligned contraption light
- That was a pain to debug - Idk how that ever worked
This commit is contained in:
parent
79e61b44e5
commit
ebfeff0b54
1 changed files with 3 additions and 2 deletions
|
@ -95,12 +95,13 @@ public class LightVolume implements ImmutableBox, LightListener {
|
||||||
public void initialize(LightProvider world) {
|
public void initialize(LightProvider world) {
|
||||||
if (lightData == null) return;
|
if (lightData == null) return;
|
||||||
|
|
||||||
ImmutableBox box = getVolume();
|
// the volume is indexed based on the greater bounding box
|
||||||
int shiftX = box.getMinX();
|
int shiftX = box.getMinX();
|
||||||
int shiftY = box.getMinY();
|
int shiftY = box.getMinY();
|
||||||
int shiftZ = box.getMinZ();
|
int shiftZ = box.getMinZ();
|
||||||
|
|
||||||
box.forEachContained((x, y, z) -> {
|
// ... but we only iterate over the (potentially) smaller sample volume
|
||||||
|
getVolume().forEachContained((x, y, z) -> {
|
||||||
int blockLight = world.getLight(LightLayer.BLOCK, x, y, z);
|
int blockLight = world.getLight(LightLayer.BLOCK, x, y, z);
|
||||||
int skyLight = world.getLight(LightLayer.SKY, x, y, z);
|
int skyLight = world.getLight(LightLayer.SKY, x, y, z);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue