mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Fix schem load NPE
This commit is contained in:
parent
5b5336cc83
commit
e452fc9556
@ -229,7 +229,7 @@ public class SchematicStreamer extends NBTStreamer {
|
|||||||
|
|
||||||
BlockStateHolder forwardBlock = fc.getBlock(x + forward.getBlockX(), y + forward.getBlockY(), z + forward.getBlockZ());
|
BlockStateHolder forwardBlock = fc.getBlock(x + forward.getBlockX(), y + forward.getBlockY(), z + forward.getBlockZ());
|
||||||
BlockTypes forwardType = forwardBlock.getBlockType();
|
BlockTypes forwardType = forwardBlock.getBlockType();
|
||||||
if (forwardType.hasProperty(PropertyKey.SHAPE)) {
|
if (forwardType.hasProperty(PropertyKey.SHAPE) && forwardType.hasProperty(PropertyKey.FACING)) {
|
||||||
Direction forwardFacing = (Direction) forwardBlock.getState(PropertyKey.FACING);
|
Direction forwardFacing = (Direction) forwardBlock.getState(PropertyKey.FACING);
|
||||||
if (forwardFacing == left) {
|
if (forwardFacing == left) {
|
||||||
BlockStateHolder rightBlock = fc.getBlock(x + right.getBlockX(), y + right.getBlockY(), z + right.getBlockZ());
|
BlockStateHolder rightBlock = fc.getBlock(x + right.getBlockX(), y + right.getBlockY(), z + right.getBlockZ());
|
||||||
@ -250,7 +250,7 @@ public class SchematicStreamer extends NBTStreamer {
|
|||||||
|
|
||||||
BlockStateHolder backwardsBlock = fc.getBlock(x - forward.getBlockX(), y - forward.getBlockY(), z - forward.getBlockZ());
|
BlockStateHolder backwardsBlock = fc.getBlock(x - forward.getBlockX(), y - forward.getBlockY(), z - forward.getBlockZ());
|
||||||
BlockTypes backwardsType = backwardsBlock.getBlockType();
|
BlockTypes backwardsType = backwardsBlock.getBlockType();
|
||||||
if (backwardsType.hasProperty(PropertyKey.SHAPE)) {
|
if (backwardsType.hasProperty(PropertyKey.SHAPE) && backwardsType.hasProperty(PropertyKey.FACING)) {
|
||||||
Direction backwardsFacing = (Direction) backwardsBlock.getState(PropertyKey.FACING);
|
Direction backwardsFacing = (Direction) backwardsBlock.getState(PropertyKey.FACING);
|
||||||
if (backwardsFacing == left) {
|
if (backwardsFacing == left) {
|
||||||
BlockStateHolder rightBlock = fc.getBlock(x + right.getBlockX(), y + right.getBlockY(), z + right.getBlockZ());
|
BlockStateHolder rightBlock = fc.getBlock(x + right.getBlockX(), y + right.getBlockY(), z + right.getBlockZ());
|
||||||
|
Loading…
Reference in New Issue
Block a user