mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 19:13:42 +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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyBlockUpdate(BlockPos pos, BlockState oldState, BlockState newState, int flags) { }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITickList<Block> getPendingBlockTicks() {
|
public ITickList<Block> getPendingBlockTicks() {
|
||||||
return EmptyTickList.get();
|
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");
|
throw new IllegalStateException("Cannot use IServerWorld#getWorld in a client environment");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,13 +87,8 @@ public class WrappedWorld extends World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notifyBlockUpdate(BlockPos pos, BlockState oldState, BlockState newState, int flags) {
|
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
|
@Override
|
||||||
public ITickList<Block> getPendingBlockTicks() {
|
public ITickList<Block> getPendingBlockTicks() {
|
||||||
|
|
Loading…
Reference in a new issue