Skip to content

Commit

Permalink
Changed clearArea Exception Logic
Browse files Browse the repository at this point in the history
Made exception to allow break-block placement to clear snow from the specific tiles where the rails are to be built. This solves the existing issue that made creative track building through snowy areas tedious and required manual snow harvesting.
  • Loading branch information
km00700 committed Mar 24, 2024
1 parent ccdc1d5 commit 33d39cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ public void setDrops(List<ItemStack> drops) {
this.drops = drops;
}

public void clearArea() {
public void clearArea() { // Clear 6-block tall right-of-way ignoring snow UNLESS the snow directly intersects with the location of a future track tile.
for (TrackBase track : tracks) {
for (int i = 0; i < 6 * info.settings.gauge.scale(); i++) {
Vec3i main = track.getPos().up(i);
if (!ITrack.isRail(world, main) && !world.isSnow(main)) {
if (!ITrack.isRail(world, main) && (i == 0 || !world.isSnow(main))) {
world.setToAir(main);
}
if (info.settings.gauge.isModel() && ConfigDamage.enableSideBlockClearing && info.settings.type != TrackItems.SLOPE && info.settings.type != TrackItems.TURNTABLE) {
Expand Down

0 comments on commit 33d39cf

Please sign in to comment.