Fixes #2551: Prevent chunk rebuilds when drive is unchanged.

This commit is contained in:
yueh 2016-11-01 11:22:35 +01:00
parent b6d3be41e1
commit d7d99c5e7e
1 changed files with 7 additions and 6 deletions

View File

@ -206,15 +206,16 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
private void recalculateDisplay()
{
final boolean currentActive = this.getProxy().isActive();
int newState = this.state;
if( currentActive )
{
this.state |= 0x80000000;
newState |= 0x80000000;
}
else
{
this.state &= ~0x80000000;
newState &= ~0x80000000;
}
if( this.wasActive != currentActive )
@ -232,12 +233,12 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
for( int x = 0; x < this.getCellCount(); x++ )
{
this.state |= ( this.getCellStatus( x ) << ( 3 * x ) );
newState |= ( this.getCellStatus( x ) << ( 3 * x ) );
}
final int oldState = 0;
if( oldState != this.state )
if( newState != this.state )
{
this.state = newState;
this.markForUpdate();
}
}