fix broken height map updates
This commit is contained in:
parent
1ce918c0af
commit
364ada6346
3 changed files with 18 additions and 20 deletions
|
@ -155,7 +155,7 @@ public abstract class Chunk {
|
|||
return this.getBlock0(pos.getX() & 15, pos.getY(), pos.getZ() & 15);
|
||||
}
|
||||
|
||||
public State setState(LocalPos pos, State state, boolean updateHeight) {
|
||||
public State setState(LocalPos pos, State state) {
|
||||
int x = pos.getX() & 15;
|
||||
int y = pos.getY();
|
||||
int z = pos.getZ() & 15;
|
||||
|
@ -202,7 +202,6 @@ public abstract class Chunk {
|
|||
return null;
|
||||
}
|
||||
else {
|
||||
if(updateHeight) {
|
||||
if(up) {
|
||||
this.genHeightMap();
|
||||
}
|
||||
|
@ -219,7 +218,6 @@ public abstract class Chunk {
|
|||
this.updateHeight(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(oldb instanceof ITileEntityProvider) {
|
||||
TileEntity tile = this.getTileEntity(pos, TileEntity.CreateMode.CHECK);
|
||||
|
|
|
@ -174,7 +174,7 @@ public abstract class World implements IWorldAccess {
|
|||
return false;
|
||||
Chunk chunk = this.getChunk(pos);
|
||||
Block block = newState.getBlock();
|
||||
State iblockstate = chunk.setState(pos, newState, true);
|
||||
State iblockstate = chunk.setState(pos, newState);
|
||||
if(iblockstate == null)
|
||||
return false;
|
||||
Block block1 = iblockstate.getBlock();
|
||||
|
|
|
@ -930,7 +930,7 @@ public final class WorldServer extends AWorldServer {
|
|||
if(block != Blocks.air && (block.getMaterial().isLiquid() || power - (block.getResistance() / 5.0F + 0.3F) * 0.3F > 0.0F)) {
|
||||
if(block.canExplosionDrop() && this.rand.floatv() <= 1.0F / (power * power))
|
||||
block.drop(this, pos, state, 0);
|
||||
this.setState(pos, Blocks.air.getState(), power < 40.0F ? 2 : 10);
|
||||
this.setState(pos, Blocks.air.getState(), 2);
|
||||
block.onDestroyedExplosion(this, pos, source, state);
|
||||
return true;
|
||||
}
|
||||
|
@ -2012,7 +2012,7 @@ public final class WorldServer extends AWorldServer {
|
|||
return false;
|
||||
ChunkServer chunk = this.getChunk(pos);
|
||||
Block block = newState.getBlock();
|
||||
State iblockstate = chunk.setState(pos, newState, (flags & 8) == 0);
|
||||
State iblockstate = chunk.setState(pos, newState);
|
||||
if(iblockstate == null)
|
||||
return false;
|
||||
Block block1 = iblockstate.getBlock();
|
||||
|
@ -2037,7 +2037,7 @@ public final class WorldServer extends AWorldServer {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
State successState = chunk.setState(pos, newState, true);
|
||||
State successState = chunk.setState(pos, newState);
|
||||
boolean successful = successState != null;
|
||||
if(successful) {
|
||||
if(block.getData() != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue