Skip to content

Commit

Permalink
Optimize tile rail augments further
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam committed Mar 25, 2020
1 parent fa47eb8 commit 99bd87e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class TileRailBase extends BlockEntityTrackTickable implements IRedstoneP
private Vec3i parent;
private float bedHeight = 0;
private float railHeight = 0;
private Augment augment;
private Augment augment;
private String augmentFilterID;
private int snowLayers = 0;
protected boolean flexible = false;
Expand Down Expand Up @@ -444,7 +444,7 @@ public <T extends EntityRollingStock> T getStockNearBy(Class<T> type){
bbMax = new Vec3d(this.pos.up(3).east().north()).max(new Vec3d(this.pos.south().west()));
bbMin = new Vec3d(this.pos.up(3).east().north()).min(new Vec3d(this.pos.south().west()));
}
return stock.getBounds().intersects(bbMin, bbMax);
return stock.getPosition().distanceTo(new Vec3d(this.pos)) < 32 && stock.getBounds().intersects(bbMin, bbMax);
}
return false;
}, type).stream().findFirst().orElse(null);
Expand Down

0 comments on commit 99bd87e

Please sign in to comment.