mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 06:43:40 +01:00
Actually, we should prevent all updates caused by SchematicWorld
This commit is contained in:
parent
b890204f44
commit
a633bc47be
2 changed files with 5 additions and 6 deletions
|
@ -202,6 +202,9 @@ public class SchematicWorld extends WrappedWorld implements IServerWorld {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyBlockUpdate(BlockPos pos, BlockState oldState, BlockState newState, int flags) { }
|
||||
|
||||
@Override
|
||||
public ITickList<Block> getPendingBlockTicks() {
|
||||
return EmptyTickList.get();
|
||||
|
@ -233,4 +236,5 @@ public class SchematicWorld extends WrappedWorld implements IServerWorld {
|
|||
}
|
||||
throw new IllegalStateException("Cannot use IServerWorld#getWorld in a client environment");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -87,12 +87,7 @@ public class WrappedWorld extends World {
|
|||
|
||||
@Override
|
||||
public void notifyBlockUpdate(BlockPos pos, BlockState oldState, BlockState newState, int flags) {
|
||||
Chunk chunk = world.getChunkProvider().getWorldChunk(pos.getX() >> 4, pos.getZ() >> 4);
|
||||
if (chunk != null) {
|
||||
ChunkSection chunksection = chunk.getSections()[SectionPos.toChunk(pos.getY())];
|
||||
if (chunksection != null)
|
||||
world.notifyBlockUpdate(pos, oldState, newState, flags);
|
||||
}
|
||||
world.notifyBlockUpdate(pos, oldState, newState, flags);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue