Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Repair map decay at large heights
Browse files Browse the repository at this point in the history
  • Loading branch information
kNoAPP committed Oct 15, 2020
1 parent cd7225c commit c1c98f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/knoban/obw/map/GameMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ else if(percent < 0f)
if(decayAmount > lowestStableXRel) {
for(int i=lowestStableXRel; i<decayAmount; i++) {
int x = origin.getBlockX() + i;
for(int y=0; y<=world.getHighestBlockYAt(x, 0); y++) {
for(int y=0; y<=world.getHighestBlockYAt(x, origin.getBlockZ()); y++) {
Block b = world.getBlockAt(x, y, origin.getBlockZ());
if(y%3==0)
b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());
Expand All @@ -328,7 +328,7 @@ else if(percent < 0f)

for(int i=lowestStableXRel; i<decayAmount; i++) {
int x = origin.getBlockX() + (length-1) - i;
for(int y=0; y<=world.getHighestBlockYAt(x, 0); y++) {
for(int y=0; y<=world.getHighestBlockYAt(x, origin.getBlockZ()); y++) {
Block b = world.getBlockAt(x, y, origin.getBlockZ());
if(y%3==0)
b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());
Expand Down

0 comments on commit c1c98f1

Please sign in to comment.