More solid Schematic placement
-Added Try- Catch block to prevent a TileEntity not getting loaded right from causing the Pocket from registering (which caused respective Schematic placements on the same position, which replaced unregistered Doors, to crash as well)
This commit is contained in:
parent
fa6d32cf0c
commit
9f303bc66b
1 changed files with 5 additions and 1 deletions
|
@ -130,7 +130,11 @@ public class PocketTemplate { //there is exactly one pocket placer for each diff
|
|||
DimDoors.proxy.updateDoorTE((BlockDimDoorBase) world.getBlockState(pos).getBlock(), world, pos);
|
||||
}
|
||||
} else {
|
||||
tileEntity.readFromNBT(tileEntityNBT); //this reads in the wrong blockPos
|
||||
try {
|
||||
tileEntity.readFromNBT(tileEntityNBT); //this reads in the wrong blockPos
|
||||
} catch(Exception e) {
|
||||
DimDoors.warn(this.getClass(), "Loading in the data for TileEntity of type " + tileEntity.toString() + " went wrong. Details: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
tileEntity.setPos(pos); //correct the position
|
||||
tileEntity.markDirty();
|
||||
|
|
Loading…
Reference in a new issue