make explosions less laggy
This commit is contained in:
parent
a5bdf39f19
commit
95389455aa
6 changed files with 57 additions and 91 deletions
|
@ -1867,11 +1867,11 @@ public final class WorldServer extends AWorldServer {
|
|||
return false;
|
||||
Chunk chunk = this.getChunk(pos);
|
||||
Block block = newState.getBlock();
|
||||
State iblockstate = chunk.setState(pos, newState);
|
||||
State iblockstate = chunk.setState(pos, newState, (flags & 8) == 0);
|
||||
if(iblockstate == null)
|
||||
return false;
|
||||
Block block1 = iblockstate.getBlock();
|
||||
if(block.getLightOpacity() != block1.getLightOpacity() || block.getLight() != block1.getLight())
|
||||
if((flags & 8) == 0 && (block.getLightOpacity() != block1.getLightOpacity() || block.getLight() != block1.getLight()))
|
||||
this.checkLight(pos);
|
||||
if((flags & 2) != 0 && chunk.isPopulated())
|
||||
this.markBlockForUpdate(pos);
|
||||
|
@ -1894,7 +1894,7 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
State successState = chunk.setState(pos, newState);
|
||||
State successState = chunk.setState(pos, newState, true);
|
||||
boolean successful = successState != null;
|
||||
if(successful) {
|
||||
if(block.getData() != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue