Improved force field robustness (code review finding)
This commit is contained in:
parent
e4828c8365
commit
3d3065aa62
1 changed files with 6 additions and 0 deletions
|
@ -145,6 +145,12 @@ public class ForceFieldSetup extends GlobalPosition {
|
|||
Vector3 v3Translation = new Vector3(0.0D, 0.0D, 0.0D);
|
||||
|
||||
for (final TileEntity tileEntity : tileEntities) {
|
||||
// sanity check
|
||||
if (tileEntity == null) {
|
||||
WarpDrive.logger.error(String.format("Invalid tile entity returned from ForgeFieldRegistry at %s",
|
||||
this));
|
||||
continue;
|
||||
}
|
||||
// only consider same dimension
|
||||
if (tileEntity.getWorldObj() == null || tileEntity.getWorldObj().provider.dimensionId != dimensionId) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue