@Override public AxisAlignedBB union(AxisAlignedBB other) { return setBB(super.union(other)); }
@Override public AxisAlignedBB getRenderBoundingBox() { return parts.values().stream().map(IPartInfo::getTile).filter(Objects::nonNull)// .reduce(super.getRenderBoundingBox(), (a, b) -> a.union(b.getPartRenderBoundingBox()), (a, b) -> b); }
@Override @SideOnly(Side.CLIENT) public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World world, BlockPos pos) { AxisAlignedBB box = AABB_NONE.offset(pos); state = state.getActualState(world, pos); for (EnumFacing side : EnumFacing.VALUES) { if (state.getValue(PROPERTIES.get(side)).isHollow() == false) { box = box.union(AABB_SIDES.get(side).offset(pos)); } } return box; }
AxisAlignedBB[] bb = new AxisAlignedBB[1]; bb[0] = new AxisAlignedBB(0.5, 0.5, 0.5, 0.5, 0.5, 0.5); objectsToRender.forEach(it -> bb[0] = bb[0].union(it.getModel().bounds().toAABB())); objectsToRender.forEach(it -> bb[0] = bb[0].union(it.getModel().bounds().toAABB())); objectsToRender.forEach(it -> it.getModel().apply(new LPTranslation(0.5 -(bb[0].maxX + bb[0].minX) / 2, 0.5 -(bb[0].maxY + bb[0].minY) / 2, 0.5 -(bb[0].maxZ + bb[0].minZ) / 2)));
EntityPlayer player = (EntityPlayer) entityIn; if (player.isRiding() && !player.getRidingEntity().isDead && player.getRidingEntity() instanceof PhysicsWrapperEntity) { AxisAlignedBB axisalignedbb = player.getEntityBoundingBox().union(player.getRidingEntity().getEntityBoundingBox()).expand(1.0D, 0.0D, 1.0D);
r = r.union( bb );
final AxisAlignedBB b = otherEnd.getBoundingBox( VoxelBlob.NULL_BLOB, false ).offset( other.blockPos.getX(), other.blockPos.getY(), other.blockPos.getZ() ); final AxisAlignedBB bb = a.union( b );