diff options
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/world/VoidGenerator.java')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/world/VoidGenerator.java | 65 |
1 files changed, 17 insertions, 48 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/world/VoidGenerator.java b/src/main/java/net/tylermurphy/hideAndSeek/world/VoidGenerator.java index b0ce824..4f9ad0d 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/world/VoidGenerator.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/world/VoidGenerator.java @@ -1,25 +1,8 @@ -/* - * This file is part of Kenshins Hide and Seek - * - * Copyright (c) 2021 Tyler Murphy. - * - * Kenshins Hide and Seek free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * he Free Software Foundation version 3. - * - * Kenshins Hide and Seek is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ - package net.tylermurphy.hideAndSeek.world; +import org.bukkit.Location; import org.bukkit.World; +import org.bukkit.block.Biome; import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.ChunkGenerator; import org.jetbrains.annotations.NotNull; @@ -36,41 +19,27 @@ public class VoidGenerator extends ChunkGenerator { return Collections.emptyList(); } - public boolean shouldGenerateNoise() { - return false; - } - - public boolean shouldGenerateSurface() { - return false; - } - - public boolean shouldGenerateBedrock() { - return false; - } - - public boolean shouldGenerateCaves() { - return false; - } - - public boolean shouldGenerateDecorations() { - return false; + @Override + public boolean canSpawn(World world, int x, int z) { + return true; } - public boolean shouldGenerateMobs() { - return false; + @Override + public Location getFixedSpawnLocation(World world, Random random) { + return new Location(world, 0, 100, 0); } - public boolean shouldGenerateStructures() { - return false; - } + // 1.13 And Prev + public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biome) { + ChunkData chunkData = super.createChunkData(world); - public boolean canSpawn(@NotNull World world, int x, int z) { - return true; - } + for(int x = 0; x < 16; x++) { + for(int z = 0; z < 16; z++) { + biome.setBiome(x, z, Biome.PLAINS); + } + } - // 1.13 And Prev - public @NotNull ChunkData generateChunkData(@NotNull World world, @NotNull Random random, int x, int z, @NotNull BiomeGrid biome) { - return createChunkData(world); + return chunkData; } // 1.8 |