mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 06:24:12 +01:00
Fix another issue with ghost instances.
Hopefully fix belt lighting issues.
This commit is contained in:
parent
8c0e983f36
commit
456ed364a4
@ -125,6 +125,9 @@ public class BeltTileEntity extends KineticTileEntity {
|
||||
BeltMovementHandler.transportEntity(this, entity, info);
|
||||
});
|
||||
toRemove.forEach(passengers::remove);
|
||||
|
||||
if (blockLight == -1)
|
||||
updateLight();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -216,7 +219,7 @@ public class BeltTileEntity extends KineticTileEntity {
|
||||
|
||||
if (!clientPacket)
|
||||
return;
|
||||
updateLight();
|
||||
|
||||
if (casingBefore == casing)
|
||||
return;
|
||||
requestModelDataUpdate();
|
||||
@ -484,7 +487,12 @@ public class BeltTileEntity extends KineticTileEntity {
|
||||
}
|
||||
|
||||
private void updateLight() {
|
||||
skyLight = (byte) world.getLightLevel(LightType.SKY, pos);
|
||||
blockLight = (byte) world.getLightLevel(LightType.BLOCK, pos);
|
||||
if (world != null) {
|
||||
skyLight = (byte) world.getLightLevel(LightType.SKY, pos);
|
||||
blockLight = (byte) world.getLightLevel(LightType.BLOCK, pos);
|
||||
} else {
|
||||
skyLight = -1;
|
||||
blockLight = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,8 +92,8 @@ public abstract class InstancedModel<D extends InstanceData> extends BufferedMod
|
||||
keys.get(i).index--;
|
||||
}
|
||||
|
||||
markIndexChanged(index - 1);
|
||||
maxIndexChanged = keys.size() - 1;
|
||||
markIndexChanged(Math.min(maxIndexChanged, index));
|
||||
|
||||
key.invalidate();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user