mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
fix paste tile npe
This commit is contained in:
parent
0fcac39592
commit
a36778794b
@ -96,6 +96,9 @@ public class BukkitGetBlocks_1_13 extends CharGetBlocks {
|
||||
@Override
|
||||
public CompoundTag getTag(int x, int y, int z) {
|
||||
TileEntity tileEntity = getChunk().getTileEntity(new BlockPosition((x & 15) + (X << 4), y, (z & 15) + (Z << 4)));
|
||||
if (tileEntity == null) {
|
||||
return null;
|
||||
}
|
||||
return new LazyCompoundTag_1_13(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
|
@ -103,6 +103,9 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
||||
@Override
|
||||
public CompoundTag getTag(int x, int y, int z) {
|
||||
TileEntity tileEntity = getChunk().getTileEntity(new BlockPosition((x & 15) + (X << 4), y, (z & 15) + (Z << 4)));
|
||||
if (tileEntity == null) {
|
||||
return null;
|
||||
}
|
||||
return new LazyCompoundTag_1_14(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user