Glowing Grasslands ambient, biome structures fix
This commit is contained in:
parent
53e0773e5d
commit
74fbcdaeb2
8 changed files with 42 additions and 4 deletions
|
@ -9,6 +9,8 @@ import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.world.biome.Biome;
|
import net.minecraft.world.biome.Biome;
|
||||||
import net.minecraft.world.gen.GenerationStep;
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
|
import ru.betterend.BetterEnd;
|
||||||
|
import ru.betterend.world.biome.BiomeDefinition;
|
||||||
import ru.betterend.world.biome.EndBiome;
|
import ru.betterend.world.biome.EndBiome;
|
||||||
import ru.betterend.world.features.BlueVineFeature;
|
import ru.betterend.world.features.BlueVineFeature;
|
||||||
import ru.betterend.world.features.CavePlantFeature;
|
import ru.betterend.world.features.CavePlantFeature;
|
||||||
|
@ -170,6 +172,10 @@ public class EndFeatures {
|
||||||
public static final EndFeature SILK_MOTH_NEST = EndFeature.makeChansedFeature("silk_moth_nest", new SilkMothNestFeature(), 2);
|
public static final EndFeature SILK_MOTH_NEST = EndFeature.makeChansedFeature("silk_moth_nest", new SilkMothNestFeature(), 2);
|
||||||
|
|
||||||
public static void registerBiomeFeatures(Identifier id, Biome biome, List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
public static void registerBiomeFeatures(Identifier id, Biome biome, List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
||||||
|
if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (GeneratorOptions.removeChorusFromVanillaBiomes()) {
|
if (GeneratorOptions.removeChorusFromVanillaBiomes()) {
|
||||||
if (id.getNamespace().equals("minecraft")) {
|
if (id.getNamespace().equals("minecraft")) {
|
||||||
String path = id.getPath();
|
String path = id.getPath();
|
||||||
|
@ -203,6 +209,18 @@ public class EndFeatures {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void addDefaultFeatures(BiomeDefinition def) {
|
||||||
|
def.addFeature(FLAVOLITE_LAYER);
|
||||||
|
def.addFeature(THALLASIUM_ORE);
|
||||||
|
def.addFeature(ENDER_ORE);
|
||||||
|
def.addFeature(CRASHED_SHIP);
|
||||||
|
|
||||||
|
if (def.hasCaves()) {
|
||||||
|
def.addFeature(ROUND_CAVE_RARE);
|
||||||
|
def.addFeature(CAVE_GRASS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void addFeature(EndFeature feature, List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
private static void addFeature(EndFeature feature, List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
||||||
int index = feature.getFeatureStep().ordinal();
|
int index = feature.getFeatureStep().ordinal();
|
||||||
if (features.size() > index) {
|
if (features.size() > index) {
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class EndSounds {
|
||||||
public static final SoundEvent AMBIENT_BLOSSOMING_SPIRES = register("ambient", "blossoming_spires");
|
public static final SoundEvent AMBIENT_BLOSSOMING_SPIRES = register("ambient", "blossoming_spires");
|
||||||
public static final SoundEvent AMBIENT_SULPHUR_SPRINGS = register("ambient", "sulphur_springs");
|
public static final SoundEvent AMBIENT_SULPHUR_SPRINGS = register("ambient", "sulphur_springs");
|
||||||
public static final SoundEvent AMBIENT_UMBRELLA_JUNGLE = register("ambient", "umbrella_jungle");
|
public static final SoundEvent AMBIENT_UMBRELLA_JUNGLE = register("ambient", "umbrella_jungle");
|
||||||
|
public static final SoundEvent AMBIENT_GLOWING_GRASSLANDS = register("ambient", "glowing_grasslands");
|
||||||
|
|
||||||
// Entity
|
// Entity
|
||||||
public static final SoundEvent ENTITY_DRAGONFLY = register("entity", "dragonfly");
|
public static final SoundEvent ENTITY_DRAGONFLY = register("entity", "dragonfly");
|
||||||
|
|
|
@ -35,6 +35,7 @@ import net.minecraft.world.gen.surfacebuilder.ConfiguredSurfaceBuilders;
|
||||||
import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder;
|
import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder;
|
||||||
import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig;
|
import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.util.MHelper;
|
import ru.betterend.util.MHelper;
|
||||||
import ru.betterend.world.features.EndFeature;
|
import ru.betterend.world.features.EndFeature;
|
||||||
import ru.betterend.world.structures.EndStructureFeature;
|
import ru.betterend.world.structures.EndStructureFeature;
|
||||||
|
@ -233,6 +234,7 @@ public class BiomeDefinition {
|
||||||
spawnSettings.spawn(entry.type.getSpawnGroup(), entry);
|
spawnSettings.spawn(entry.type.getSpawnGroup(), entry);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EndFeatures.addDefaultFeatures(this);
|
||||||
generationSettings.surfaceBuilder(surface == null ? ConfiguredSurfaceBuilders.END : surface);
|
generationSettings.surfaceBuilder(surface == null ? ConfiguredSurfaceBuilders.END : surface);
|
||||||
structures.forEach((structure) -> generationSettings.structureFeature(structure));
|
structures.forEach((structure) -> generationSettings.structureFeature(structure));
|
||||||
features.forEach((info) -> generationSettings.feature(info.featureStep, info.feature));
|
features.forEach((info) -> generationSettings.feature(info.featureStep, info.feature));
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.biome;
|
package ru.betterend.world.biome;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
|
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.registry.EndParticles;
|
import ru.betterend.registry.EndParticles;
|
||||||
|
@ -34,6 +35,7 @@ public class BiomeUmbrellaJungle extends EndBiome {
|
||||||
.addFeature(EndFeatures.CHARNIA_GREEN)
|
.addFeature(EndFeatures.CHARNIA_GREEN)
|
||||||
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||||
.addFeature(EndFeatures.CHARNIA_RED_RARE)
|
.addFeature(EndFeatures.CHARNIA_RED_RARE)
|
||||||
|
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||||
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
|
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -38,23 +38,23 @@ public class EndBiome {
|
||||||
private Biome actualBiome;
|
private Biome actualBiome;
|
||||||
|
|
||||||
public EndBiome(BiomeDefinition definition) {
|
public EndBiome(BiomeDefinition definition) {
|
||||||
this.biome = definition.build();
|
|
||||||
this.mcID = definition.getID();
|
this.mcID = definition.getID();
|
||||||
|
this.readStructureList();
|
||||||
|
this.biome = definition.build();
|
||||||
this.fogDensity = Configs.BIOME_CONFIG.getFloat(mcID, "fog_density", definition.getFodDensity());
|
this.fogDensity = Configs.BIOME_CONFIG.getFloat(mcID, "fog_density", definition.getFodDensity());
|
||||||
this.genChanceUnmutable = Configs.BIOME_CONFIG.getFloat(mcID, "generation_chance", definition.getGenChance());
|
this.genChanceUnmutable = Configs.BIOME_CONFIG.getFloat(mcID, "generation_chance", definition.getGenChance());
|
||||||
this.hasCaves = Configs.BIOME_CONFIG.getBoolean(mcID, "has_caves", definition.hasCaves());
|
this.hasCaves = Configs.BIOME_CONFIG.getBoolean(mcID, "has_caves", definition.hasCaves());
|
||||||
this.edgeSize = Configs.BIOME_CONFIG.getInt(mcID, "edge_size", 32);
|
this.edgeSize = Configs.BIOME_CONFIG.getInt(mcID, "edge_size", 32);
|
||||||
readStructureList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EndBiome(Identifier id, Biome biome, float fogDensity, float genChance, boolean hasCaves) {
|
public EndBiome(Identifier id, Biome biome, float fogDensity, float genChance, boolean hasCaves) {
|
||||||
this.biome = biome;
|
|
||||||
this.mcID = id;
|
this.mcID = id;
|
||||||
|
this.readStructureList();
|
||||||
|
this.biome = biome;
|
||||||
this.fogDensity = Configs.BIOME_CONFIG.getFloat(mcID, "fog_density", fogDensity);
|
this.fogDensity = Configs.BIOME_CONFIG.getFloat(mcID, "fog_density", fogDensity);
|
||||||
this.genChanceUnmutable = Configs.BIOME_CONFIG.getFloat(mcID, "generation_chance", genChance);
|
this.genChanceUnmutable = Configs.BIOME_CONFIG.getFloat(mcID, "generation_chance", genChance);
|
||||||
this.hasCaves = Configs.BIOME_CONFIG.getBoolean(mcID, "has_caves", hasCaves);
|
this.hasCaves = Configs.BIOME_CONFIG.getBoolean(mcID, "has_caves", hasCaves);
|
||||||
this.edgeSize = Configs.BIOME_CONFIG.getInt(mcID, "edge_size", 32);
|
this.edgeSize = Configs.BIOME_CONFIG.getInt(mcID, "edge_size", 32);
|
||||||
readStructureList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EndBiome getEdge() {
|
public EndBiome getEdge() {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.biome;
|
package ru.betterend.world.biome;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
|
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.registry.EndParticles;
|
import ru.betterend.registry.EndParticles;
|
||||||
|
@ -13,7 +14,10 @@ public class GlowingGrasslandsBiome extends EndBiome {
|
||||||
.setFogDensity(1.3F)
|
.setFogDensity(1.3F)
|
||||||
.setParticles(EndParticles.FIREFLY, 0.001F)
|
.setParticles(EndParticles.FIREFLY, 0.001F)
|
||||||
.setMusic(EndSounds.MUSIC_OPENSPACE)
|
.setMusic(EndSounds.MUSIC_OPENSPACE)
|
||||||
|
.setLoop(EndSounds.AMBIENT_GLOWING_GRASSLANDS)
|
||||||
.setSurface(EndBlocks.END_MOSS)
|
.setSurface(EndBlocks.END_MOSS)
|
||||||
|
.setWaterAndFogColor(92, 250, 230)
|
||||||
|
.setPlantsColor(73, 210, 209)
|
||||||
.addFeature(EndFeatures.END_LAKE_RARE)
|
.addFeature(EndFeatures.END_LAKE_RARE)
|
||||||
.addFeature(EndFeatures.LUMECORN)
|
.addFeature(EndFeatures.LUMECORN)
|
||||||
.addFeature(EndFeatures.BLOOMING_COOKSONIA)
|
.addFeature(EndFeatures.BLOOMING_COOKSONIA)
|
||||||
|
@ -27,6 +31,7 @@ public class GlowingGrasslandsBiome extends EndBiome {
|
||||||
.addFeature(EndFeatures.CHARNIA_GREEN)
|
.addFeature(EndFeatures.CHARNIA_GREEN)
|
||||||
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||||
.addFeature(EndFeatures.CHARNIA_RED_RARE)
|
.addFeature(EndFeatures.CHARNIA_RED_RARE)
|
||||||
|
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||||
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
|
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,6 +174,16 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"betterend.ambient.glowing_grasslands": {
|
||||||
|
"category": "ambient",
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "betterend:ambient/glowing_grasslands",
|
||||||
|
"volume": 1.0,
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
"betterend.entity.dragonfly": {
|
"betterend.entity.dragonfly": {
|
||||||
"category": "entity",
|
"category": "entity",
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue