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:
parent
fedd660bcb
commit
34696fa642
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue