More plants

This commit is contained in:
paulevsGitch 2020-11-03 19:55:54 +03:00
parent 0f36f048ea
commit 591d015f90
14 changed files with 132 additions and 4 deletions

View file

@ -133,6 +133,7 @@ public class EndBlocks {
// Vines //
public static final Block DENSE_VINE = registerBlock("dense_vine", new BlockVine(15, true));
public static final Block TWISTED_VINE = registerBlock("twisted_vine", new BlockVine());
// Ores //
public static final Block ENDER_ORE = registerBlock("ender_ore", new BlockOre(EndItems.ENDER_DUST, 1, 3));

View file

@ -46,12 +46,15 @@ public class EndFeatures {
public static final EndFeature CHORUS_GRASS = new EndFeature("chorus_grass", new SinglePlantFeature(EndBlocks.CHORUS_GRASS, 4), 5);
public static final EndFeature CAVE_GRASS = new EndFeature("cave_grass", new CavePlantFeature(EndBlocks.CAVE_GRASS, 7), 7);
public static final EndFeature CRYSTAL_GRASS = new EndFeature("crystal_grass", new SinglePlantFeature(EndBlocks.CRYSTAL_GRASS, 8, false), 5);
public static final EndFeature SHADOW_PLANT = new EndFeature("shadow_plant", new SinglePlantFeature(EndBlocks.SHADOW_PLANT, 6), 7);
public static final EndFeature MURKWEED = new EndFeature("murkweed", new SinglePlantFeature(EndBlocks.MURKWEED, 4), 2);
public static final EndFeature NEEDLEGRASS = new EndFeature("needlegrass", new SinglePlantFeature(EndBlocks.NEEDLEGRASS, 4), 2);
public static final EndFeature SHADOW_PLANT = new EndFeature("shadow_plant", new SinglePlantFeature(EndBlocks.SHADOW_PLANT, 6), 9);
public static final EndFeature MURKWEED = new EndFeature("murkweed", new SinglePlantFeature(EndBlocks.MURKWEED, 3), 2);
public static final EndFeature NEEDLEGRASS = new EndFeature("needlegrass", new SinglePlantFeature(EndBlocks.NEEDLEGRASS, 3), 2);
// Vines //
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(EndBlocks.DENSE_VINE, 24), 3);
public static final EndFeature TWISTED_VINE = new EndFeature("twisted_vine", new VineFeature(EndBlocks.TWISTED_VINE, 24), 3);
// Water //
public static final EndFeature BUBBLE_CORAL = new EndFeature("bubble_coral", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 10), 10);
public static final EndFeature BUBBLE_CORAL_RARE = new EndFeature("bubble_coral_rare", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 3), 4);
public static final EndFeature END_LILY = new EndFeature("end_lily", new EndLilyFeature(10), 10);

View file

@ -21,6 +21,7 @@ import net.minecraft.world.gen.surfacebuilder.SurfaceConfig;
import ru.betterend.BetterEnd;
import ru.betterend.blocks.BlockTerrain;
import ru.betterend.blocks.basis.BlockSimpleLeaves;
import ru.betterend.blocks.basis.BlockVine;
import ru.betterend.util.TagHelper;
public class EndTags {
@ -56,6 +57,9 @@ public class EndTags {
else if (block instanceof LeavesBlock || block instanceof BlockSimpleLeaves) {
TagHelper.addTag(BlockTags.LEAVES, block);
}
else if (block instanceof BlockVine) {
TagHelper.addTag(BlockTags.CLIMBABLE, block);
}
});
TagHelper.addTag(GEN_TERRAIN, EndBlocks.ENDER_ORE, EndBlocks.FLAVOLITE.stone, EndBlocks.VIOLECITE.stone);

View file

@ -23,6 +23,7 @@ public class BiomeShadowForest extends EndBiome {
.addFeature(EndFeatures.SHADOW_PLANT)
.addFeature(EndFeatures.MURKWEED)
.addFeature(EndFeatures.NEEDLEGRASS)
.addFeature(EndFeatures.TWISTED_VINE)
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
.addMobSpawn(EntityType.ENDERMAN, 80, 1, 4)
.addMobSpawn(EntityType.PHANTOM, 1, 1, 2));

View file

@ -31,7 +31,7 @@ public abstract class InvertedScatterFeature extends DefaultFeature {
POS.set(center.getX(), y, center.getZ());
if (world.getBlockState(POS).isAir() && !world.getBlockState(POS.up()).isAir()) {
float r = MHelper.randRange(radius * 0.5F, radius, random);
int count = MHelper.floor(r * r * MHelper.randRange(1.5F, 3F, random));
int count = MHelper.floor(r * r * MHelper.randRange(0.5F, 1.5F, random));
for (int i = 0; i < count; i++) {
float pr = r * (float) Math.sqrt(random.nextFloat());
float theta = random.nextFloat() * MHelper.PI2;