Merge pull request #86 from IntellectualSites/tile-entity-fix-extracted

Fix the tile entity deal-io only
Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-01 13:42:13 +11:00 committet von GitHub
Commit d1e51884de
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -252,11 +252,10 @@ public final class Spigot_v1_13_R2 extends CachedBukkitAdapter implements Bukkit
BlockPosition pos = new BlockPosition(x, y, z); BlockPosition pos = new BlockPosition(x, y, z);
nmsChunk.d(pos); nmsChunk.d(pos); // Force delete the old tile entity
CompoundTag nativeTag = state instanceof BaseBlock ? ((BaseBlock)state).getNbtData() : null; CompoundTag nativeTag = state instanceof BaseBlock ? ((BaseBlock)state).getNbtData() : null;
if (nativeTag != null || existing instanceof TileEntityBlock) { if (nativeTag != null || existing instanceof TileEntityBlock) {
pos = new BlockPosition(x, y, z);
nmsWorld.setTypeAndData(pos, blockData, 0); nmsWorld.setTypeAndData(pos, blockData, 0);
// remove tile // remove tile
if (nativeTag != null) { if (nativeTag != null) {
@ -284,7 +283,6 @@ public final class Spigot_v1_13_R2 extends CachedBukkitAdapter implements Bukkit
} }
} }
if (update) { if (update) {
if (pos == null) pos = new BlockPosition(x, y, z);
nmsWorld.getMinecraftWorld().notify(pos, existing, blockData, 0); nmsWorld.getMinecraftWorld().notify(pos, existing, blockData, 0);
} }
return true; return true;