Forcing updates on light emitting blocks occasionally (every 2 seconds) to properly update lighting because MC's lighting needs to see a doctor.

This commit is contained in:
Florian Nücke 2014-06-02 17:56:34 +02:00
parent 1aa4eea798
commit d99bc5815c

View File

@ -26,6 +26,13 @@ trait TileEntity extends net.minecraft.tileentity.TileEntity {
// ----------------------------------------------------------------------- //
override def updateEntity() {
super.updateEntity()
if (world.getWorldTime % 40 == 0 && block.getLightValue(world, x, y, z) > 0) {
world.markBlockForUpdate(x, y, z)
}
}
override def validate() {
super.validate()
initialize()