Chorus grass

This commit is contained in:
paulevsGitch 2020-10-10 21:52:47 +03:00
parent b0d967ecd4
commit 3207817937
19 changed files with 113 additions and 6 deletions

View file

@ -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)

View file

@ -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));

View file

@ -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);

View file

@ -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));
}

View file

@ -168,11 +168,13 @@ public class EndLakeFeature extends DefaultFeature {
if (world.getBlockState(pos).getBlock().isIn(BlockTagRegistry.GEN_TERRAIN))
{
BlocksHelper.setWithoutUpdate(world, POS.down(), BlockRegistry.ENDSTONE_DUST.getDefaultState());
if (random.nextInt(3) == 0 && pos.getY() < waterLevel - 1) {
EndBiome biome = BiomeRegistry.getFromBiome(world.getBiome(POS));
if (biome == BiomeRegistry.CHORUS_FOREST) {
if (biome == BiomeRegistry.FOGGY_MUSHROOMLAND) {
generateFoggyMushroomland(world, x, z, waterLevel);
}
}
}
pos = POS.up();
if (world.getBlockState(pos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
while (world.getBlockState(pos).isIn(BlockTagRegistry.GEN_TERRAIN)) {

View file

@ -0,0 +1,38 @@
{
"variants": {
"": [
{ "model": "betterend:block/chorus_grass_01" },
{ "model": "betterend:block/chorus_grass_02" },
{ "model": "betterend:block/chorus_grass_03" },
{ "model": "betterend:block/chorus_grass_04" },
{ "model": "betterend:block/chorus_grass_05" },
{ "model": "betterend:block/chorus_grass_06" },
{ "model": "betterend:block/chorus_grass_07" },
{ "model": "betterend:block/chorus_grass_08" },
{ "model": "betterend:block/chorus_grass_01", "y": 90 },
{ "model": "betterend:block/chorus_grass_02", "y": 90 },
{ "model": "betterend:block/chorus_grass_03", "y": 90 },
{ "model": "betterend:block/chorus_grass_04", "y": 90 },
{ "model": "betterend:block/chorus_grass_05", "y": 90 },
{ "model": "betterend:block/chorus_grass_06", "y": 90 },
{ "model": "betterend:block/chorus_grass_07", "y": 90 },
{ "model": "betterend:block/chorus_grass_08", "y": 90 },
{ "model": "betterend:block/chorus_grass_01", "y": 180 },
{ "model": "betterend:block/chorus_grass_02", "y": 180 },
{ "model": "betterend:block/chorus_grass_03", "y": 180 },
{ "model": "betterend:block/chorus_grass_04", "y": 180 },
{ "model": "betterend:block/chorus_grass_05", "y": 180 },
{ "model": "betterend:block/chorus_grass_06", "y": 180 },
{ "model": "betterend:block/chorus_grass_07", "y": 180 },
{ "model": "betterend:block/chorus_grass_08", "y": 180 },
{ "model": "betterend:block/chorus_grass_01", "y": 270 },
{ "model": "betterend:block/chorus_grass_02", "y": 270 },
{ "model": "betterend:block/chorus_grass_03", "y": 270 },
{ "model": "betterend:block/chorus_grass_04", "y": 270 },
{ "model": "betterend:block/chorus_grass_05", "y": 270 },
{ "model": "betterend:block/chorus_grass_06", "y": 270 },
{ "model": "betterend:block/chorus_grass_07", "y": 270 },
{ "model": "betterend:block/chorus_grass_08", "y": 270 }
]
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/cross",
"textures": {
"cross": "betterend:block/chorus_grass_01"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/cross",
"textures": {
"cross": "betterend:block/chorus_grass_02"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/cross",
"textures": {
"cross": "betterend:block/chorus_grass_03"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/cross",
"textures": {
"cross": "betterend:block/chorus_grass_04"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "betterend:block/crop_block",
"textures": {
"texture": "betterend:block/chorus_grass_01"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "betterend:block/crop_block",
"textures": {
"texture": "betterend:block/chorus_grass_02"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "betterend:block/crop_block",
"textures": {
"texture": "betterend:block/chorus_grass_03"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "betterend:block/crop_block",
"textures": {
"texture": "betterend:block/chorus_grass_04"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "betterend:block/chorus_grass_01"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB