mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-21 04:49:51 +08:00
Fix notify at negative Y on fabric, leave note for forge.
This commit is contained in:
parent
2586600ebb
commit
1415e6f610
@ -117,7 +117,7 @@ public boolean updateTileEntity(BlockPos position, com.sk89q.jnbt.CompoundTag ta
|
||||
|
||||
@Override
|
||||
public void notifyBlockUpdate(WorldChunk chunk, BlockPos position, BlockState oldState, BlockState newState) {
|
||||
if (chunk.getSectionArray()[position.getY() >> ChunkStore.CHUNK_SHIFTS] != null) {
|
||||
if (chunk.getSectionArray()[world.get().getSectionIndex(position.getY())] != null) {
|
||||
getWorld().updateListeners(position, oldState, newState, UPDATE | NOTIFY);
|
||||
}
|
||||
}
|
||||
@ -129,7 +129,7 @@ public boolean isChunkTicking(WorldChunk chunk) {
|
||||
|
||||
@Override
|
||||
public void markBlockChanged(WorldChunk chunk, BlockPos position) {
|
||||
if (chunk.getSectionArray()[position.getY() >> ChunkStore.CHUNK_SHIFTS] != null) {
|
||||
if (chunk.getSectionArray()[world.get().getSectionIndex(position.getY())] != null) {
|
||||
((ServerChunkManager) getWorld().getChunkManager()).markForUpdate(position);
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public boolean updateTileEntity(BlockPos position, CompoundTag tag) {
|
||||
|
||||
@Override
|
||||
public void notifyBlockUpdate(Chunk chunk, BlockPos position, BlockState oldState, BlockState newState) {
|
||||
if (chunk.getSections()[position.getY() >> ChunkStore.CHUNK_SHIFTS] != null) {
|
||||
if (chunk.getSections()[position.getY() >> ChunkStore.CHUNK_SHIFTS] != null) { // TODO 1.17 - world.get().getSectionIndex(position.getY())
|
||||
getWorld().notifyBlockUpdate(position, oldState, newState, UPDATE | NOTIFY);
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,7 @@ public boolean isChunkTicking(Chunk chunk) {
|
||||
|
||||
@Override
|
||||
public void markBlockChanged(Chunk chunk, BlockPos position) {
|
||||
if (chunk.getSections()[position.getY() >> ChunkStore.CHUNK_SHIFTS] != null) {
|
||||
if (chunk.getSections()[position.getY() >> ChunkStore.CHUNK_SHIFTS] != null) { // TODO 1.17 - world.get().getSectionIndex(position.getY())
|
||||
((ServerChunkProvider) getWorld().getChunkProvider()).markBlockChanged(position);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user