mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Backport changes
This commit is contained in:
parent
8a19c4c38c
commit
c478dbd249
@ -33,6 +33,7 @@ import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
@ -230,7 +231,7 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
||||
|
||||
// Remove existing tiles
|
||||
{
|
||||
Map<BlockPosition, TileEntity> tiles = nmsChunk.getTileEntities();
|
||||
Map<BlockPosition, TileEntity> tiles = new HashMap<>(nmsChunk.getTileEntities());
|
||||
if (!tiles.isEmpty()) {
|
||||
for (Map.Entry<BlockPosition, TileEntity> entry : tiles.entrySet()) {
|
||||
final BlockPosition pos = entry.getKey();
|
||||
@ -243,8 +244,7 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
||||
}
|
||||
if (set.getBlock(lx, ly, lz).getOrdinal() != 0) {
|
||||
TileEntity tile = entry.getValue();
|
||||
tile.n();
|
||||
tile.invalidateBlockCache();
|
||||
nmsChunk.removeTileEntity(tile.getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
@ -238,7 +239,7 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
||||
|
||||
// Remove existing tiles
|
||||
{
|
||||
Map<BlockPosition, TileEntity> tiles = nmsChunk.getTileEntities();
|
||||
Map<BlockPosition, TileEntity> tiles = new HashMap<>(nmsChunk.getTileEntities());
|
||||
if (!tiles.isEmpty()) {
|
||||
for (Map.Entry<BlockPosition, TileEntity> entry : tiles.entrySet()) {
|
||||
final BlockPosition pos = entry.getKey();
|
||||
@ -251,8 +252,7 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
||||
}
|
||||
if (set.getBlock(lx, ly, lz).getOrdinal() != 0) {
|
||||
TileEntity tile = entry.getValue();
|
||||
tile.hasWorld();
|
||||
tile.invalidateBlockCache();
|
||||
nmsChunk.removeTileEntity(tile.getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user