Skip to content

Commit

Permalink
Fix turn table floating track calcs
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam committed Jul 18, 2018
1 parent 0d97189 commit 6e0d454
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import cam72cam.immersiverailroading.track.BuilderTurn;
import cam72cam.immersiverailroading.track.TrackBase;
import cam72cam.immersiverailroading.track.TrackRail;
import cam72cam.immersiverailroading.util.BlockUtil;
import cam72cam.immersiverailroading.util.RailInfo;
import cam72cam.immersiverailroading.util.VecUtil;

Expand Down Expand Up @@ -317,7 +318,9 @@ public double percentFloating() {
if (!world.isBlockLoaded(tpos)) {
return 0;
}
boolean isOnRealBlock = world.isSideSolid(tpos, EnumFacing.UP, false) || !Config.ConfigDamage.requireSolidBlocks && !world.isAirBlock(tpos);
boolean isOnRealBlock = world.isSideSolid(tpos, EnumFacing.UP, false) ||
!Config.ConfigDamage.requireSolidBlocks && !world.isAirBlock(tpos) ||
BlockUtil.isIRRail(world, tpos);
if (!isOnRealBlock) {
floating += 1.0 / trackCheckCache.size();
}
Expand Down

0 comments on commit 6e0d454

Please sign in to comment.