Use a proper registry for biomes

This commit is contained in:
Matthew Miller
2019-02-16 17:27:00 +10:00
parent d6bc85ccbe
commit 1b101740fe
33 changed files with 314 additions and 326 deletions

View File

@ -19,10 +19,8 @@
package com.sk89q.worldedit.world.registry;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeData;
import java.util.List;
import com.sk89q.worldedit.world.biome.BiomeType;
import javax.annotation.Nullable;
@ -31,22 +29,6 @@ import javax.annotation.Nullable;
*/
public interface BiomeRegistry {
/**
* Create a new biome given its biome ID.
*
* @param id its biome ID
* @return a new biome or null if it can't be created
*/
@Nullable
BaseBiome createFromId(int id);
/**
* Get a list of available biomes.
*
* @return a list of biomes
*/
List<BaseBiome> getBiomes();
/**
* Get data about a biome.
*
@ -54,6 +36,6 @@ public interface BiomeRegistry {
* @return a data object or null if information is not known
*/
@Nullable
BiomeData getData(BaseBiome biome);
BiomeData getData(BiomeType biome);
}

View File

@ -19,11 +19,8 @@
package com.sk89q.worldedit.world.registry;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeData;
import java.util.Collections;
import java.util.List;
import com.sk89q.worldedit.world.biome.BiomeType;
import javax.annotation.Nullable;
@ -40,18 +37,7 @@ public class NullBiomeRegistry implements BiomeRegistry {
@Nullable
@Override
public BaseBiome createFromId(int id) {
return null;
}
@Override
public List<BaseBiome> getBiomes() {
return Collections.emptyList();
}
@Nullable
@Override
public BiomeData getData(BaseBiome biome) {
public BiomeData getData(BiomeType biome) {
return null;
}