Start migration
This commit is contained in:
parent
6630ce0cab
commit
47ed597358
491 changed files with 12045 additions and 11953 deletions
|
@ -2,9 +2,9 @@ package ru.betterend.world.biome.cave;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.util.collection.WeightedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.registry.EndBiomes;
|
||||
import ru.betterend.world.biome.BiomeDefinition;
|
||||
|
@ -15,44 +15,42 @@ import ru.betterend.world.features.terrain.caves.CaveChunkPopulatorFeature;
|
|||
public class EndCaveBiome extends EndBiome {
|
||||
private WeightedList<Feature<?>> floorFeatures = new WeightedList<Feature<?>>();
|
||||
private WeightedList<Feature<?>> ceilFeatures = new WeightedList<Feature<?>>();
|
||||
|
||||
|
||||
public EndCaveBiome(BiomeDefinition definition) {
|
||||
super(makeDef(definition));
|
||||
}
|
||||
|
||||
|
||||
private static BiomeDefinition makeDef(BiomeDefinition definition) {
|
||||
EndFeature feature = EndFeature.makeChunkFeature(
|
||||
definition.getID().getPath() + "_cave_populator",
|
||||
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) EndBiomes.getBiome(definition.getID()))
|
||||
);
|
||||
EndFeature feature = EndFeature.makeChunkFeature(definition.getID().getPath() + "_cave_populator",
|
||||
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) EndBiomes.getBiome(definition.getID())));
|
||||
definition.addFeature(feature).setCaveBiome();
|
||||
return definition;
|
||||
}
|
||||
|
||||
|
||||
public void addFloorFeature(Feature<?> feature, int weight) {
|
||||
floorFeatures.add(feature, weight);
|
||||
}
|
||||
|
||||
|
||||
public void addCeilFeature(Feature<?> feature, int weight) {
|
||||
ceilFeatures.add(feature, weight);
|
||||
}
|
||||
|
||||
|
||||
public Feature<?> getFloorFeature(Random random) {
|
||||
return floorFeatures.isEmpty() ? null : floorFeatures.pickRandom(random);
|
||||
}
|
||||
|
||||
|
||||
public Feature<?> getCeilFeature(Random random) {
|
||||
return ceilFeatures.isEmpty() ? null : ceilFeatures.pickRandom(random);
|
||||
}
|
||||
|
||||
|
||||
public float getFloorDensity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public float getCeilDensity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public BlockState getCeil(BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package ru.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import ru.betterend.blocks.BlockProperties;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
@ -12,39 +12,34 @@ import ru.betterend.world.biome.BiomeDefinition;
|
|||
|
||||
public class LushAuroraCaveBiome extends EndCaveBiome {
|
||||
public LushAuroraCaveBiome() {
|
||||
super(new BiomeDefinition("lush_aurora_cave")
|
||||
.setFogColor(150, 30, 68)
|
||||
.setFogDensity(2.0F)
|
||||
.setPlantsColor(108, 25, 46)
|
||||
.setWaterAndFogColor(186, 77, 237)
|
||||
.setMusic(EndSounds.MUSIC_FOREST)
|
||||
.setParticles(EndParticles.GLOWING_SPHERE, 0.001F)
|
||||
.setSurface(EndBlocks.CAVE_MOSS));
|
||||
|
||||
super(new BiomeDefinition("lush_aurora_cave").setFogColor(150, 30, 68).setFogDensity(2.0F)
|
||||
.setPlantsColor(108, 25, 46).setWaterAndFogColor(186, 77, 237).setMusic(EndSounds.MUSIC_FOREST)
|
||||
.setParticles(EndParticles.GLOWING_SPHERE, 0.001F).setSurface(EndBlocks.CAVE_MOSS));
|
||||
|
||||
this.addFloorFeature(EndFeatures.BIG_AURORA_CRYSTAL, 1);
|
||||
this.addFloorFeature(EndFeatures.CAVE_BUSH, 5);
|
||||
this.addFloorFeature(EndFeatures.CAVE_GRASS, 40);
|
||||
this.addFloorFeature(EndFeatures.END_STONE_STALAGMITE_CAVEMOSS, 5);
|
||||
|
||||
|
||||
this.addCeilFeature(EndFeatures.CAVE_BUSH, 1);
|
||||
this.addCeilFeature(EndFeatures.CAVE_PUMPKIN, 1);
|
||||
this.addCeilFeature(EndFeatures.RUBINEA, 3);
|
||||
this.addCeilFeature(EndFeatures.MAGNULA, 1);
|
||||
this.addCeilFeature(EndFeatures.END_STONE_STALACTITE_CAVEMOSS, 10);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getFloorDensity() {
|
||||
return 0.2F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getCeilDensity() {
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getCeil(BlockPos pos) {
|
||||
return EndBlocks.CAVE_MOSS.getDefaultState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP);
|
||||
return EndBlocks.CAVE_MOSS.defaultBlockState().with(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue