mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 20:11:35 +01:00
Fix another issue with ghost instances.
Hopefully fix belt lighting issues.
This commit is contained in:
parent
8c0e983f36
commit
456ed364a4
2 changed files with 12 additions and 4 deletions
|
@ -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 a new issue