use of net.minecraft.block.BlockRailBase.EnumRailDirection in project Railcraft by Railcraft.
the class TrackKitSwitchTurnout method getActuatorLocation.
@Override
public EnumFacing getActuatorLocation() {
EnumFacing face = EnumFacing.NORTH;
EnumRailDirection dir = getRailDirectionRaw();
if (dir == EnumRailDirection.NORTH_SOUTH) {
face = isMirrored() ? EnumFacing.EAST : EnumFacing.WEST;
} else if (dir == EnumRailDirection.EAST_WEST) {
face = isMirrored() ? EnumFacing.SOUTH : EnumFacing.NORTH;
}
return face;
}
use of net.minecraft.block.BlockRailBase.EnumRailDirection in project Railcraft by Railcraft.
the class TrackKitSwitchTurnout method getCartsAtSpringEntrance.
@Override
protected List<UUID> getCartsAtSpringEntrance() {
EnumRailDirection dir = getRailDirectionRaw();
BlockPos offset = getPos();
if (dir == EnumRailDirection.NORTH_SOUTH) {
offset = isMirrored() ? offset.west() : offset.east();
} else if (dir == EnumRailDirection.EAST_WEST) {
offset = isMirrored() ? offset.north() : offset.south();
}
return CartTools.getMinecartUUIDsAt(theWorldAsserted(), offset, 0.1f);
}
use of net.minecraft.block.BlockRailBase.EnumRailDirection in project Railcraft by Railcraft.
the class TrackKitSwitchTurnout method getCartsAtLockEntrance.
@Override
protected List<UUID> getCartsAtLockEntrance() {
EnumRailDirection dir = getRailDirectionRaw();
BlockPos offset = getPos();
if (dir == EnumRailDirection.NORTH_SOUTH) {
offset = isReversed() != isMirrored() ? offset.south() : offset.north();
} else if (dir == EnumRailDirection.EAST_WEST) {
offset = isReversed() == isMirrored() ? offset.east() : offset.west();
}
return CartTools.getMinecartUUIDsAt(theWorldAsserted(), offset, 0.1f);
}
use of net.minecraft.block.BlockRailBase.EnumRailDirection in project Railcraft by Railcraft.
the class TrackKitSwitchWye method getCartsAtLockEntrance.
@Override
protected List<UUID> getCartsAtLockEntrance() {
EnumRailDirection dir = getRailDirectionRaw();
BlockPos offset = getPos();
if (dir == EnumRailDirection.EAST_WEST) {
if (isMirrored()) {
offset = offset.west();
} else {
offset = offset.east();
}
} else if (dir == EnumRailDirection.NORTH_SOUTH) {
if (isMirrored()) {
offset = offset.south();
} else {
offset = offset.north();
}
}
return CartTools.getMinecartUUIDsAt(theWorldAsserted(), offset, 0.1f);
}
use of net.minecraft.block.BlockRailBase.EnumRailDirection in project Railcraft by Railcraft.
the class TrackKitSwitchWye method getCartsAtDecisionEntrance.
@Override
protected List<UUID> getCartsAtDecisionEntrance() {
EnumRailDirection dir = getRailDirectionRaw();
BlockPos offset = getPos();
if (dir == EnumRailDirection.EAST_WEST) {
if (isMirrored()) {
offset = offset.north();
} else {
offset = offset.south();
}
} else if (dir == EnumRailDirection.NORTH_SOUTH) {
if (isMirrored()) {
offset = offset.west();
} else {
offset = offset.east();
}
}
return CartTools.getMinecartUUIDsAt(theWorldAsserted(), offset, 0.1f);
}
Aggregations