geforkt von Mirrors/FastAsyncWorldEdit
fix paste tile npe
Dieser Commit ist enthalten in:
Ursprung
0fcac39592
Commit
a36778794b
@ -96,6 +96,9 @@ public class BukkitGetBlocks_1_13 extends CharGetBlocks {
|
|||||||
@Override
|
@Override
|
||||||
public CompoundTag getTag(int x, int y, int z) {
|
public CompoundTag getTag(int x, int y, int z) {
|
||||||
TileEntity tileEntity = getChunk().getTileEntity(new BlockPosition((x & 15) + (X << 4), y, (z & 15) + (Z << 4)));
|
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())));
|
return new LazyCompoundTag_1_13(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +103,9 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
|||||||
@Override
|
@Override
|
||||||
public CompoundTag getTag(int x, int y, int z) {
|
public CompoundTag getTag(int x, int y, int z) {
|
||||||
TileEntity tileEntity = getChunk().getTileEntity(new BlockPosition((x & 15) + (X << 4), y, (z & 15) + (Z << 4)));
|
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())));
|
return new LazyCompoundTag_1_14(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren