mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
Use a proper registry for biomes
This commit is contained in:
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user