Init fixes
This commit is contained in:
parent
683427c312
commit
0acb947795
2 changed files with 14 additions and 14 deletions
|
@ -32,6 +32,14 @@ public class BiomeAPI {
|
||||||
*/
|
*/
|
||||||
public static final BCLBiome EMPTY_BIOME = new BCLBiome(Biomes.THE_VOID.location(), BuiltinRegistries.BIOME.get(Biomes.THE_VOID), 1, 0);
|
public static final BCLBiome EMPTY_BIOME = new BCLBiome(Biomes.THE_VOID.location(), BuiltinRegistries.BIOME.get(Biomes.THE_VOID), 1, 0);
|
||||||
|
|
||||||
|
public static final BiomePicker NETHER_BIOME_PICKER = new BiomePicker();
|
||||||
|
public static final BiomePicker END_LAND_BIOME_PICKER = new BiomePicker();
|
||||||
|
public static final BiomePicker END_VOID_BIOME_PICKER = new BiomePicker();
|
||||||
|
|
||||||
|
private static final Map<ResourceLocation, BCLBiome> ID_MAP = Maps.newHashMap();
|
||||||
|
private static final Map<Biome, BCLBiome> CLIENT = Maps.newHashMap();
|
||||||
|
private static Registry<Biome> biomeRegistry;
|
||||||
|
|
||||||
public static final BCLBiome NETHER_WASTES_BIOME = registerNetherBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("nether_wastes")));
|
public static final BCLBiome NETHER_WASTES_BIOME = registerNetherBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("nether_wastes")));
|
||||||
public static final BCLBiome CRIMSON_FOREST_BIOME = registerNetherBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("crimson_forest")));
|
public static final BCLBiome CRIMSON_FOREST_BIOME = registerNetherBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("crimson_forest")));
|
||||||
public static final BCLBiome WARPED_FOREST_BIOME = registerNetherBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("warped_forest")));
|
public static final BCLBiome WARPED_FOREST_BIOME = registerNetherBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("warped_forest")));
|
||||||
|
@ -45,18 +53,6 @@ public class BiomeAPI {
|
||||||
public static final BCLBiome END_BARRENS = registerEndVoidBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("end_barrens")));
|
public static final BCLBiome END_BARRENS = registerEndVoidBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("end_barrens")));
|
||||||
public static final BCLBiome SMALL_END_ISLANDS = registerEndVoidBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("small_end_islands")));
|
public static final BCLBiome SMALL_END_ISLANDS = registerEndVoidBiome(BuiltinRegistries.BIOME.get(new ResourceLocation("small_end_islands")));
|
||||||
|
|
||||||
private static final Map<ResourceLocation, BCLBiome> NETHER_BIOMES = Maps.newHashMap();
|
|
||||||
private static final Map<ResourceLocation, BCLBiome> END_LAND_BIOMES = Maps.newHashMap();
|
|
||||||
private static final Map<ResourceLocation, BCLBiome> END_VOID_BIOMES = Maps.newHashMap();
|
|
||||||
|
|
||||||
public static final BiomePicker NETHER_BIOME_PICKER = new BiomePicker();
|
|
||||||
public static final BiomePicker END_LAND_BIOME_PICKER = new BiomePicker();
|
|
||||||
public static final BiomePicker END_VOID_BIOME_PICKER = new BiomePicker();
|
|
||||||
|
|
||||||
private static final Map<ResourceLocation, BCLBiome> ID_MAP = Maps.newHashMap();
|
|
||||||
private static final Map<Biome, BCLBiome> CLIENT = Maps.newHashMap();
|
|
||||||
private static Registry<Biome> biomeRegistry;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize registry for current server.
|
* Initialize registry for current server.
|
||||||
*
|
*
|
||||||
|
@ -332,10 +328,10 @@ public class BiomeAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNetherBiome(ResourceLocation biomeID) {
|
public static boolean isNetherBiome(ResourceLocation biomeID) {
|
||||||
return NETHER_BIOMES.containsKey(biomeID);
|
return NETHER_BIOME_PICKER.contains(biomeID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEndBiome(ResourceLocation biomeID) {
|
public static boolean isEndBiome(ResourceLocation biomeID) {
|
||||||
return END_LAND_BIOMES.containsKey(biomeID) || END_VOID_BIOMES.containsKey(biomeID);
|
return END_LAND_BIOME_PICKER.contains(biomeID) || END_VOID_BIOME_PICKER.contains(biomeID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,10 @@ public class BiomePicker {
|
||||||
return immutableIDs.contains(id);
|
return immutableIDs.contains(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean contains(ResourceLocation id) {
|
||||||
|
return biomes.contains(id);
|
||||||
|
}
|
||||||
|
|
||||||
public void removeMutableBiome(ResourceLocation id) {
|
public void removeMutableBiome(ResourceLocation id) {
|
||||||
for (int i = biomeCount; i < biomes.size(); i++) {
|
for (int i = biomeCount; i < biomes.size(); i++) {
|
||||||
BCLBiome biome = biomes.get(i);
|
BCLBiome biome = biomes.get(i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue