Creates a 4-chunk space in the end around 0,0

Allows ender dragon to spawn and exit island to be placed and may
prevent crashes. To be tested.
This commit is contained in:
tastybento 2019-02-05 23:32:21 -08:00
parent fedd660bcb
commit 34696fa642
2 changed files with 13 additions and 0 deletions

3
.gitignore vendored
View File

@ -22,3 +22,6 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/target/
/.DS_Store
/.classpath
/.project

View File

@ -82,6 +82,16 @@ public class ChunkGeneratorWorld extends ChunkGenerator
}
else if (world.getEnvironment().equals(World.Environment.THE_END))
{
// This will leave a hollow space of 4 chunks around 0,0 for the nether exit island to be able to be placed
if ((chunkX == 0 && chunkZ == 0) || (chunkX == -1 && chunkZ == 0) || (chunkX == 0 && chunkZ == -1) || (chunkX == -1 && chunkZ == -1)) {
// Set the block to have the island high up
if (chunkX == 0 && chunkZ == 0)
{
result.setBlock(0, 255, 0, Material.BEDROCK);
}
return result;
}
this.populateTheEndChunk(result);
}
else