3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

Backport changes

Dieser Commit ist enthalten in:
Alexander Söderberg 2020-04-21 23:58:14 +02:00
Ursprung 8a19c4c38c
Commit c478dbd249
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: C0207FF7EA146678
2 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -33,6 +33,7 @@ import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.HashMap;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
@ -230,7 +231,7 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
// Remove existing tiles // Remove existing tiles
{ {
Map<BlockPosition, TileEntity> tiles = nmsChunk.getTileEntities(); Map<BlockPosition, TileEntity> tiles = new HashMap<>(nmsChunk.getTileEntities());
if (!tiles.isEmpty()) { if (!tiles.isEmpty()) {
for (Map.Entry<BlockPosition, TileEntity> entry : tiles.entrySet()) { for (Map.Entry<BlockPosition, TileEntity> entry : tiles.entrySet()) {
final BlockPosition pos = entry.getKey(); final BlockPosition pos = entry.getKey();
@ -243,8 +244,7 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
} }
if (set.getBlock(lx, ly, lz).getOrdinal() != 0) { if (set.getBlock(lx, ly, lz).getOrdinal() != 0) {
TileEntity tile = entry.getValue(); TileEntity tile = entry.getValue();
tile.n(); nmsChunk.removeTileEntity(tile.getPosition());
tile.invalidateBlockCache();
} }
} }
} }

Datei anzeigen

@ -33,6 +33,7 @@ import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.HashMap;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
@ -238,7 +239,7 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
// Remove existing tiles // Remove existing tiles
{ {
Map<BlockPosition, TileEntity> tiles = nmsChunk.getTileEntities(); Map<BlockPosition, TileEntity> tiles = new HashMap<>(nmsChunk.getTileEntities());
if (!tiles.isEmpty()) { if (!tiles.isEmpty()) {
for (Map.Entry<BlockPosition, TileEntity> entry : tiles.entrySet()) { for (Map.Entry<BlockPosition, TileEntity> entry : tiles.entrySet()) {
final BlockPosition pos = entry.getKey(); final BlockPosition pos = entry.getKey();
@ -251,8 +252,7 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
} }
if (set.getBlock(lx, ly, lz).getOrdinal() != 0) { if (set.getBlock(lx, ly, lz).getOrdinal() != 0) {
TileEntity tile = entry.getValue(); TileEntity tile = entry.getValue();
tile.hasWorld(); nmsChunk.removeTileEntity(tile.getPosition());
tile.invalidateBlockCache();
} }
} }
} }