Blossoming berry feature
This commit is contained in:
parent
89e327240d
commit
e96753eb2e
3 changed files with 7 additions and 0 deletions
|
@ -86,6 +86,7 @@ public class EndFeatures {
|
||||||
public static final EndFeature TWISTED_UMBRELLA_MOSS = new EndFeature("twisted_umbrella_moss", new DoublePlantFeature(EndBlocks.TWISTED_UMBRELLA_MOSS, EndBlocks.TWISTED_UMBRELLA_MOSS_TALL, 6), 5);
|
public static final EndFeature TWISTED_UMBRELLA_MOSS = new EndFeature("twisted_umbrella_moss", new DoublePlantFeature(EndBlocks.TWISTED_UMBRELLA_MOSS, EndBlocks.TWISTED_UMBRELLA_MOSS_TALL, 6), 5);
|
||||||
public static final EndFeature JUNGLE_GRASS = new EndFeature("jungle_grass", new SinglePlantFeature(EndBlocks.JUNGLE_GRASS, 7, 3), 8);
|
public static final EndFeature JUNGLE_GRASS = new EndFeature("jungle_grass", new SinglePlantFeature(EndBlocks.JUNGLE_GRASS, 7, 3), 8);
|
||||||
public static final EndFeature SMALL_JELLYSHROOM_FLOOR = new EndFeature("small_jellyshroom_floor", new SinglePlantFeature(EndBlocks.SMALL_JELLYSHROOM, 5, 5), 4);
|
public static final EndFeature SMALL_JELLYSHROOM_FLOOR = new EndFeature("small_jellyshroom_floor", new SinglePlantFeature(EndBlocks.SMALL_JELLYSHROOM, 5, 5), 4);
|
||||||
|
public static final EndFeature BLOSSOM_BERRY = new EndFeature("blossom_berry", new SinglePlantFeature(EndBlocks.BLOSSOM_BERRY, 3, 3), 2);
|
||||||
|
|
||||||
// Vines //
|
// Vines //
|
||||||
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(EndBlocks.DENSE_VINE, 24), 3);
|
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(EndBlocks.DENSE_VINE, 24), 3);
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class BiomeBlossomingSpires extends EndBiome {
|
||||||
.addFeature(EndFeatures.BULB_VINE)
|
.addFeature(EndFeatures.BULB_VINE)
|
||||||
.addFeature(EndFeatures.BUSHY_GRASS)
|
.addFeature(EndFeatures.BUSHY_GRASS)
|
||||||
.addFeature(EndFeatures.BUSHY_GRASS_WG)
|
.addFeature(EndFeatures.BUSHY_GRASS_WG)
|
||||||
|
.addFeature(EndFeatures.BLOSSOM_BERRY)
|
||||||
.addFeature(EndFeatures.TWISTED_MOSS)
|
.addFeature(EndFeatures.TWISTED_MOSS)
|
||||||
.addFeature(EndFeatures.TWISTED_MOSS_WOOD)
|
.addFeature(EndFeatures.TWISTED_MOSS_WOOD)
|
||||||
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 4));
|
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 4));
|
||||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.StructureWorldAccess;
|
import net.minecraft.world.StructureWorldAccess;
|
||||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndCropBlock;
|
||||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlocksHelper;
|
||||||
|
|
||||||
|
@ -56,6 +57,10 @@ public class SinglePlantFeature extends ScatterFeature {
|
||||||
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
||||||
BlocksHelper.setWithoutUpdate(world, blockPos.up(), state.with(DoublePlantBlock.TOP, true));
|
BlocksHelper.setWithoutUpdate(world, blockPos.up(), state.with(DoublePlantBlock.TOP, true));
|
||||||
}
|
}
|
||||||
|
else if (plant instanceof EndCropBlock) {
|
||||||
|
BlockState state = plant.getDefaultState().with(EndCropBlock.AGE, 3);
|
||||||
|
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
||||||
|
}
|
||||||
else if (plant instanceof EndPlantWithAgeBlock) {
|
else if (plant instanceof EndPlantWithAgeBlock) {
|
||||||
int age = random.nextInt(4);
|
int age = random.nextInt(4);
|
||||||
BlockState state = plant.getDefaultState().with(EndPlantWithAgeBlock.AGE, age);
|
BlockState state = plant.getDefaultState().with(EndPlantWithAgeBlock.AGE, age);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue