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.gen.GenerationStep;
|
||||
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.features.BlueVineFeature;
|
||||
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 void registerBiomeFeatures(Identifier id, Biome biome, List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
||||
if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (GeneratorOptions.removeChorusFromVanillaBiomes()) {
|
||||
if (id.getNamespace().equals("minecraft")) {
|
||||
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) {
|
||||
int index = feature.getFeatureStep().ordinal();
|
||||
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_SULPHUR_SPRINGS = register("ambient", "sulphur_springs");
|
||||
public static final SoundEvent AMBIENT_UMBRELLA_JUNGLE = register("ambient", "umbrella_jungle");
|
||||
public static final SoundEvent AMBIENT_GLOWING_GRASSLANDS = register("ambient", "glowing_grasslands");
|
||||
|
||||
// Entity
|
||||
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.TernarySurfaceConfig;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
import ru.betterend.util.MHelper;
|
||||
import ru.betterend.world.features.EndFeature;
|
||||
import ru.betterend.world.structures.EndStructureFeature;
|
||||
|
@ -233,6 +234,7 @@ public class BiomeDefinition {
|
|||
spawnSettings.spawn(entry.type.getSpawnGroup(), entry);
|
||||
});
|
||||
|
||||
EndFeatures.addDefaultFeatures(this);
|
||||
generationSettings.surfaceBuilder(surface == null ? ConfiguredSurfaceBuilders.END : surface);
|
||||
structures.forEach((structure) -> generationSettings.structureFeature(structure));
|
||||
features.forEach((info) -> generationSettings.feature(info.featureStep, info.feature));
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ru.betterend.world.biome;
|
||||
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
|
@ -34,6 +35,7 @@ public class BiomeUmbrellaJungle extends EndBiome {
|
|||
.addFeature(EndFeatures.CHARNIA_GREEN)
|
||||
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||
.addFeature(EndFeatures.CHARNIA_RED_RARE)
|
||||
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
|
||||
}
|
||||
}
|
|
@ -38,23 +38,23 @@ public class EndBiome {
|
|||
private Biome actualBiome;
|
||||
|
||||
public EndBiome(BiomeDefinition definition) {
|
||||
this.biome = definition.build();
|
||||
this.mcID = definition.getID();
|
||||
this.readStructureList();
|
||||
this.biome = definition.build();
|
||||
this.fogDensity = Configs.BIOME_CONFIG.getFloat(mcID, "fog_density", definition.getFodDensity());
|
||||
this.genChanceUnmutable = Configs.BIOME_CONFIG.getFloat(mcID, "generation_chance", definition.getGenChance());
|
||||
this.hasCaves = Configs.BIOME_CONFIG.getBoolean(mcID, "has_caves", definition.hasCaves());
|
||||
this.edgeSize = Configs.BIOME_CONFIG.getInt(mcID, "edge_size", 32);
|
||||
readStructureList();
|
||||
}
|
||||
|
||||
public EndBiome(Identifier id, Biome biome, float fogDensity, float genChance, boolean hasCaves) {
|
||||
this.biome = biome;
|
||||
this.mcID = id;
|
||||
this.readStructureList();
|
||||
this.biome = biome;
|
||||
this.fogDensity = Configs.BIOME_CONFIG.getFloat(mcID, "fog_density", fogDensity);
|
||||
this.genChanceUnmutable = Configs.BIOME_CONFIG.getFloat(mcID, "generation_chance", genChance);
|
||||
this.hasCaves = Configs.BIOME_CONFIG.getBoolean(mcID, "has_caves", hasCaves);
|
||||
this.edgeSize = Configs.BIOME_CONFIG.getInt(mcID, "edge_size", 32);
|
||||
readStructureList();
|
||||
}
|
||||
|
||||
public EndBiome getEdge() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ru.betterend.world.biome;
|
||||
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
|
@ -13,7 +14,10 @@ public class GlowingGrasslandsBiome extends EndBiome {
|
|||
.setFogDensity(1.3F)
|
||||
.setParticles(EndParticles.FIREFLY, 0.001F)
|
||||
.setMusic(EndSounds.MUSIC_OPENSPACE)
|
||||
.setLoop(EndSounds.AMBIENT_GLOWING_GRASSLANDS)
|
||||
.setSurface(EndBlocks.END_MOSS)
|
||||
.setWaterAndFogColor(92, 250, 230)
|
||||
.setPlantsColor(73, 210, 209)
|
||||
.addFeature(EndFeatures.END_LAKE_RARE)
|
||||
.addFeature(EndFeatures.LUMECORN)
|
||||
.addFeature(EndFeatures.BLOOMING_COOKSONIA)
|
||||
|
@ -27,6 +31,7 @@ public class GlowingGrasslandsBiome extends EndBiome {
|
|||
.addFeature(EndFeatures.CHARNIA_GREEN)
|
||||
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||
.addFeature(EndFeatures.CHARNIA_RED_RARE)
|
||||
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue