private @Nonnull BoundingBox createConduitBounds(Class<? extends IConduit> type, EnumFacing dir, @Nonnull Offset offset) { BoundingBox bb = CORE_BOUNDS; Vector3d min = bb.getMin(); Vector3d max = bb.getMax();
private @Nonnull AxisAlignedBB getHooverBounds() { if (hooverBounds == NULL_AABB) { double killerJoeHooverXpHeight = KillerJoeConfig.killerJoeHooverXpHeight.get(); double killerJoeHooverXpLength = KillerJoeConfig.killerJoeHooverXpLength.get(); double killerJoeHooverXpWidth = KillerJoeConfig.killerJoeHooverXpWidth.get(); BoundingBox bb = new BoundingBox(getLocation()); Vector3d min = bb.getMin(); Vector3d max = bb.getMax(); max.y += killerJoeHooverXpHeight; min.y -= killerJoeHooverXpHeight; EnumFacing facingDir = facing; if (ForgeDirectionOffsets.isPositiveOffset(facingDir)) { max.add(ForgeDirectionOffsets.offsetScaled(facingDir, killerJoeHooverXpLength)); min.add(ForgeDirectionOffsets.forDir(facingDir)); } else { min.add(ForgeDirectionOffsets.offsetScaled(facingDir, killerJoeHooverXpLength)); max.add(ForgeDirectionOffsets.forDir(facingDir)); } if (facingDir.getFrontOffsetX() == 0) { min.x -= killerJoeHooverXpWidth * 2; max.x += killerJoeHooverXpWidth * 2; } else { min.z -= killerJoeHooverXpWidth * 2; max.z += killerJoeHooverXpWidth * 2; } hooverBounds = new AxisAlignedBB(min.x, min.y, min.z, max.x, max.y, max.z); } return hooverBounds; }
private @Nonnull BoundingBox getKillBounds() { if (killBounds == NULL_AABB) { double killerJoeAttackHeight = KillerJoeConfig.killerJoeAttackHeight.get(); double killerJoeAttackLength = KillerJoeConfig.killerJoeAttackLength.get(); double killerJoeAttackWidth = KillerJoeConfig.killerJoeAttackWidth.get(); BoundingBox bb = new BoundingBox(getLocation()); Vector3d min = bb.getMin(); Vector3d max = bb.getMax(); max.y += killerJoeAttackHeight; min.y -= killerJoeAttackHeight; EnumFacing facingDir = facing; if (ForgeDirectionOffsets.isPositiveOffset(facingDir)) { max.add(ForgeDirectionOffsets.offsetScaled(facingDir, killerJoeAttackLength)); min.add(ForgeDirectionOffsets.forDir(facingDir)); } else { min.add(ForgeDirectionOffsets.offsetScaled(facingDir, killerJoeAttackLength)); max.add(ForgeDirectionOffsets.forDir(facingDir)); } if (facingDir.getFrontOffsetX() == 0) { min.x -= killerJoeAttackWidth; max.x += killerJoeAttackWidth; } else { min.z -= killerJoeAttackWidth; max.z += killerJoeAttackWidth; } killBounds = new BoundingBox(min.x, min.y, min.z, max.x, max.y, max.z); } return killBounds; }