Last active
December 11, 2015 16:38
-
-
Save avafloww/4629012 to your computer and use it in GitHub Desktop.
Revisions
-
Devin Ryan revised this gist
Jan 24, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ package com.forairan.mapstudio.world; import java.util.Random; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.generator.ChunkGenerator; @@ -13,7 +14,7 @@ public Location getFixedSpawnLocation(World world, Random random) { @Override public byte[][] generateBlockSections(World world, Random random, int x, int z, BiomeGrid biomes) { byte[][] result = new byte[16][]; if (x == 0 && z == 0) { setBlock(result, 0, 64, 0, (byte) 1); -
Devin Ryan created this gist
Jan 24, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ package com.forairan.mapstudio.world; import java.util.Random; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.generator.ChunkGenerator; public class VoidGenerator extends ChunkGenerator { @Override public Location getFixedSpawnLocation(World world, Random random) { return new Location(world, 0, 65, 0); } @Override public byte[][] generateBlockSections(World world, Random random, int x, int z, BiomeGrid biomes) { byte[][] result = null; if (x == 0 && z == 0) { setBlock(result, 0, 64, 0, (byte) 1); } return result; } public void setBlock(byte[][] result, int x, int y, int z, byte blkid) { if (result[y >> 4] == null) { result[y >> 4] = new byte[4096]; } result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid; } }