Structures for gardens, fixed worldgen issue

This commit is contained in:
paulevsGitch 2020-12-20 17:25:52 +03:00
parent adf1cafaac
commit bf9e560d29
9 changed files with 16 additions and 3 deletions

View file

@ -26,8 +26,8 @@ public class OldBulbisGardens extends EndBiome {
SoundEvent mood = biome.getMoodSound().get().getSound(); SoundEvent mood = biome.getMoodSound().get().getSound();
BiomeDefinition def = new BiomeDefinition("old_bulbis_gardens") BiomeDefinition def = new BiomeDefinition("old_bulbis_gardens")
.setFogColor(132, 0, 202) .setFogColor(215, 132, 182)
.setFogDensity(2F) .setFogDensity(1.8F)
.setWaterAndFogColor(40, 0, 56) .setWaterAndFogColor(40, 0, 56)
.setFoliageColor(122, 17, 155) .setFoliageColor(122, 17, 155)
.setParticles(ParticleTypes.REVERSE_PORTAL, 0.002F) .setParticles(ParticleTypes.REVERSE_PORTAL, 0.002F)

View file

@ -50,6 +50,7 @@ public class EndBiomes {
private static final HashMap<Identifier, EndBiome> ID_MAP = Maps.newHashMap(); private static final HashMap<Identifier, EndBiome> ID_MAP = Maps.newHashMap();
private static final HashMap<Biome, EndBiome> CLIENT = Maps.newHashMap(); private static final HashMap<Biome, EndBiome> CLIENT = Maps.newHashMap();
public static final Set<Identifier> FABRIC_VOID = Sets.newHashSet(); public static final Set<Identifier> FABRIC_VOID = Sets.newHashSet();
private static final Set<Identifier> SUBBIOMES_UNMUTABLES = Sets.newHashSet();
public static final BiomePicker LAND_BIOMES = new BiomePicker(); public static final BiomePicker LAND_BIOMES = new BiomePicker();
public static final BiomePicker VOID_BIOMES = new BiomePicker(); public static final BiomePicker VOID_BIOMES = new BiomePicker();
@ -103,7 +104,7 @@ public class EndBiomes {
if (biome.getCategory() == Category.THEEND) { if (biome.getCategory() == Category.THEEND) {
Identifier id = biomeRegistry.getId(biome); Identifier id = biomeRegistry.getId(biome);
if (Configs.BIOME_CONFIG.getBoolean(id, "enabled", true)) { if (Configs.BIOME_CONFIG.getBoolean(id, "enabled", true)) {
if (!LAND_BIOMES.containsImmutable(id) && !VOID_BIOMES.containsImmutable(id)) { if (!LAND_BIOMES.containsImmutable(id) && !VOID_BIOMES.containsImmutable(id) && !SUBBIOMES_UNMUTABLES.contains(id)) {
JsonObject config = configs.get(id.getNamespace()); JsonObject config = configs.get(id.getNamespace());
if (config == null) { if (config == null) {
config = loadJsonConfig(id.getNamespace()); config = loadJsonConfig(id.getNamespace());
@ -252,6 +253,7 @@ public class EndBiomes {
if (Configs.BIOME_CONFIG.getBoolean(endBiome.getID(), "enabled", true)) { if (Configs.BIOME_CONFIG.getBoolean(endBiome.getID(), "enabled", true)) {
parent.addSubBiome(endBiome); parent.addSubBiome(endBiome);
SUBBIOMES.add(endBiome); SUBBIOMES.add(endBiome);
SUBBIOMES_UNMUTABLES.add(endBiome.getID());
ID_MAP.put(endBiome.getID(), endBiome); ID_MAP.put(endBiome.getID(), endBiome);
} }
return endBiome; return endBiome;
@ -268,6 +270,7 @@ public class EndBiomes {
if (Configs.BIOME_CONFIG.getBoolean(biome.getID(), "enabled", true)) { if (Configs.BIOME_CONFIG.getBoolean(biome.getID(), "enabled", true)) {
parent.addSubBiome(biome); parent.addSubBiome(biome);
SUBBIOMES.add(biome); SUBBIOMES.add(biome);
SUBBIOMES_UNMUTABLES.add(biome.getID());
ID_MAP.put(biome.getID(), biome); ID_MAP.put(biome.getID(), biome);
addLandBiomeToFabricApi(biome); addLandBiomeToFabricApi(biome);
} }

View file

@ -0,0 +1,10 @@
{
"structures": [
{ "nbt": "fallen_tree_1", "offsetY": 0, "terrainMerge": "none" },
{ "nbt": "fallen_tree_2", "offsetY": 0, "terrainMerge": "none" },
{ "nbt": "fallen_tree_3", "offsetY": 0, "terrainMerge": "none" },
{ "nbt": "tree_stump_1", "offsetY": 0, "terrainMerge": "surface" },
{ "nbt": "tree_stump_2", "offsetY": 0, "terrainMerge": "surface" },
{ "nbt": "tree_stump_3", "offsetY": 0, "terrainMerge": "surface" }
]
}