// pipe
for (ForgeDirection side : DIR_VALUES) {
if (side == ForgeDirection.UNKNOWN || tileG.isPipeConnected(side)) {
AxisAlignedBB bb = getPipeBoundingBox(side);
setBlockBounds(bb);
boxes[side.ordinal()] = bb;
hits[side.ordinal()] = super.collisionRayTrace(world, x, y, z, origin, direction);
sideHit[side.ordinal()] = side;
}
}
// gates
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
if (pipe.hasGate(side)) {
AxisAlignedBB bb = getGateBoundingBox(side);
setBlockBounds(bb);
boxes[7 + side.ordinal()] = bb;
hits[7 + side.ordinal()] = super.collisionRayTrace(world, x, y, z, origin, direction);
sideHit[7 + side.ordinal()] = side;
}
}
// facades
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
if (tileG.tilePart.hasFacade(side)) {
AxisAlignedBB bb = getFacadeBoundingBox(side);
setBlockBounds(bb);
boxes[13 + side.ordinal()] = bb;
hits[13 + side.ordinal()] = super.collisionRayTrace(world, x, y, z, origin, direction);
sideHit[13 + side.ordinal()] = side;
}
}
// plugs
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
if (tileG.tilePart.hasPlug(side)) {
AxisAlignedBB bb = getPlugBoundingBox(side);
setBlockBounds(bb);
boxes[19 + side.ordinal()] = bb;
hits[19 + side.ordinal()] = super.collisionRayTrace(world, x, y, z, origin, direction);
sideHit[19 + side.ordinal()] = side;
}
}
// robotStations
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
if (tileG.tilePart.hasRobotStation(side)) {
AxisAlignedBB bb = getRobotStationBoundingBox(side);
setBlockBounds(bb);
boxes[25 + side.ordinal()] = bb;
hits[25 + side.ordinal()] = super.collisionRayTrace(world, x, y, z, origin, direction);
sideHit[25 + side.ordinal()] = side;
}