@Override public boolean isInField(IFieldInteraction projector, Vector3 position) { Vector3 posScale = projector.getPositiveScale().clone(); Vector3 negScale = projector.getNegativeScale().clone(); int xStretch = posScale.intX() + negScale.intX(); int yStretch = posScale.intY() + negScale.intY(); int zStretch = posScale.intZ() + negScale.intZ(); Vector3 projectorPos = new Vector3((TileEntity) projector); projectorPos.add(projector.getTranslation()); projectorPos.add(new Vector3(0, -negScale.intY() + 1, 0)); Vector3 relativePosition = position.clone().subtract(projectorPos); relativePosition.rotate(-projector.getRotationYaw(), -projector.getRotationPitch()); Cuboid region = new Cuboid(negScale.scale(-1), posScale); if (region.isIn(relativePosition) && relativePosition.y > 0) { if ((1 - (Math.abs(relativePosition.x) / xStretch) - (Math.abs(relativePosition.z) / zStretch) > relativePosition.y / yStretch)) { return true; } } return false; }