Browse Source

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

keep-around/719d326f7e5eab0607fb2038387055dc998f1804
Giovanni Harting 4 years ago
parent
commit
805eb1f5f3
Signed by: anonfunc GPG Key ID: 597FC6BA3AA9A919
2 changed files with 5 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +4
    -0
      src/main/java/com/sosnitzka/taiga/util/Generator.java

+ 1
- 0
.gitignore 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/


+ 4
- 0
src/main/java/com/sosnitzka/taiga/util/Generator.java 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())))


Loading…
Cancel
Save