mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Add null check to creating default NBT data
This commit is contained in:
@ -39,7 +39,7 @@ public class BlockMaterial_1_15_2 implements BlockMaterial {
|
||||
this.isTranslucent = !(boolean) ReflectionUtil.getField(Block.class, block, "v");
|
||||
opacity = defaultState.b(BlockAccessAir.INSTANCE, BlockPosition.ZERO);
|
||||
TileEntity tileEntity = !block.isTileEntity() ? null : ((ITileEntity)block).createTile(null);
|
||||
tile = new LazyCompoundTag_1_15_2(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
tile = tileEntity == null ? null : new LazyCompoundTag_1_15_2(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
|
@ -41,7 +41,7 @@ public class BlockMaterial_1_16_1 implements BlockMaterial {
|
||||
this.isTranslucent = !(boolean)ReflectionUtil.getField(BlockBase.Info.class, blockInfo, "n");
|
||||
opacity = defaultState.b(BlockAccessAir.INSTANCE, BlockPosition.ZERO);
|
||||
TileEntity tileEntity = !block.isTileEntity() ? null : ((ITileEntity)block).createTile(null);
|
||||
tile = new LazyCompoundTag_1_16_1(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
tile = tileEntity == null ? null : new LazyCompoundTag_1_16_1(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
|
@ -41,7 +41,7 @@ public class BlockMaterial_1_16_2 implements BlockMaterial {
|
||||
this.isTranslucent = !(boolean)ReflectionUtil.getField(BlockBase.Info.class, blockInfo, "n");
|
||||
opacity = defaultState.b(BlockAccessAir.INSTANCE, BlockPosition.ZERO);
|
||||
TileEntity tileEntity = !block.isTileEntity() ? null : ((ITileEntity)block).createTile(null);
|
||||
tile = new LazyCompoundTag_1_16_2(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
tile = tileEntity == null ? null : new LazyCompoundTag_1_16_2(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
|
@ -41,7 +41,7 @@ public class BlockMaterial_1_16_5 implements BlockMaterial {
|
||||
this.isTranslucent = !(boolean)ReflectionUtil.getField(BlockBase.Info.class, blockInfo, "n");
|
||||
opacity = defaultState.b(BlockAccessAir.INSTANCE, BlockPosition.ZERO);
|
||||
TileEntity tileEntity = !block.isTileEntity() ? null : ((ITileEntity)block).createTile(null);
|
||||
tile = new LazyCompoundTag_1_16_5(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
tile = tileEntity == null ? null : new LazyCompoundTag_1_16_5(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
|
Reference in New Issue
Block a user