Fixed a missing exception handler in jump sequencer

This commit is contained in:
Unknown 2019-10-06 00:00:08 +02:00 committed by unknown
parent d5b53b15d3
commit 5fe5d784b6

View file

@ -1163,6 +1163,7 @@ public class JumpSequencer extends AbstractSequencer {
WarpDrive.logger.info(String.format("Moving externals from (%d %d %d) of %s@%d", WarpDrive.logger.info(String.format("Moving externals from (%d %d %d) of %s@%d",
jumpBlock.x, jumpBlock.y, jumpBlock.z, jumpBlock.block, jumpBlock.blockMeta)); jumpBlock.x, jumpBlock.y, jumpBlock.z, jumpBlock.block, jumpBlock.blockMeta));
} }
try {
final TileEntity tileEntitySource = jumpBlock.getTileEntity(worldSource); final TileEntity tileEntitySource = jumpBlock.getTileEntity(worldSource);
final BlockPos blockPosTarget = transformation.apply(jumpBlock.x, jumpBlock.y, jumpBlock.z); final BlockPos blockPosTarget = transformation.apply(jumpBlock.x, jumpBlock.y, jumpBlock.z);
final IBlockState blockStateTarget = worldTarget.getBlockState(blockPosTarget); final IBlockState blockStateTarget = worldTarget.getBlockState(blockPosTarget);
@ -1180,6 +1181,13 @@ public class JumpSequencer extends AbstractSequencer {
blockStateTarget, tileEntityTarget, transformation, external.getValue()); blockStateTarget, tileEntityTarget, transformation, external.getValue());
} }
} }
} catch (final Exception exception) {
WarpDrive.logger.info(String.format("Exception while moving external %s@%d at (%d %d %d)",
jumpBlock.block, jumpBlock.blockMeta, jumpBlock.x, jumpBlock.y, jumpBlock.z));
if (WarpDriveConfig.LOGGING_JUMPBLOCKS) {
exception.printStackTrace();
}
}
index++; index++;
} }
actualIndexInShip++; actualIndexInShip++;