diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityForceFieldProjector.java b/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityForceFieldProjector.java index 19d0dde0..3c04f2a3 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityForceFieldProjector.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityForceFieldProjector.java @@ -1160,12 +1160,16 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField } // create HashSets - VectorI vScale = forceFieldSetup.vMax.clone().subtract(forceFieldSetup.vMin); + final VectorI vScale = forceFieldSetup.vMax.clone().subtract(forceFieldSetup.vMin); vInteriorBlocks = new HashSet<>(vScale.x * vScale.y * vScale.z); vPerimeterBlocks = new HashSet<>(2 * vScale.x * vScale.y + 2 * vScale.x * vScale.z + 2 * vScale.y * vScale.z); // compute interior fields to remove overlapping parts - for (Map.Entry entry : forceFieldSetup.shapeProvider.getVertexes(forceFieldSetup).entrySet()) { + final Map vertexes = forceFieldSetup.shapeProvider.getVertexes(forceFieldSetup); + if (vertexes.isEmpty()) { + WarpDrive.logger.error(this + " No vertexes for " + forceFieldSetup + " at " + projector); + } + for (Map.Entry entry : vertexes.entrySet()) { VectorI vPosition = entry.getKey(); if (forceFieldSetup.isDoubleSided || vPosition.y >= 0) { if ((forceFieldSetup.rotationYaw != 0.0F) || (forceFieldSetup.rotationPitch != 0.0F) || (forceFieldSetup.rotationRoll != 0.0F)) {