Chorus grass
This commit is contained in:
parent
b0d967ecd4
commit
3207817937
19 changed files with 113 additions and 6 deletions
|
@ -38,15 +38,23 @@ public class BlockPlant extends BlockBaseNotFull implements IRenderTypeable, Fer
|
|||
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 0, 4, 12, 14, 12);
|
||||
|
||||
public BlockPlant() {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
this(false);
|
||||
}
|
||||
|
||||
public BlockPlant(int light) {
|
||||
this(false, light);
|
||||
}
|
||||
|
||||
public BlockPlant(boolean replaceable) {
|
||||
super(FabricBlockSettings.of(replaceable ? Material.PLANT : Material.REPLACEABLE_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.GRASS)
|
||||
.breakByHand(true)
|
||||
.noCollision());
|
||||
}
|
||||
|
||||
public BlockPlant(int light) {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
public BlockPlant(boolean replaceable, int light) {
|
||||
super(FabricBlockSettings.of(replaceable ? Material.PLANT : Material.REPLACEABLE_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.GRASS)
|
||||
.lightLevel(light)
|
||||
|
|
|
@ -29,6 +29,7 @@ import ru.betterend.blocks.EndStoneSmelter;
|
|||
import ru.betterend.blocks.EnderBlock;
|
||||
import ru.betterend.blocks.TerminiteBlock;
|
||||
import ru.betterend.blocks.basis.BlockGlowingFur;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.BlockVine;
|
||||
import ru.betterend.blocks.complex.WoodenMaterial;
|
||||
import ru.betterend.tab.CreativeTab;
|
||||
|
@ -69,6 +70,8 @@ public class BlockRegistry {
|
|||
public static final Block END_LILY = registerBlockNI("end_lily", new BlockEndLily());
|
||||
public static final Block END_LILY_SEED = registerBlock("end_lily_seed", new BlockEndLilySeed());
|
||||
|
||||
public static final Block CHORUS_GRASS = registerBlock("chorus_grass", new BlockPlant(true));
|
||||
|
||||
// Vines //
|
||||
public static final Block DENSE_VINE = registerBlock("dense_vine", new BlockVine(15, true));
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ public class FeatureRegistry {
|
|||
public static final EndFeature UMBRELLA_MOSS = new EndFeature("umbrella_moss", new DoublePlantFeature(BlockRegistry.UMBRELLA_MOSS, BlockRegistry.UMBRELLA_MOSS_TALL, 5), 5);
|
||||
public static final EndFeature CREEPING_MOSS = new EndFeature("creeping_moss", new SinglePlantFeature(BlockRegistry.CREEPING_MOSS, 5), 5);
|
||||
public static final EndFeature BLUE_VINE = new EndFeature("blue_vine", new BlueVineFeature(), 1);
|
||||
public static final EndFeature CHORUS_GRASS = new EndFeature("chorus_grass", new SinglePlantFeature(BlockRegistry.CHORUS_GRASS, 4), 4);
|
||||
|
||||
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(BlockRegistry.DENSE_VINE, 24), 3);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ public class BiomeChorusForest extends EndBiome {
|
|||
.addStructureFeature(StructureRegistry.GIANT_MOSSY_GLOWSHROOM)
|
||||
.addFeature(FeatureRegistry.ENDER_ORE)
|
||||
.addFeature(FeatureRegistry.RARE_END_LAKE)
|
||||
.addFeature(FeatureRegistry.CHORUS_GRASS)
|
||||
.addMobSpawn(EntityRegistry.END_SLIME, 5, 1, 2)
|
||||
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 4));
|
||||
}
|
||||
|
|
|
@ -168,9 +168,11 @@ public class EndLakeFeature extends DefaultFeature {
|
|||
if (world.getBlockState(pos).getBlock().isIn(BlockTagRegistry.GEN_TERRAIN))
|
||||
{
|
||||
BlocksHelper.setWithoutUpdate(world, POS.down(), BlockRegistry.ENDSTONE_DUST.getDefaultState());
|
||||
EndBiome biome = BiomeRegistry.getFromBiome(world.getBiome(POS));
|
||||
if (biome == BiomeRegistry.CHORUS_FOREST) {
|
||||
generateFoggyMushroomland(world, x, z, waterLevel);
|
||||
if (random.nextInt(3) == 0 && pos.getY() < waterLevel - 1) {
|
||||
EndBiome biome = BiomeRegistry.getFromBiome(world.getBiome(POS));
|
||||
if (biome == BiomeRegistry.FOGGY_MUSHROOMLAND) {
|
||||
generateFoggyMushroomland(world, x, z, waterLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
pos = POS.up();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue