1
0
Fork 0

make explosions less laggy

This commit is contained in:
Sen 2025-08-27 09:01:36 +02:00
parent a5bdf39f19
commit 95389455aa
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
6 changed files with 57 additions and 91 deletions

View file

@ -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) {