Skip to content

Commit

Permalink
Ensure the post has a clear view of the sky. Fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
RoboMWM committed Sep 16, 2016
1 parent 426466a commit 51b62f0
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
# ZEINTELLIJ
workspace.xml
tasks.xml
.idea/libraries
.idea/copyright
out/
target/
*.MF
*.name
.idea
*.iml
12 changes: 11 additions & 1 deletion src/me/ryanhamshire/PopulationDensity/DataStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,17 @@ else if(blockType == Material.BEDROCK)
}
}
}


//Sometimes we don't clear high enough thanks to new ultra tall trees in jungle biomes
//Instead of attempting to clear up to nearly 110 * 4 blocks more, we'll just see what getHighestBlockYAt returns
//If it doesn't return our post's y location, we're setting it to air, and will check again.
int highestBlockY = PopulationDensity.ManagedWorld.getHighestBlockYAt(x, z);
while (highestBlockY > y)
{
PopulationDensity.ManagedWorld.getBlockAt(x, highestBlockY, z).setType(Material.AIR);
highestBlockY = PopulationDensity.ManagedWorld.getHighestBlockYAt(x, z);
}

//build top block
PopulationDensity.ManagedWorld.getBlockAt(x, y + 3, z).setTypeIdAndData(PopulationDensity.instance.postTopperId, PopulationDensity.instance.postTopperData.byteValue(), true);

Expand Down

0 comments on commit 51b62f0

Please sign in to comment.