Re-added roots

This commit is contained in:
Forstride 2020-03-03 08:20:02 -05:00
parent b58a3ff88e
commit 3ab58bceb7
24 changed files with 96 additions and 28 deletions

View File

@ -255,6 +255,7 @@ public class BOPBlocks
public static Block reed;
public static Block watergrass;
public static Block mangrove_root;
public static Block root;
public static Block dead_branch;
public static Block bramble;

View File

@ -43,6 +43,7 @@ public class UndergardenBiome extends NetherBiomeBOP
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.burning_blossom.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(7))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.sprout.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(35))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.dead_grass.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(40))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.root.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(8))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.NETHER_VINES.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(125))));
//Base Decorations

View File

@ -58,8 +58,6 @@ public class BorealForestBiome extends BiomeBOP
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BOPBiomeFeatures.BIG_OAK_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.075F), Feature.NORMAL_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.15F), BOPBiomeFeatures.YELLOW_POPLAR_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.3F), BOPBiomeFeatures.YELLOW_AUTUMN_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).weighted(0.15F)), BOPBiomeFeatures.TALL_SPRUCE_TREE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG))).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(10, 0.4F, 1))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, new FernGrassFeature(NoFeatureConfig::deserialize).configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(8))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(DefaultBiomeFeatures.SWEET_BERRY_BUSH_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(1))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDoubleWater(BOPBlocks.reed.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(5))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.bush.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(7))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.FLOWER.configured(DefaultBiomeFeatures.DEFAULT_FLOWER_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(6))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(DefaultBiomeFeatures.PUMPKIN_CONFIG).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(32))));

View File

@ -61,7 +61,6 @@ public class ConiferousForestBiome extends BiomeBOP
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.CONIFEROUS_FOREST_FLOWERS.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(3))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, new FernGrassFeature(NoFeatureConfig::deserialize).configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(4))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(DefaultBiomeFeatures.SWEET_BERRY_BUSH_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(1))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDoubleWater(BOPBlocks.reed.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(5))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.BROWN_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(4))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(8))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.toadstool.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(2))));

View File

@ -55,7 +55,6 @@ public class FirClearingBiome extends BiomeBOP
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.CONIFEROUS_FOREST_FLOWERS.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(5))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, new FernGrassFeature(NoFeatureConfig::deserialize).configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(12))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(DefaultBiomeFeatures.SWEET_BERRY_BUSH_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(1))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDoubleWater(BOPBlocks.reed.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(5))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.BROWN_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(4))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(8))));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.toadstool.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(1))));

View File

@ -7,9 +7,12 @@
******************************************************************************/
package biomesoplenty.common.block;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.BushBlock;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
@ -21,6 +24,7 @@ import net.minecraftforge.common.PlantType;
public class PlantBlockBOP extends BushBlock implements IPlantable
{
protected static final VoxelShape NORMAL = Block.box(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
protected static final VoxelShape ROOT = Block.box(2.0D, 3.0D, 2.0D, 14.0D, 16.0D, 14.0D);
public PlantBlockBOP(Block.Properties properties)
{
@ -30,6 +34,13 @@ public class PlantBlockBOP extends BushBlock implements IPlantable
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext selectionContext)
{
Block block = state.getBlock();
if (block == BOPBlocks.root)
{
return ROOT;
}
return NORMAL;
}
@ -42,7 +53,12 @@ public class PlantBlockBOP extends BushBlock implements IPlantable
@Override
public boolean canSurvive(BlockState state, IWorldReader worldIn, BlockPos pos)
{
Block ground = worldIn.getBlockState(pos.below()).getBlock();
Block ceiling = worldIn.getBlockState(pos.above()).getBlock();
if (this == BOPBlocks.root)
{
return ceiling == Blocks.DIRT || ceiling == Blocks.GRASS_BLOCK || ceiling == Blocks.PODZOL || ceiling == Blocks.GRASS_PATH || ceiling == Blocks.MYCELIUM || ceiling == Blocks.FARMLAND || ceiling == Blocks.COARSE_DIRT || ceiling == Blocks.NETHERRACK;
}
return super.canSurvive(state, worldIn, pos);
}
@ -50,8 +66,6 @@ public class PlantBlockBOP extends BushBlock implements IPlantable
@Override
public PlantType getPlantType(IBlockReader world, BlockPos pos)
{
Block block = world.getBlockState(pos).getBlock();
return PlantType.Plains;
}
}

View File

@ -287,6 +287,7 @@ public class ModBlocks
watergrass = registerBlock(new DoubleWaterPlantBlock(Block.Properties.of(Material.PLANT).noCollission().instabreak().sound(SoundType.GRASS)), "watergrass");
mangrove_root = registerBlock(new DoubleWaterPlantBlock(Block.Properties.of(Material.PLANT, MaterialColor.TERRACOTTA_WHITE).noCollission().strength(1.0F, 1.5F).sound(SoundType.WOOD)), "mangrove_root");
root = registerBlock(new PlantBlockBOP(Block.Properties.of(Material.REPLACEABLE_PLANT, MaterialColor.DIRT).noCollission().instabreak().sound(SoundType.GRASS)), "root");
dead_branch = registerBlock(new DeadBranchBlock(Block.Properties.of(Material.WOOD, MaterialColor.COLOR_GRAY).noCollission().instabreak().sound(SoundType.WOOD)), "dead_branch");
bramble = registerBlock(new BrambleBlock(Block.Properties.of(Material.PLANT, MaterialColor.NETHER).strength(0.4F).harvestLevel(0).harvestTool(ToolType.AXE).sound(SoundType.WOOD)), "bramble");
toadstool = registerBlock(new MushroomBlockBOP(Block.Properties.of(Material.PLANT, MaterialColor.COLOR_ORANGE).noCollission().instabreak().sound(SoundType.GRASS)), "toadstool");
@ -392,6 +393,7 @@ public class ModBlocks
RenderTypeLookup.setRenderLayer(reed, cutoutRenderType);
RenderTypeLookup.setRenderLayer(watergrass, cutoutRenderType);
RenderTypeLookup.setRenderLayer(mangrove_root, cutoutRenderType);
RenderTypeLookup.setRenderLayer(root, cutoutRenderType);
RenderTypeLookup.setRenderLayer(dead_branch, cutoutRenderType);
RenderTypeLookup.setRenderLayer(bramble, cutoutRenderType);
RenderTypeLookup.setRenderLayer(toadstool, cutoutRenderType);

View File

@ -18,11 +18,17 @@ import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placement.AtSurfaceWithExtraConfig;
import net.minecraft.world.gen.placement.FrequencyConfig;
import net.minecraft.world.gen.placement.Placement;
import net.minecraftforge.common.BiomeDictionary;
import java.util.List;
public class ModVanillaCompat
{
public static void setup()
{
//Roots
addBiomeDictionaryFeature(Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.root.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(20))), GenerationStage.Decoration.VEGETAL_DECORATION, Lists.newArrayList(BiomeDictionary.Type.OVERWORLD));
//Vanilla Biome Features
addFeature(Biomes.BADLANDS, GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.desert_grass.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(4))));
addFeature(Biomes.BADLANDS_PLATEAU, GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.desert_grass.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(4))));
@ -305,6 +311,7 @@ public class ModVanillaCompat
registerCompostable(0.5F, BOPBlocks.watergrass);
registerCompostable(0.5F, BOPBlocks.mangrove_root);
registerCompostable(0.3F, BOPBlocks.root);
registerCompostable(0.3F, BOPBlocks.dead_branch);
registerCompostable(0.3F, BOPBlocks.bramble);
@ -335,4 +342,18 @@ public class ModVanillaCompat
biome.addFeature(decorationStage, featureIn);
}
public static void addBiomeDictionaryFeature(ConfiguredFeature<?, ?> featureIn, GenerationStage.Decoration decorationStage, List<BiomeDictionary.Type> includedBiomeTypes)
{
if (!includedBiomeTypes.isEmpty())
{
for (BiomeDictionary.Type type : includedBiomeTypes)
{
for (Biome biome : BiomeDictionary.getBiomes(type))
{
biome.addFeature(decorationStage, featureIn);
}
}
}
}
}

View File

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "biomesoplenty:block/root" }
}
}

View File

@ -300,6 +300,7 @@
"block.biomesoplenty.redwood_wall_sign": "Redwood Wall Sign",
"block.biomesoplenty.redwood_wood": "Redwood Wood",
"block.biomesoplenty.reed": "Reed",
"block.biomesoplenty.root": "Root",
"block.biomesoplenty.rose": "Rose",
"block.biomesoplenty.smooth_white_sandstone": "Smooth White Sandstone",
"block.biomesoplenty.smooth_white_sandstone_slab": "Smooth White Sandstone Slab",

View File

@ -1,11 +1,11 @@
{
"advancements.biomesoplenty.root.title": "바이옴스 오 플렌티",
"advancements.biomesoplenty.root.title": "Biomes O' Plenty",
"advancements.biomesoplenty.root.description": "세계를 탐험합니다.",
"advancements.biomesoplenty.all_biomes.title": "방랑자",
"advancements.biomesoplenty.all_biomes.description": "바이옴스 오 플렌티에 있는 모든 생물군계를 탐험합니다.",
"generator.biomesoplenty": "바이옴스 오 플렌티",
"itemGroup.biomesoplenty": "바이옴스 오 플렌티",
"generator.biomesoplenty": "Biomes O' Plenty",
"itemGroup.biomesoplenty": "Biomes O' Plenty",
"biome.biomesoplenty.alps": "알프스",
"biome.biomesoplenty.alps_foothills": "알프스 산기슭",

View File

@ -1,26 +1,11 @@
{
"advancements.biomesoplenty.root.title": "Biomes O' Plenty",
"advancements.biomesoplenty.root.description": "O sonho do explorador...",
"advancements.biomesoplenty.evergreen_biomes.title": "Sempre-verde",
"advancements.biomesoplenty.evergreen_biomes.description": "Descubra todos os biomas com árvores perenes do Biomes O' Plenty",
"advancements.biomesoplenty.swamp_biomes.title": "Febre do pântano",
"advancements.biomesoplenty.swamp_biomes.description": "Descubra todos os biomas pantânosos do Biomes O' Plenty",
"advancements.biomesoplenty.beach_island_biomes.title": "Férias!",
"advancements.biomesoplenty.beach_island_biomes.description": "Descubra todas as praias e biomas de ilhas do Biomes O' Plenty",
"advancements.biomesoplenty.magic_biomes.title": "Yin e Yang",
"advancements.biomesoplenty.magic_biomes.description": "Descubra ambos os biomas mágicos do Biomes O' Plenty",
"advancements.biomesoplenty.wasteland_biome.title": "Cáustico",
"advancements.biomesoplenty.wasteland_biome.description": "Descubra o Cáustico do Biomes O' Plenty",
"advancements.biomesoplenty.nether_biomes.title": "Nether",
"advancements.biomesoplenty.nether_biomes.description": "Descubra todos os biomas do Nether do Biomes O' Plenty",
"advancements.biomesoplenty.all_biomes.title": "Viajante",
"advancements.biomesoplenty.all_biomes.description": "Descubra todos os biomas do Biomes O' Plenty",
"generator.biomesoplenty": "Biomes O' Plenty",
"itemGroup.biomesoplenty": "Biomes O' Plenty",
"item.forge.bucketFilled": "Balde de %s",
"effect.biomesoplenty.curse": "Maldição",
"item.biomesoplenty.bop_icon": "Ícone do BOP",
"item.biomesoplenty.cherry_boat": "Bote de cerejeira",

View File

@ -1,5 +1,5 @@
{
"advancements.biomesoplenty.root.title": "超多生物群系",
"advancements.biomesoplenty.root.title": "Biomes O' Plenty",
"advancements.biomesoplenty.root.description": "每个探险家的梦想...",
"advancements.biomesoplenty.evergreen_biomes.title": "常青之钥",
"advancements.biomesoplenty.evergreen_biomes.description": "发现Bop(超多生物群系)中的所有常绿树生物群系",
@ -16,8 +16,8 @@
"advancements.biomesoplenty.all_biomes.title": "漫游者",
"advancements.biomesoplenty.all_biomes.description": "发现Bop(超多生物群系)的每一个群系",
"generator.biomesoplenty": "超多生物群系",
"itemGroup.biomesoplenty": "超多生物群系",
"generator.biomesoplenty": "Biomes O' Plenty",
"itemGroup.biomesoplenty": "Biomes O' Plenty",
"biome.biomesoplenty.alps": "阿尔卑斯山",
"biome.biomesoplenty.alps_foothills": "阿尔卑斯山麓",

View File

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

View File

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "biomesoplenty:item/root"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

View File

@ -0,0 +1,22 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "biomesoplenty:root"
}
],
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"item": "minecraft:shears"
}
}
]
}
]
}

View File

@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"biomesoplenty:white_sand",
"biomesoplenty:toadstool",
"biomesoplenty:glowshroom"
]
}