Crystal grass & small changes
This commit is contained in:
parent
4073e0a32c
commit
7de70c9553
22 changed files with 376 additions and 14 deletions
|
@ -90,6 +90,7 @@ public class BlockRegistry {
|
|||
public static final Block CREEPING_MOSS = registerBlock("creeping_moss", new BlockGlowingMoss(11));
|
||||
public static final Block CHORUS_GRASS = registerBlock("chorus_grass", new BlockChorusGrass());
|
||||
public static final Block CAVE_GRASS = registerBlock("cave_grass", new BlockTerrainPlant(CAVE_MOSS));
|
||||
public static final Block CRYSTAL_GRASS = registerBlock("crystal_grass", new BlockTerrainPlant(CRYSTAL_MOSS));
|
||||
|
||||
public static final Block BLUE_VINE_SEED = registerBlock("blue_vine_seed", new BlockBlueVineSeed());
|
||||
public static final Block BLUE_VINE = registerBlockNI("blue_vine", new BlockBlueVine());
|
||||
|
|
|
@ -3,6 +3,7 @@ package ru.betterend.registry;
|
|||
import net.fabricmc.fabric.api.tag.TagRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.tag.Tag.Identified;
|
||||
|
@ -11,6 +12,7 @@ import net.minecraft.world.biome.Biome;
|
|||
import net.minecraft.world.biome.Biome.Category;
|
||||
import net.minecraft.world.gen.surfacebuilder.SurfaceConfig;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.BlockTerrain;
|
||||
import ru.betterend.util.TagHelper;
|
||||
|
||||
public class BlockTagRegistry {
|
||||
|
@ -22,14 +24,17 @@ public class BlockTagRegistry {
|
|||
}
|
||||
|
||||
public static void register() {
|
||||
addSurfaceBlock(BlockRegistry.END_MOSS);
|
||||
addSurfaceBlock(BlockRegistry.END_MYCELIUM);
|
||||
addSurfaceBlock(BlockRegistry.CHORUS_NYLIUM);
|
||||
addSurfaceBlock(BlockRegistry.ENDSTONE_DUST);
|
||||
addSurfaceBlock(BlockRegistry.CAVE_MOSS);
|
||||
|
||||
ItemRegistry.getModBlocks().forEach((item) -> {
|
||||
Block block = ((BlockItem) item).getBlock();
|
||||
if (block instanceof BlockTerrain) {
|
||||
addSurfaceBlock(block);
|
||||
TagHelper.addTag(BlockTags.NYLIUM, block);
|
||||
}
|
||||
});
|
||||
|
||||
TagHelper.addTag(GEN_TERRAIN, BlockRegistry.ENDER_ORE, BlockRegistry.FLAVOLITE.stone, BlockRegistry.VIOLECITE.stone);
|
||||
TagHelper.addTag(BlockTags.NYLIUM, BlockRegistry.END_MOSS, BlockRegistry.END_MYCELIUM, BlockRegistry.CHORUS_NYLIUM, BlockRegistry.CAVE_MOSS);
|
||||
}
|
||||
|
||||
public static void addSurfaceBlock(Block block) {
|
||||
|
|
|
@ -42,6 +42,7 @@ public class FeatureRegistry {
|
|||
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), 5);
|
||||
public static final EndFeature CAVE_GRASS = new EndFeature("cave_grass", new CavePlantFeature(BlockRegistry.CAVE_GRASS, 7), 7);
|
||||
public static final EndFeature CRYSTAL_GRASS = new EndFeature("crystal_grass", new SinglePlantFeature(BlockRegistry.CRYSTAL_GRASS, 8, false), 5);
|
||||
|
||||
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(BlockRegistry.DENSE_VINE, 24), 3);
|
||||
|
||||
|
@ -75,7 +76,7 @@ public class FeatureRegistry {
|
|||
if (pos < features.size()) {
|
||||
List<Supplier<ConfiguredFeature<?, ?>>> list = features.get(pos);
|
||||
// If only chorus plants are enabled
|
||||
if (list.size() < 2) {
|
||||
if (list.size() == 1) {
|
||||
features.get(pos).clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue