Break out of meteor generation if we are in a void dim 92; Added a file type to gitignore

This commit is contained in:
2017-01-04 04:02:11 +01:00
parent 2418918ebd
commit 805eb1f5f3
2 changed files with 5 additions and 0 deletions

1
.gitignore vendored
View File

@@ -172,6 +172,7 @@ gradle-app.setting
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
*.hprof
# Forge
run/

View File

@@ -198,6 +198,10 @@ public class Generator {
// we are in mid air, go down
while (world.getBlockState(cPos.down()).equals(Blocks.AIR.getDefaultState())) {
cPos = cPos.down();
// if we are below 0, we might be in a void dim
if (cPos.getY() < 0)
break;
}
}
if (!validSurface.contains(Item.getItemFromBlock(world.getBlockState(cPos.down()).getBlock())))