Cultures spawning
This commit is contained in:
parent
945a322b53
commit
a549f52527
9 changed files with 45 additions and 0 deletions
|
@ -27,6 +27,7 @@ public class LushAuroraCaveBiome extends EndCaveBiome {
|
|||
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.END_STONE_STALACTITE_CAVEMOSS, 10);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ public class AmberLandBiome extends EndBiome {
|
|||
.addFeature(EndFeatures.LANCELEAF)
|
||||
.addFeature(EndFeatures.GLOW_PILLAR)
|
||||
.addFeature(EndFeatures.AMBER_GRASS)
|
||||
.addFeature(EndFeatures.AMBER_ROOT)
|
||||
.addFeature(EndFeatures.BULB_MOSS)
|
||||
.addFeature(EndFeatures.BULB_MOSS_WOOD)
|
||||
.addFeature(EndFeatures.CHARNIA_ORANGE)
|
||||
|
|
|
@ -30,6 +30,7 @@ public class ChorusForestBiome extends EndBiome {
|
|||
.addFeature(Feature.VEGETAL_DECORATION, ConfiguredFeatures.CHORUS_PLANT)
|
||||
.addFeature(Feature.VEGETAL_DECORATION, ConfiguredFeatures.CHORUS_PLANT)
|
||||
.addFeature(EndFeatures.CHORUS_GRASS)
|
||||
.addFeature(EndFeatures.CHORUS_MUSHROOM)
|
||||
.addFeature(EndFeatures.TAIL_MOSS)
|
||||
.addFeature(EndFeatures.TAIL_MOSS_WOOD)
|
||||
.addFeature(EndFeatures.CHARNIA_PURPLE)
|
||||
|
|
|
@ -28,6 +28,7 @@ public class FoggyMushroomlandBiome extends EndBiome {
|
|||
.addFeature(EndFeatures.UMBRELLA_MOSS)
|
||||
.addFeature(EndFeatures.CREEPING_MOSS)
|
||||
.addFeature(EndFeatures.DENSE_VINE)
|
||||
.addFeature(EndFeatures.PEARLBERRY)
|
||||
.addFeature(EndFeatures.CYAN_MOSS)
|
||||
.addFeature(EndFeatures.CYAN_MOSS_WOOD)
|
||||
.addFeature(EndFeatures.END_LILY)
|
||||
|
|
|
@ -25,6 +25,7 @@ public class MegalakeBiome extends EndBiome {
|
|||
.addFeature(EndFeatures.END_LILY_RARE)
|
||||
.addFeature(EndFeatures.UMBRELLA_MOSS)
|
||||
.addFeature(EndFeatures.CREEPING_MOSS)
|
||||
.addFeature(EndFeatures.PEARLBERRY)
|
||||
.addFeature(EndFeatures.CHARNIA_CYAN)
|
||||
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||
.addFeature(EndFeatures.CHARNIA_RED_RARE)
|
||||
|
|
|
@ -27,6 +27,7 @@ public class MegalakeGroveBiome extends EndBiome {
|
|||
.addFeature(EndFeatures.BUBBLE_CORAL_RARE)
|
||||
.addFeature(EndFeatures.END_LILY_RARE)
|
||||
.addFeature(EndFeatures.UMBRELLA_MOSS)
|
||||
.addFeature(EndFeatures.PEARLBERRY)
|
||||
.addFeature(EndFeatures.CREEPING_MOSS)
|
||||
.addFeature(EndFeatures.CHARNIA_CYAN)
|
||||
.addFeature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package ru.betterend.world.features;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
||||
import ru.betterend.blocks.BlockProperties;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class CavePumpkinFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) {
|
||||
if (!world.getBlockState(pos.up()).isIn(EndTags.GEN_TERRAIN) || !world.isAir(pos) || !world.isAir(pos.down())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int age = random.nextInt(4);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.CAVE_PUMPKIN_SEED.getDefaultState().with(BlockProperties.AGE, age));
|
||||
if (age > 1) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos.down(), EndBlocks.CAVE_PUMPKIN.getDefaultState().with(BlockProperties.SMALL, age < 3));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue