Fix light sync (#3304)

* Sync light opacity changes to client
* While at it, also fix Light P2P
* Use int for opacity, dont store it in NBT
This commit is contained in:
fscan
2018-01-14 13:44:12 +01:00
committed by yueh
parent 8c5842aca9
commit cbfc88c87f
4 changed files with 25 additions and 23 deletions
@@ -83,13 +83,14 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
protected boolean readFromStream( final ByteBuf data ) throws IOException
{
final boolean c = super.readFromStream( data );
final boolean ret = this.getCableBus().readFromStream( data );
boolean ret = this.getCableBus().readFromStream( data );
final int newLV = this.getCableBus().getLightValue();
if( newLV != this.oldLV )
{
this.oldLV = newLV;
this.world.checkLight( this.pos );
ret = true;
}
this.updateTileSetting();
@@ -189,7 +190,6 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
{
this.oldLV = newLV;
this.world.checkLight( this.pos );
// world.updateAllLightTypes( xCoord, yCoord, zCoord );
}
super.markForUpdate();