- Added Fungal Jungle overworld biome
- Added Huge Glowshrooms and Huge Toadstools - Removed Fungi Forest Nether biome - Re-added hostile mobs to the Tropics/White Beach biomes - Cleaned up vanilla biome climate registration
This commit is contained in:
parent
aa943081e3
commit
c7ff6cc032
39 changed files with 1094 additions and 191 deletions
|
@ -27,6 +27,7 @@ public class BOPBiomes
|
|||
public static Optional<Biome> fir_clearing = Optional.empty();
|
||||
public static Optional<Biome> floodplain = Optional.empty();
|
||||
public static Optional<Biome> flower_meadow = Optional.empty();
|
||||
public static Optional<Biome> fungal_jungle = Optional.empty();
|
||||
public static Optional<Biome> ghost_forest = Optional.empty();
|
||||
public static Optional<Biome> grassland = Optional.empty();
|
||||
public static Optional<Biome> gravel_beach = Optional.empty();
|
||||
|
@ -80,7 +81,6 @@ public class BOPBiomes
|
|||
public static Optional<Biome> xeric_shrubland = Optional.empty();
|
||||
|
||||
public static Optional<Biome> ashen_inferno = Optional.empty();
|
||||
public static Optional<Biome> fungi_forest = Optional.empty();
|
||||
public static Optional<Biome> glowstone_grotto = Optional.empty();
|
||||
public static Optional<Biome> undergarden = Optional.empty();
|
||||
public static Optional<Biome> visceral_heap = Optional.empty();
|
||||
|
|
|
@ -33,6 +33,9 @@ public class BOPBlocks
|
|||
public static Block ash_block;
|
||||
public static Block flesh;
|
||||
|
||||
public static Block toadstool_block;
|
||||
public static Block glowshroom_block;
|
||||
|
||||
public static Block origin_sapling;
|
||||
public static Block origin_leaves;
|
||||
public static Block flowering_oak_sapling;
|
||||
|
@ -254,6 +257,7 @@ public class BOPBlocks
|
|||
public static Block mangrove_root;
|
||||
public static Block dead_branch;
|
||||
public static Block bramble;
|
||||
|
||||
public static Block toadstool;
|
||||
public static Block glowshroom;
|
||||
|
||||
|
|
|
@ -140,12 +140,9 @@ public enum BOPClimates
|
|||
BOPClimates.DRY_TEMPERATE.addBiome(7, Biomes.BIRCH_FOREST);
|
||||
BOPClimates.COOL_TEMPERATE.addBiome(10, Biomes.FOREST);
|
||||
BOPClimates.WARM_TEMPERATE.addBiome(10, Biomes.PLAINS);
|
||||
BOPClimates.SUBTROPICAL.addBiome(1, Biomes.LUKEWARM_OCEAN);
|
||||
BOPClimates.TROPICAL.addBiome(15, Biomes.JUNGLE);
|
||||
BOPClimates.MEDITERRANEAN.addBiome(1, Biomes.PLAINS);
|
||||
BOPClimates.SAVANNA.addBiome(10, Biomes.SAVANNA);
|
||||
BOPClimates.HOT_DESERT.addBiome(15, Biomes.DESERT).addBiome(10, Biomes.BADLANDS_PLATEAU).addBiome(3, Biomes.WOODED_BADLANDS_PLATEAU);
|
||||
BOPClimates.WASTELAND.addBiome(1, Biomes.DESERT);
|
||||
|
||||
BOPClimates.NETHER.addBiome(10, Biomes.NETHER);
|
||||
}
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
package biomesoplenty.common.biome.nether;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.NetherBiomeBOP;
|
||||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.DefaultBiomeFeatures;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.carver.WorldCarver;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.placement.CountRangeConfig;
|
||||
import net.minecraft.world.gen.placement.FrequencyConfig;
|
||||
import net.minecraft.world.gen.placement.IPlacementConfig;
|
||||
import net.minecraft.world.gen.placement.Placement;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class FungiForestBiome extends NetherBiomeBOP
|
||||
{
|
||||
public FungiForestBiome()
|
||||
{
|
||||
super((new Builder()).surfaceBuilder(SurfaceBuilder.NETHER, SurfaceBuilder.CONFIG_HELL).precipitation(RainType.NONE).biomeCategory(Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent((String)null));
|
||||
|
||||
//Terrain
|
||||
this.addStructureStart(Feature.NETHER_BRIDGE.configured(IFeatureConfig.NONE));
|
||||
this.addCarver(GenerationStage.Carving.AIR, makeCarver(WorldCarver.HELL_CAVE, new ProbabilityConfig(0.2F)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.SPRING.configured(DefaultBiomeFeatures.LAVA_SPRING_CONFIG).decorated(Placement.COUNT_VERY_BIASED_RANGE.configured(new CountRangeConfig(20, 8, 16, 256))));
|
||||
|
||||
DefaultBiomeFeatures.addDefaultMushrooms(this);
|
||||
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.NETHER_BRIDGE.configured(IFeatureConfig.NONE).decorated(Placement.NOPE.configured(IPlacementConfig.NONE)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.SPRING.configured(DefaultBiomeFeatures.OPEN_NETHER_SPRING_CONFIG).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(8, 4, 8, 128))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(DefaultBiomeFeatures.HELL_FIRE_CONFIG).decorated(Placement.HELL_FIRE.configured(new FrequencyConfig(10))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.GLOWSTONE_BLOB.configured(IFeatureConfig.NONE).decorated(Placement.LIGHT_GEM_CHANCE.configured(new FrequencyConfig(10))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.GLOWSTONE_BLOB.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(10, 0, 0, 128))));
|
||||
|
||||
//Vegetation
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.BIG_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(250))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.BIG_BROWN_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_BROWN_MUSHROOM_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(75))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.toadstool.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(7))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.NETHERWART_BUBBLE.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(3))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.SCATTERED_NETHER_WART.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(4))));
|
||||
|
||||
//Base Decorations
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.BROWN_MUSHROOM.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(15))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(30))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.NETHER_QUARTZ_ORE.defaultBlockState(), 14)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(16, 10, 20, 128))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.MAGMA_BLOCK.defaultBlockState(), 33)).decorated(Placement.MAGMA.configured(new FrequencyConfig(4))));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.SPRING.configured(DefaultBiomeFeatures.CLOSED_NETHER_SPRING_CONFIG).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(16, 10, 20, 128))));
|
||||
|
||||
//Entities
|
||||
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.GHAST, 50, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_PIGMAN, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.MAGMA_CUBE, 2, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 1, 4, 4));
|
||||
|
||||
this.addWeight(BOPClimates.NETHER, 7);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeBOP;
|
||||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.FernGrassFeature;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.DefaultBiomeFeatures;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
|
||||
import net.minecraft.world.gen.placement.*;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class FungalJungleBiome extends BiomeBOP
|
||||
{
|
||||
public FungalJungleBiome()
|
||||
{
|
||||
super((new Builder()).surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.CONFIG_GRASS)).precipitation(RainType.RAIN).biomeCategory(Category.FOREST).depth(0.15F).scale(0.1F).temperature(0.85F).downfall(0.8F).waterColor(4445678).waterFogColor(270131).parent((String)null));
|
||||
|
||||
// Structures
|
||||
this.addStructureStart(Feature.MINESHAFT.configured(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
|
||||
this.addStructureStart(Feature.STRONGHOLD.configured(IFeatureConfig.NONE));
|
||||
|
||||
// Underground
|
||||
DefaultBiomeFeatures.addDefaultCarvers(this);
|
||||
DefaultBiomeFeatures.addStructureFeaturePlacement(this);
|
||||
|
||||
DefaultBiomeFeatures.addDefaultMonsterRoom(this);
|
||||
DefaultBiomeFeatures.addDefaultUndergroundVariety(this);
|
||||
DefaultBiomeFeatures.addDefaultOres(this);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Vegetation
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.BUSH.configured(DefaultBiomeFeatures.NORMAL_TREE_CONFIG).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(2, 0.1F, 1))));
|
||||
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.HUGE_GLOWSHROOM.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(7))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.SMALL_GLOWSHROOM.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(3))));
|
||||
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.MYCELIUM_SPLATTER.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(14))));
|
||||
|
||||
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(BiomeFeatureHelper.createClusterConfigurationDouble(Blocks.TALL_GRASS.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(9))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(Blocks.LARGE_FERN.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.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(5))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(10))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.glowshroom.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(20))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.SEAGRASS.configured(new SeaGrassConfig(64, 0.6D)).decorated(Placement.TOP_SOLID_HEIGHTMAP.configured(IPlacementConfig.NONE)));
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(this);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(this);
|
||||
|
||||
// Entities
|
||||
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.MOOSHROOM, 8, 4, 8));
|
||||
this.addSpawn(EntityClassification.AMBIENT, new SpawnListEntry(EntityType.BAT, 10, 8, 8));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
|
||||
|
||||
this.addWeight(BOPClimates.TROPICAL, 1);
|
||||
this.setBeachBiome((Biome)null);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public int getGrassColor(double x, double z) {
|
||||
double d0 = Biome.BIOME_INFO_NOISE.getValue(x * 0.0225D, z * 0.0225D, false);
|
||||
return d0 < -0.1D ? 0x4AA2F9 : 0x4DD6CA;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public int getFoliageColor()
|
||||
{
|
||||
return 0x4ADCF9;
|
||||
}
|
||||
}
|
|
@ -57,7 +57,6 @@ public class LushGrasslandBiome extends BiomeBOP
|
|||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.FERN.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(4))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.sprout.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(5))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(Blocks.TALL_GRASS.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(8))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(Blocks.LARGE_FERN.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(2))));
|
||||
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(DefaultBiomeFeatures.WATERLILLY_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(3))));
|
||||
|
|
|
@ -61,14 +61,14 @@ public class MysticGroveBiome extends BiomeBOP
|
|||
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.MYSTIC_GROVE_FLOWERS.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(18))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.HUGE_RED_MUSHROOM.configured(DefaultBiomeFeatures.HUGE_RED_MUSHROOM_CONFIG).decorated(Placement.COUNT_EXTRA_HEIGHTMAP.configured(new AtSurfaceWithExtraConfig(1, 0.1F, 1))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.SMALL_RED_MUSHROOM.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(1))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(BOPBlocks.blue_hydrangea.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(4))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(Blocks.LILAC.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(1))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, new StandardGrassFeature(NoFeatureConfig::deserialize).configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(15))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.sprout.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(15))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDoubleWater(BOPBlocks.watergrass.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(10))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.BROWN_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(15))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(30))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.glowshroom.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(10))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_HEIGHTMAP_DOUBLE.configured(new ChanceConfig(20))));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.SEAGRASS.configured(new SeaGrassConfig(32, 0.4D)).decorated(Placement.TOP_SOLID_HEIGHTMAP.configured(IPlacementConfig.NONE)));
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -81,6 +81,7 @@ public class MysticGroveBiome extends BiomeBOP
|
|||
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.RABBIT, 4, 2, 3));
|
||||
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.FOX, 8, 2, 4));
|
||||
this.addSpawn(EntityClassification.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 15, 1, 1));
|
||||
|
||||
|
|
|
@ -78,6 +78,12 @@ public class TropicsBiome extends BiomeBOP
|
|||
this.addSpawn(EntityClassification.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.PUFFERFISH, 15, 1, 3));
|
||||
this.addSpawn(EntityClassification.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.TROPICAL_FISH, 25, 8, 8));
|
||||
this.addSpawn(EntityClassification.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.DOLPHIN, 2, 1, 2));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
|
||||
|
||||
this.setBeachBiome(BOPBiomes.white_beach);
|
||||
this.setRiverBiome((Biome)null);
|
||||
|
|
|
@ -71,7 +71,7 @@ public class WastelandBiome extends BiomeBOP
|
|||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
|
||||
this.addWeight(BOPClimates.WASTELAND, 500);
|
||||
this.addWeight(BOPClimates.WASTELAND, 10);
|
||||
this.setBeachBiome((Biome)null);
|
||||
this.setRiverBiome((Biome)null);
|
||||
}
|
||||
|
|
|
@ -69,6 +69,12 @@ public class WhiteBeachBiome extends BiomeBOP
|
|||
this.addSpawn(EntityClassification.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.PUFFERFISH, 15, 1, 3));
|
||||
this.addSpawn(EntityClassification.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.TROPICAL_FISH, 25, 8, 8));
|
||||
this.addSpawn(EntityClassification.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.DOLPHIN, 2, 1, 2));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
|
||||
|
||||
this.setBeachBiome((Biome)null);
|
||||
this.setRiverBiome((Biome)null);
|
||||
|
|
|
@ -7,19 +7,21 @@
|
|||
******************************************************************************/
|
||||
package biomesoplenty.common.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.MushroomBlock;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.DefaultBiomeFeatures;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MushroomBlockBOP extends MushroomBlock
|
||||
public class MushroomBlockBOP extends MushroomBlock implements IGrowable
|
||||
{
|
||||
public MushroomBlockBOP(Block.Properties properties)
|
||||
{
|
||||
|
@ -43,18 +45,47 @@ public class MushroomBlockBOP extends MushroomBlock
|
|||
@Override
|
||||
public boolean growMushroom(ServerWorld p_226940_1_, BlockPos p_226940_2_, BlockState p_226940_3_, Random p_226940_4_)
|
||||
{
|
||||
p_226940_1_.removeBlock(p_226940_2_, false);
|
||||
ConfiguredFeature<NoFeatureConfig, ?> configuredfeature;
|
||||
if (this == BOPBlocks.glowshroom)
|
||||
{
|
||||
configuredfeature = BOPBiomeFeatures.HUGE_GLOWSHROOM.configured(IFeatureConfig.NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this != BOPBlocks.toadstool)
|
||||
{
|
||||
p_226940_1_.setBlock(p_226940_2_, p_226940_3_, 3);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidBonemealTarget(IBlockReader worldIn, BlockPos pos, BlockState state, boolean isClient)
|
||||
{
|
||||
return false;
|
||||
configuredfeature = BOPBiomeFeatures.HUGE_TOADSTOOL.configured(IFeatureConfig.NONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBonemealSuccess(World worldIn, Random rand, BlockPos pos, BlockState state)
|
||||
if (configuredfeature.place(p_226940_1_, p_226940_1_.getChunkSource().getGenerator(), p_226940_4_, p_226940_2_))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_226940_1_.setBlock(p_226940_2_, p_226940_3_, 3);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isValidBonemealTarget(IBlockReader worldIn, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isBonemealSuccess(World worldIn, Random rand, BlockPos pos, BlockState state) {
|
||||
return (double)rand.nextFloat() < 0.4D;
|
||||
}
|
||||
|
||||
public void performBonemeal(ServerWorld p_225535_1_, Random p_225535_2_, BlockPos p_225535_3_, BlockState p_225535_4_) {
|
||||
this.growMushroom(p_225535_1_, p_225535_3_, p_225535_4_, p_225535_2_);
|
||||
}
|
||||
|
||||
public boolean hasPostProcess(BlockState state, IBlockReader worldIn, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,8 +112,6 @@ public class BOPBiomeFeatures
|
|||
public static final Feature<BaseTreeFeatureConfig> DEAD_TREE_WASTELAND = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.dried_salt).trunkFruit(BOPBlocks.dead_branch.defaultBlockState()).leafChance(0.0F, 0.0F).leaves(Blocks.AIR.defaultBlockState()).log(BOPBlocks.dead_log.defaultBlockState()).minHeight(6).maxHeight(10).create();
|
||||
public static final Feature<BaseTreeFeatureConfig> DEAD_TREE_VOLCANO = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRAVEL).trunkFruit(BOPBlocks.dead_branch.defaultBlockState()).leafChance(0.0F, 0.0F).leaves(Blocks.AIR.defaultBlockState()).log(BOPBlocks.dead_log.defaultBlockState()).minHeight(6).maxHeight(10).create();
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Features
|
||||
|
@ -121,20 +119,22 @@ public class BOPBiomeFeatures
|
|||
public static final Feature<NoFeatureConfig> MANGROVE = new MangroveFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> PUMPKIN_PATCH = new PumpkinPatchFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> BIG_PUMPKIN = new BigPumpkinFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SMALL_BROWN_MUSHROOM = new SmallBrownMushroomFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SHORT_BAMBOO = new ShortBambooFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SCRUB = new ScrubFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SCATTERED_ROCKS = new ScatteredRocksFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> NETHER_VINES = new NetherVinesFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> FLESH_SPLATTER = new FleshSplatterFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> BONE_SPINE = new BoneSpineFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<BigMushroomFeatureConfig> BIG_BROWN_MUSHROOM = new BOPBigBrownMushroomFeature(BigMushroomFeatureConfig::deserialize);
|
||||
public static final Feature<BigMushroomFeatureConfig> BIG_RED_MUSHROOM = new BOPBigRedMushroomFeature(BigMushroomFeatureConfig::deserialize);
|
||||
public static final Feature<BaseTreeFeatureConfig> NETHERWART_BUBBLE = new BushTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.NETHERRACK).log(Blocks.NETHER_WART_BLOCK.defaultBlockState()).leaves(Blocks.NETHER_WART_BLOCK.defaultBlockState()).maxHeight(2).create();
|
||||
public static final Feature<NoFeatureConfig> ASH_SPLATTER = new AshSplatterFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SCATTERED_NETHER_WART = new NetherWartFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> GLOWSTONE_SPIKES = new GlowstoneSpikesFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> PODZOL_SPLATTER = new PodzolSplatterFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> MYCELIUM_SPLATTER = new MyceliumSplatterFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SMALL_RED_MUSHROOM = new SmallRedMushroomFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SMALL_BROWN_MUSHROOM = new SmallBrownMushroomFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SMALL_GLOWSHROOM = new SmallGlowshroomFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> SMALL_TOADSTOOL = new SmallToadstoolFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> HUGE_GLOWSHROOM = new HugeGlowshroomFeature(NoFeatureConfig::deserialize);
|
||||
public static final Feature<NoFeatureConfig> HUGE_TOADSTOOL = new HugeToadstoolFeature(NoFeatureConfig::deserialize);
|
||||
|
||||
//Flowers
|
||||
public static final FlowersFeature CHAPARRAL_FLOWERS = new ChaparralFlowersFeature();
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.BushBlock;
|
||||
import net.minecraft.block.HugeMushroomBlock;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.GenerationSettings;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class HugeGlowshroomFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK || world.getBlockState(pos).getBlock() == Blocks.MYCELIUM;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).canBeReplacedByLeaves(world, pos) || world.getBlockState(pos).getBlock() instanceof BushBlock;
|
||||
|
||||
public HugeGlowshroomFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
|
||||
{
|
||||
super(deserializer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random p_212245_3_, BlockPos startPos, NoFeatureConfig p_212245_5_) {
|
||||
while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {
|
||||
startPos = startPos.below();
|
||||
}
|
||||
|
||||
if (!this.placeOn.matches(world, startPos.offset(0, 0, 0))) {
|
||||
// Abandon if we can't place the tree on this block
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.checkSpace(world, startPos.above())) {
|
||||
// Abandon if there isn't enough room
|
||||
return false;
|
||||
}
|
||||
|
||||
BlockPos pos = startPos.above();
|
||||
|
||||
int height = 6 + p_212245_3_.nextInt(10);
|
||||
int radius = 2 + p_212245_3_.nextInt(2);
|
||||
|
||||
for (int y = 0; y < height; y++) {
|
||||
this.setBlock(world, pos.above(y), Blocks.MUSHROOM_STEM.defaultBlockState());
|
||||
}
|
||||
|
||||
for (int x = -(radius-1); x <= (radius-1); x++)
|
||||
{
|
||||
for (int z = -(radius-1); z <= (radius-1); z++)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
}
|
||||
}
|
||||
|
||||
for (int x = -radius; x <= radius; x++)
|
||||
{
|
||||
for (int z = -radius; z <= radius; z++)
|
||||
{
|
||||
if ((x == -radius || x == radius) && (z == -radius || z == radius))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x == radius)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height - 1, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.WEST, false));
|
||||
this.setBlock(world, pos.offset(x, height - 2, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.WEST, false));
|
||||
}
|
||||
if (x == -radius)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height - 1, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.EAST, false));
|
||||
this.setBlock(world, pos.offset(x, height - 2, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.EAST, false));
|
||||
}
|
||||
if (z == radius)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height - 1, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.NORTH, false));
|
||||
this.setBlock(world, pos.offset(x, height - 2, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.NORTH, false));
|
||||
}
|
||||
if (z == -radius)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height - 1, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.SOUTH, false));
|
||||
this.setBlock(world, pos.offset(x, height - 2, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.SOUTH, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean setBlock(IWorld world, BlockPos pos, BlockState state)
|
||||
{
|
||||
if (this.replace.matches(world, pos))
|
||||
{
|
||||
super.setBlock(world, pos, state);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkSpace(IWorld world, BlockPos pos)
|
||||
{
|
||||
for (int y = 0; y <= 16; y++)
|
||||
{
|
||||
for (int x = -3; x <= 3; x++)
|
||||
{
|
||||
for (int z = -3; z <= 3; z++)
|
||||
{
|
||||
BlockPos pos1 = pos.offset(x, y, z);
|
||||
if (pos1.getY() >= 255 || !this.replace.matches(world, pos1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.BushBlock;
|
||||
import net.minecraft.block.HugeMushroomBlock;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.GenerationSettings;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class HugeToadstoolFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK || world.getBlockState(pos).getBlock() == Blocks.MYCELIUM;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).canBeReplacedByLeaves(world, pos) || world.getBlockState(pos).getBlock() instanceof BushBlock;
|
||||
|
||||
public HugeToadstoolFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
|
||||
{
|
||||
super(deserializer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random p_212245_3_, BlockPos startPos, NoFeatureConfig p_212245_5_) {
|
||||
while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {
|
||||
startPos = startPos.below();
|
||||
}
|
||||
|
||||
if (!this.placeOn.matches(world, startPos.offset(0, 0, 0))) {
|
||||
// Abandon if we can't place the tree on this block
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.checkSpace(world, startPos.above())) {
|
||||
// Abandon if there isn't enough room
|
||||
return false;
|
||||
}
|
||||
|
||||
BlockPos pos = startPos.above();
|
||||
|
||||
int height = 3 + p_212245_3_.nextInt(5);
|
||||
int radius = 2;
|
||||
|
||||
for (int y = 0; y < height; y++) {
|
||||
this.setBlock(world, pos.above(y), Blocks.MUSHROOM_STEM.defaultBlockState());
|
||||
}
|
||||
|
||||
for (int x = -(radius-1); x <= (radius-1); x++)
|
||||
{
|
||||
for (int z = -(radius-1); z <= (radius-1); z++)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height, z), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(x, height+1, z), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(x, height+2, z), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
}
|
||||
}
|
||||
|
||||
this.setBlock(world, pos.offset(0, height+3, 0), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(1, height+3, 0), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(-1, height+3, 0), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(0, height+3, 1), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(0, height+3, -1), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean setBlock(IWorld world, BlockPos pos, BlockState state)
|
||||
{
|
||||
if (this.replace.matches(world, pos))
|
||||
{
|
||||
super.setBlock(world, pos, state);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkSpace(IWorld world, BlockPos pos)
|
||||
{
|
||||
for (int y = 0; y <= 8; y++)
|
||||
{
|
||||
for (int x = -3; x <= 3; x++)
|
||||
{
|
||||
for (int z = -3; z <= 3; z++)
|
||||
{
|
||||
BlockPos pos1 = pos.offset(x, y, z);
|
||||
if (pos1.getY() >= 255 || !this.replace.matches(world, pos1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.GenerationSettings;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class MyceliumSplatterFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
public MyceliumSplatterFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
|
||||
{
|
||||
super(deserializer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(IWorld worldIn, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random rand, BlockPos pos, NoFeatureConfig config)
|
||||
{
|
||||
int i = 0;
|
||||
int j = rand.nextInt(8 - 2) + 2;
|
||||
|
||||
for (int k = pos.getX() - j; k <= pos.getX() + j; ++k)
|
||||
{
|
||||
for (int l = pos.getZ() - j; l <= pos.getZ() + j; ++l)
|
||||
{
|
||||
int i1 = k - pos.getX();
|
||||
int j1 = l - pos.getZ();
|
||||
if (i1 * i1 + j1 * j1 <= j * j)
|
||||
{
|
||||
for (int k1 = pos.getY() - 2; k1 <= pos.getY() + 2; ++k1)
|
||||
{
|
||||
BlockPos blockpos = new BlockPos(k, k1, l);
|
||||
BlockState blockstate = worldIn.getBlockState(blockpos);
|
||||
BlockState blockstate1 = worldIn.getBlockState(blockpos.above());
|
||||
|
||||
if (blockstate.getBlock() == Blocks.GRASS_BLOCK && blockstate1.isAir(worldIn, blockpos.above()))
|
||||
{
|
||||
worldIn.setBlock(blockpos, Blocks.MYCELIUM.defaultBlockState(), 2);
|
||||
if (rand.nextInt(8) == 0)
|
||||
{
|
||||
worldIn.setBlock(blockpos.above(), Blocks.RED_MUSHROOM.defaultBlockState(), 2);
|
||||
}
|
||||
|
||||
++i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return i > 0;
|
||||
}
|
||||
}
|
|
@ -2,9 +2,7 @@ package biomesoplenty.common.world.gen.feature;
|
|||
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.LeavesBlock;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
|
@ -17,8 +15,8 @@ import java.util.function.Function;
|
|||
|
||||
public class SmallBrownMushroomFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).canBeReplacedByLeaves(world, pos);
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK || world.getBlockState(pos).getBlock() == Blocks.MYCELIUM;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).canBeReplacedByLeaves(world, pos) || world.getBlockState(pos).getBlock() instanceof BushBlock;
|
||||
|
||||
public SmallBrownMushroomFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
|
||||
{
|
||||
|
@ -49,21 +47,21 @@ public class SmallBrownMushroomFeature extends Feature<NoFeatureConfig>
|
|||
this.setBlock(world, pos.above(y), Blocks.MUSHROOM_STEM.defaultBlockState());
|
||||
}
|
||||
|
||||
this.setBlock(world, pos.offset(0, height, 0), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(-1, height, 0), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(1, height, 0), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(0, height, -1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(0, height, 1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(0, height, 0), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(-1, height, 0), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(1, height, 0), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(0, height, -1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(0, height, 1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
|
||||
if (p_212245_3_.nextInt(2) == 0)
|
||||
{
|
||||
this.setBlock(world, pos.offset(1, height, 1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(-1, height, -1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(1, height, 1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(-1, height, -1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setBlock(world, pos.offset(-1, height, 1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(1, height, -1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState());
|
||||
this.setBlock(world, pos.offset(-1, height, 1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(1, height, -1), Blocks.BROWN_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.BushBlock;
|
||||
import net.minecraft.block.HugeMushroomBlock;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.GenerationSettings;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class SmallGlowshroomFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK || world.getBlockState(pos).getBlock() == Blocks.MYCELIUM;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).canBeReplacedByLeaves(world, pos) || world.getBlockState(pos).getBlock() instanceof BushBlock;
|
||||
|
||||
public SmallGlowshroomFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
|
||||
{
|
||||
super(deserializer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random p_212245_3_, BlockPos startPos, NoFeatureConfig p_212245_5_) {
|
||||
while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {
|
||||
startPos = startPos.below();
|
||||
}
|
||||
|
||||
if (!this.placeOn.matches(world, startPos.offset(0, 0, 0))) {
|
||||
// Abandon if we can't place the tree on this block
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.checkSpace(world, startPos.above())) {
|
||||
// Abandon if there isn't enough room
|
||||
return false;
|
||||
}
|
||||
|
||||
BlockPos pos = startPos.above();
|
||||
|
||||
int height = 1 + p_212245_3_.nextInt(4);
|
||||
|
||||
for (int y = 0; y < height; y++) {
|
||||
this.setBlock(world, pos.above(y), Blocks.MUSHROOM_STEM.defaultBlockState());
|
||||
}
|
||||
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
for (int z = -1; z <= 1; z++)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height, z), BOPBlocks.glowshroom_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean setBlock(IWorld world, BlockPos pos, BlockState state)
|
||||
{
|
||||
if (this.replace.matches(world, pos))
|
||||
{
|
||||
super.setBlock(world, pos, state);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkSpace(IWorld world, BlockPos pos)
|
||||
{
|
||||
for (int y = 0; y <= 4; y++)
|
||||
{
|
||||
for (int x = -2; x <= 2; x++)
|
||||
{
|
||||
for (int z = -2; z <= 2; z++)
|
||||
{
|
||||
BlockPos pos1 = pos.offset(x, y, z);
|
||||
if (pos1.getY() >= 255 || !this.replace.matches(world, pos1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.BushBlock;
|
||||
import net.minecraft.block.HugeMushroomBlock;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.GenerationSettings;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class SmallRedMushroomFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK || world.getBlockState(pos).getBlock() == Blocks.MYCELIUM;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).canBeReplacedByLeaves(world, pos) || world.getBlockState(pos).getBlock() instanceof BushBlock;
|
||||
|
||||
public SmallRedMushroomFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
|
||||
{
|
||||
super(deserializer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random p_212245_3_, BlockPos startPos, NoFeatureConfig p_212245_5_) {
|
||||
while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {
|
||||
startPos = startPos.below();
|
||||
}
|
||||
|
||||
if (!this.placeOn.matches(world, startPos.offset(0, 0, 0))) {
|
||||
// Abandon if we can't place the tree on this block
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.checkSpace(world, startPos.above())) {
|
||||
// Abandon if there isn't enough room
|
||||
return false;
|
||||
}
|
||||
|
||||
BlockPos pos = startPos.above();
|
||||
|
||||
int height = 1 + p_212245_3_.nextInt(2);
|
||||
|
||||
for (int y = 0; y < height; y++) {
|
||||
this.setBlock(world, pos.above(y), Blocks.MUSHROOM_STEM.defaultBlockState());
|
||||
}
|
||||
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
for (int z = -1; z <= 1; z++)
|
||||
{
|
||||
this.setBlock(world, pos.offset(x, height, z), Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
}
|
||||
}
|
||||
|
||||
this.setBlock(world, pos.offset(0, height + 1, 0), Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(-1, height + 1, 0), Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(1, height + 1, 0), Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(0, height + 1, -1), Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
this.setBlock(world, pos.offset(0, height + 1, 1), Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean setBlock(IWorld world, BlockPos pos, BlockState state)
|
||||
{
|
||||
if (this.replace.matches(world, pos))
|
||||
{
|
||||
super.setBlock(world, pos, state);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkSpace(IWorld world, BlockPos pos)
|
||||
{
|
||||
for (int y = 0; y <= 4; y++)
|
||||
{
|
||||
for (int x = -2; x <= 2; x++)
|
||||
{
|
||||
for (int z = -2; z <= 2; z++)
|
||||
{
|
||||
BlockPos pos1 = pos.offset(x, y, z);
|
||||
if (pos1.getY() >= 255 || !this.replace.matches(world, pos1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.BushBlock;
|
||||
import net.minecraft.block.HugeMushroomBlock;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.GenerationSettings;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class SmallToadstoolFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK || world.getBlockState(pos).getBlock() == Blocks.MYCELIUM;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).canBeReplacedByLeaves(world, pos) || world.getBlockState(pos).getBlock() instanceof BushBlock;
|
||||
|
||||
public SmallToadstoolFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
|
||||
{
|
||||
super(deserializer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random p_212245_3_, BlockPos startPos, NoFeatureConfig p_212245_5_) {
|
||||
while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {
|
||||
startPos = startPos.below();
|
||||
}
|
||||
|
||||
if (!this.placeOn.matches(world, startPos.offset(0, 0, 0))) {
|
||||
// Abandon if we can't place the tree on this block
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.checkSpace(world, startPos.above())) {
|
||||
// Abandon if there isn't enough room
|
||||
return false;
|
||||
}
|
||||
|
||||
BlockPos pos = startPos.above();
|
||||
|
||||
int height = 1 + p_212245_3_.nextInt(2);
|
||||
|
||||
for (int y = 0; y < height; y++) {
|
||||
this.setBlock(world, pos.above(y), Blocks.MUSHROOM_STEM.defaultBlockState());
|
||||
}
|
||||
|
||||
this.setBlock(world, pos.offset(0, height, 0), BOPBlocks.toadstool_block.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean setBlock(IWorld world, BlockPos pos, BlockState state)
|
||||
{
|
||||
if (this.replace.matches(world, pos))
|
||||
{
|
||||
super.setBlock(world, pos, state);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkSpace(IWorld world, BlockPos pos)
|
||||
{
|
||||
for (int y = 0; y <= 4; y++)
|
||||
{
|
||||
for (int x = -2; x <= 2; x++)
|
||||
{
|
||||
for (int z = -2; z <= 2; z++)
|
||||
{
|
||||
BlockPos pos1 = pos.offset(x, y, z);
|
||||
if (pos1.getY() >= 255 || !this.replace.matches(world, pos1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -13,12 +13,10 @@ import biomesoplenty.common.biome.BiomeRegistry;
|
|||
import biomesoplenty.common.biome.nether.*;
|
||||
import biomesoplenty.common.biome.overworld.*;
|
||||
import biomesoplenty.common.world.WorldTypeBOP;
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.entity.villager.IVillagerType;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
@ -71,6 +69,7 @@ public class ModBiomes
|
|||
registerBiome(new FirClearingBiome(), "fir_clearing");
|
||||
registerBiome(new FloodplainBiome(), "floodplain");
|
||||
registerBiome(new FlowerMeadowBiome(), "flower_meadow");
|
||||
registerBiome(new FungalJungleBiome(), "fungal_jungle");
|
||||
registerBiome(new GhostForestBiome(), "ghost_forest");
|
||||
registerBiome(new GrasslandBiome(), "grassland");
|
||||
registerBiome(new GroveBiome(), "grove");
|
||||
|
@ -119,7 +118,6 @@ public class ModBiomes
|
|||
|
||||
//Nether Biomes
|
||||
registerBiome(new AshenInfernoBiome(), "ashen_inferno");
|
||||
registerBiome(new FungiForestBiome(), "fungi_forest");
|
||||
registerBiome(new GlowstoneGrottoBiome(), "glowstone_grotto");
|
||||
registerBiome(new UndergardenBiome(), "undergarden");
|
||||
registerBiome(new VisceralHeapBiome(), "visceral_heap");
|
||||
|
@ -167,75 +165,75 @@ public class ModBiomes
|
|||
private static void registerBiomeDictionaryTags()
|
||||
{
|
||||
//Overworld Biomes
|
||||
registerBiomeToDictionary(alps, Type.MOUNTAIN, Type.SNOWY, Type.COLD);
|
||||
registerBiomeToDictionary(alps_foothills, Type.MOUNTAIN, Type.SNOWY, Type.FOREST, Type.SPARSE, Type.COLD);
|
||||
registerBiomeToDictionary(bayou, Type.SWAMP, Type.HOT, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(bog, Type.SWAMP, Type.CONIFEROUS, Type.COLD, Type.LUSH, Type.WET);
|
||||
registerBiomeToDictionary(boreal_forest, Type.FOREST, Type.CONIFEROUS, Type.HILLS, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(brushland, Type.SAVANNA, Type.HOT, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(chaparral, Type.PLAINS, Type.DRY, Type.HILLS);
|
||||
registerBiomeToDictionary(cherry_blossom_grove, Type.FOREST, Type.MAGICAL, Type.LUSH, Type.SPARSE);
|
||||
registerBiomeToDictionary(cold_desert, Type.SNOWY, Type.DRY, Type.COLD);
|
||||
registerBiomeToDictionary(coniferous_forest, Type.CONIFEROUS, Type.FOREST, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(dead_forest, Type.FOREST, Type.DEAD, Type.COLD, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(fir_clearing, Type.CONIFEROUS, Type.FOREST, Type.COLD, Type.SPARSE);
|
||||
registerBiomeToDictionary(floodplain, Type.JUNGLE, Type.WATER, Type.HOT, Type.WET);
|
||||
registerBiomeToDictionary(flower_meadow, Type.PLAINS, Type.LUSH);
|
||||
registerBiomeToDictionary(ghost_forest, Type.FOREST, Type.SWAMP, Type.DEAD, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(grassland, Type.PLAINS, Type.HILLS, Type.WET);
|
||||
registerBiomeToDictionary(gravel_beach, Type.BEACH);
|
||||
registerBiomeToDictionary(grove, Type.FOREST, Type.PLAINS, Type.LUSH, Type.SPARSE);
|
||||
registerBiomeToDictionary(highland, Type.MOUNTAIN, Type.HILLS, Type.WET);
|
||||
registerBiomeToDictionary(highland_moor, Type.HILLS, Type.WET);
|
||||
registerBiomeToDictionary(lavender_field, Type.PLAINS, Type.MAGICAL, Type.LUSH);
|
||||
registerBiomeToDictionary(lush_grassland, Type.JUNGLE, Type.PLAINS, Type.HILLS, Type.WET, Type.HOT, Type.LUSH);
|
||||
registerBiomeToDictionary(lush_swamp, Type.SWAMP, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(mangrove, Type.WATER, Type.WET, Type.DENSE, Type.LUSH);
|
||||
registerBiomeToDictionary(maple_woods, Type.FOREST, Type.CONIFEROUS, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(marsh, Type.WATER, Type.WET, Type.LUSH);
|
||||
registerBiomeToDictionary(meadow, Type.PLAINS, Type.FOREST, Type.LUSH, Type.COLD);
|
||||
registerBiomeToDictionary(mire, Type.SWAMP, Type.DEAD, Type.WET);
|
||||
registerBiomeToDictionary(mystic_grove, Type.MAGICAL, Type.FOREST, Type.LUSH, Type.DENSE, Type.RARE);
|
||||
registerBiomeToDictionary(oasis, Type.SANDY, Type.LUSH, Type.JUNGLE, Type.HOT, Type.SPARSE);
|
||||
registerBiomeToDictionary(ominous_woods, Type.MAGICAL, Type.FOREST, Type.SPOOKY, Type.DEAD, Type.DENSE, Type.RARE);
|
||||
registerBiomeToDictionary(orchard, Type.FOREST, Type.PLAINS, Type.DENSE, Type.LUSH);
|
||||
registerBiomeToDictionary(origin_beach, Type.BEACH, Type.RARE);
|
||||
registerBiomeToDictionary(origin_hills, Type.WATER, Type.FOREST, Type.RARE);
|
||||
registerBiomeToDictionary(outback, Type.SANDY, Type.SAVANNA, Type.HOT, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(overgrown_cliffs, Type.MOUNTAIN, Type.HILLS, Type.LUSH, Type.JUNGLE, Type.DENSE, Type.HOT);
|
||||
registerBiomeToDictionary(pasture, Type.PLAINS, Type.DRY);
|
||||
registerBiomeToDictionary(poppy_field, Type.PLAINS, Type.DRY, Type.LUSH, Type.SPARSE);
|
||||
registerBiomeToDictionary(prairie, Type.PLAINS, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(pumpkin_patch, Type.FOREST, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(rainbow_valley, Type.WATER, Type.FOREST, Type.LUSH, Type.DENSE, Type.MAGICAL, Type.RARE);
|
||||
registerBiomeToDictionary(rainforest, Type.JUNGLE, Type.FOREST, Type.LUSH, Type.HILLS, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(redwood_forest, Type.FOREST, Type.DENSE);
|
||||
registerBiomeToDictionary(redwood_forest_edge, Type.FOREST, Type.DENSE);
|
||||
registerBiomeToDictionary(scrubland, Type.SAVANNA, Type.SPARSE, Type.DRY);
|
||||
registerBiomeToDictionary(seasonal_forest, Type.FOREST, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(shield, Type.FOREST, Type.COLD, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(shrubland, Type.PLAINS, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(silkglade, Type.FOREST, Type.DEAD, Type.SPOOKY, Type.DRY, Type.DENSE);
|
||||
registerBiomeToDictionary(snowy_coniferous_forest, Type.FOREST, Type.CONIFEROUS, Type.SNOWY, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(snowy_fir_clearing, Type.FOREST, Type.CONIFEROUS, Type.SNOWY, Type.COLD, Type.SPARSE);
|
||||
registerBiomeToDictionary(snowy_forest, Type.SNOWY, Type.FOREST, Type.COLD, Type.SPARSE);
|
||||
registerBiomeToDictionary(steppe, Type.PLAINS, Type.HILLS, Type.DRY);
|
||||
registerBiomeToDictionary(temperate_rainforest, Type.FOREST, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(temperate_rainforest_hills, Type.FOREST, Type.HILLS, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(tropical_rainforest, Type.JUNGLE, Type.LUSH, Type.HOT, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(tropics, Type.WATER, Type.JUNGLE, Type.LUSH, Type.DENSE);
|
||||
registerBiomeToDictionary(tundra, Type.COLD, Type.WASTELAND, Type.DEAD, Type.SPARSE);
|
||||
registerBiomeToDictionary(volcano, Type.WATER, Type.DEAD, Type.WASTELAND, Type.MOUNTAIN, Type.HOT, Type.DRY);
|
||||
registerBiomeToDictionary(volcano_edge, Type.WATER, Type.DEAD, Type.WASTELAND, Type.MOUNTAIN, Type.HOT, Type.DRY);
|
||||
registerBiomeToDictionary(wasteland, Type.WASTELAND, Type.DEAD, Type.DRY, Type.SPARSE, Type.HOT);
|
||||
registerBiomeToDictionary(wetland, Type.SWAMP, Type.FOREST, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(white_beach, Type.BEACH);
|
||||
registerBiomeToDictionary(woodland, Type.FOREST, Type.DENSE);
|
||||
registerBiomeToDictionary(xeric_shrubland, Type.SANDY, Type.SAVANNA, Type.LUSH, Type.HOT, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(alps, Type.OVERWORLD, Type.MOUNTAIN, Type.SNOWY, Type.COLD);
|
||||
registerBiomeToDictionary(alps_foothills, Type.OVERWORLD, Type.MOUNTAIN, Type.SNOWY, Type.FOREST, Type.SPARSE, Type.COLD);
|
||||
registerBiomeToDictionary(bayou, Type.OVERWORLD, Type.SWAMP, Type.HOT, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(bog, Type.OVERWORLD, Type.SWAMP, Type.CONIFEROUS, Type.COLD, Type.LUSH, Type.WET);
|
||||
registerBiomeToDictionary(boreal_forest, Type.OVERWORLD, Type.FOREST, Type.CONIFEROUS, Type.HILLS, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(brushland, Type.OVERWORLD, Type.SAVANNA, Type.HOT, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(chaparral, Type.OVERWORLD, Type.PLAINS, Type.DRY, Type.HILLS);
|
||||
registerBiomeToDictionary(cherry_blossom_grove, Type.OVERWORLD, Type.FOREST, Type.MAGICAL, Type.LUSH, Type.SPARSE);
|
||||
registerBiomeToDictionary(cold_desert, Type.OVERWORLD, Type.SNOWY, Type.DRY, Type.COLD);
|
||||
registerBiomeToDictionary(coniferous_forest, Type.OVERWORLD, Type.CONIFEROUS, Type.FOREST, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(dead_forest, Type.OVERWORLD, Type.FOREST, Type.DEAD, Type.COLD, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(fir_clearing, Type.OVERWORLD, Type.CONIFEROUS, Type.FOREST, Type.COLD, Type.SPARSE);
|
||||
registerBiomeToDictionary(floodplain, Type.OVERWORLD, Type.JUNGLE, Type.WATER, Type.HOT, Type.WET);
|
||||
registerBiomeToDictionary(flower_meadow, Type.OVERWORLD, Type.PLAINS, Type.LUSH);
|
||||
registerBiomeToDictionary(fungal_jungle, Type.OVERWORLD, Type.MAGICAL, Type.MUSHROOM, Type.JUNGLE, Type.LUSH, Type.DENSE, Type.RARE);
|
||||
registerBiomeToDictionary(ghost_forest, Type.OVERWORLD, Type.FOREST, Type.SWAMP, Type.DEAD, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(grassland, Type.OVERWORLD, Type.PLAINS, Type.HILLS, Type.WET);
|
||||
registerBiomeToDictionary(gravel_beach, Type.OVERWORLD, Type.BEACH);
|
||||
registerBiomeToDictionary(grove, Type.OVERWORLD, Type.FOREST, Type.PLAINS, Type.LUSH, Type.SPARSE);
|
||||
registerBiomeToDictionary(highland, Type.OVERWORLD, Type.MOUNTAIN, Type.HILLS, Type.WET);
|
||||
registerBiomeToDictionary(highland_moor, Type.OVERWORLD, Type.HILLS, Type.WET);
|
||||
registerBiomeToDictionary(lavender_field, Type.OVERWORLD, Type.PLAINS, Type.MAGICAL, Type.LUSH);
|
||||
registerBiomeToDictionary(lush_grassland, Type.OVERWORLD, Type.JUNGLE, Type.PLAINS, Type.HILLS, Type.WET, Type.HOT, Type.LUSH);
|
||||
registerBiomeToDictionary(lush_swamp, Type.OVERWORLD, Type.SWAMP, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(mangrove, Type.OVERWORLD, Type.WATER, Type.WET, Type.DENSE, Type.LUSH);
|
||||
registerBiomeToDictionary(maple_woods, Type.OVERWORLD, Type.FOREST, Type.CONIFEROUS, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(marsh, Type.OVERWORLD, Type.WET, Type.LUSH);
|
||||
registerBiomeToDictionary(meadow, Type.OVERWORLD, Type.PLAINS, Type.FOREST, Type.LUSH, Type.COLD);
|
||||
registerBiomeToDictionary(mire, Type.OVERWORLD, Type.SWAMP, Type.DEAD, Type.WET);
|
||||
registerBiomeToDictionary(mystic_grove, Type.OVERWORLD, Type.MAGICAL, Type.FOREST, Type.LUSH, Type.DENSE, Type.RARE);
|
||||
registerBiomeToDictionary(oasis, Type.OVERWORLD, Type.SANDY, Type.LUSH, Type.JUNGLE, Type.HOT, Type.SPARSE);
|
||||
registerBiomeToDictionary(ominous_woods, Type.OVERWORLD, Type.MAGICAL, Type.FOREST, Type.SPOOKY, Type.DEAD, Type.DENSE, Type.RARE);
|
||||
registerBiomeToDictionary(orchard, Type.OVERWORLD, Type.FOREST, Type.PLAINS, Type.DENSE, Type.LUSH);
|
||||
registerBiomeToDictionary(origin_beach, Type.OVERWORLD, Type.BEACH, Type.RARE);
|
||||
registerBiomeToDictionary(origin_hills, Type.OVERWORLD, Type.FOREST, Type.RARE);
|
||||
registerBiomeToDictionary(outback, Type.OVERWORLD, Type.SANDY, Type.SAVANNA, Type.HOT, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(overgrown_cliffs, Type.OVERWORLD, Type.MOUNTAIN, Type.HILLS, Type.LUSH, Type.JUNGLE, Type.DENSE, Type.HOT);
|
||||
registerBiomeToDictionary(pasture, Type.OVERWORLD, Type.PLAINS, Type.DRY);
|
||||
registerBiomeToDictionary(poppy_field, Type.OVERWORLD, Type.PLAINS, Type.DRY, Type.LUSH, Type.SPARSE);
|
||||
registerBiomeToDictionary(prairie, Type.OVERWORLD, Type.PLAINS, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(pumpkin_patch, Type.OVERWORLD, Type.FOREST, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(rainbow_valley, Type.OVERWORLD, Type.FOREST, Type.LUSH, Type.DENSE, Type.MAGICAL, Type.RARE);
|
||||
registerBiomeToDictionary(rainforest, Type.OVERWORLD, Type.JUNGLE, Type.FOREST, Type.LUSH, Type.HILLS, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(redwood_forest, Type.OVERWORLD, Type.FOREST, Type.DENSE);
|
||||
registerBiomeToDictionary(redwood_forest_edge, Type.OVERWORLD, Type.FOREST, Type.DENSE);
|
||||
registerBiomeToDictionary(scrubland, Type.OVERWORLD, Type.SAVANNA, Type.SPARSE, Type.DRY);
|
||||
registerBiomeToDictionary(seasonal_forest, Type.OVERWORLD, Type.FOREST, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(shield, Type.OVERWORLD, Type.FOREST, Type.COLD, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(shrubland, Type.OVERWORLD, Type.PLAINS, Type.DRY, Type.SPARSE);
|
||||
registerBiomeToDictionary(silkglade, Type.OVERWORLD, Type.FOREST, Type.DEAD, Type.SPOOKY, Type.DRY, Type.DENSE);
|
||||
registerBiomeToDictionary(snowy_coniferous_forest, Type.OVERWORLD, Type.FOREST, Type.CONIFEROUS, Type.SNOWY, Type.COLD, Type.DENSE);
|
||||
registerBiomeToDictionary(snowy_fir_clearing, Type.OVERWORLD, Type.FOREST, Type.CONIFEROUS, Type.SNOWY, Type.COLD, Type.SPARSE);
|
||||
registerBiomeToDictionary(snowy_forest, Type.OVERWORLD, Type.SNOWY, Type.FOREST, Type.COLD, Type.SPARSE);
|
||||
registerBiomeToDictionary(steppe, Type.OVERWORLD, Type.PLAINS, Type.HILLS, Type.DRY);
|
||||
registerBiomeToDictionary(temperate_rainforest, Type.OVERWORLD, Type.FOREST, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(temperate_rainforest_hills, Type.OVERWORLD, Type.FOREST, Type.HILLS, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(tropical_rainforest, Type.OVERWORLD, Type.JUNGLE, Type.LUSH, Type.HOT, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(tropics, Type.OVERWORLD, Type.JUNGLE, Type.LUSH, Type.DENSE);
|
||||
registerBiomeToDictionary(tundra, Type.OVERWORLD, Type.COLD, Type.WASTELAND, Type.DEAD, Type.SPARSE);
|
||||
registerBiomeToDictionary(volcano, Type.OVERWORLD, Type.DEAD, Type.WASTELAND, Type.MOUNTAIN, Type.HOT, Type.DRY);
|
||||
registerBiomeToDictionary(volcano_edge, Type.OVERWORLD, Type.DEAD, Type.WASTELAND, Type.MOUNTAIN, Type.HOT, Type.DRY);
|
||||
registerBiomeToDictionary(wasteland, Type.OVERWORLD, Type.WASTELAND, Type.DEAD, Type.DRY, Type.SPARSE, Type.HOT);
|
||||
registerBiomeToDictionary(wetland, Type.OVERWORLD, Type.SWAMP, Type.FOREST, Type.LUSH, Type.WET, Type.DENSE);
|
||||
registerBiomeToDictionary(white_beach, Type.OVERWORLD, Type.BEACH);
|
||||
registerBiomeToDictionary(woodland, Type.OVERWORLD, Type.FOREST, Type.DENSE);
|
||||
registerBiomeToDictionary(xeric_shrubland, Type.OVERWORLD, Type.SANDY, Type.SAVANNA, Type.LUSH, Type.HOT, Type.DRY, Type.SPARSE);
|
||||
|
||||
//Nether Biomes
|
||||
registerBiomeToDictionary(ashen_inferno, Type.NETHER, Type.HOT);
|
||||
registerBiomeToDictionary(fungi_forest, Type.NETHER, Type.HOT);
|
||||
registerBiomeToDictionary(glowstone_grotto, Type.NETHER, Type.HOT);
|
||||
registerBiomeToDictionary(undergarden, Type.NETHER, Type.HOT);
|
||||
registerBiomeToDictionary(visceral_heap, Type.NETHER, Type.HOT);
|
||||
|
@ -257,6 +255,7 @@ public class ModBiomes
|
|||
registerVillagerType(fir_clearing, IVillagerType.TAIGA);
|
||||
registerVillagerType(floodplain, IVillagerType.JUNGLE);
|
||||
registerVillagerType(flower_meadow, IVillagerType.TAIGA);
|
||||
registerVillagerType(fungal_jungle, IVillagerType.JUNGLE);
|
||||
registerVillagerType(ghost_forest, IVillagerType.SWAMP);
|
||||
registerVillagerType(grassland, IVillagerType.PLAINS);
|
||||
registerVillagerType(gravel_beach, IVillagerType.PLAINS);
|
||||
|
|
|
@ -58,6 +58,9 @@ public class ModBlocks
|
|||
ash_block = registerBlock(new AshBlock(Block.Properties.of(Material.SAND, MaterialColor.TERRACOTTA_BLACK).strength(0.4F).harvestLevel(0).harvestTool(ToolType.SHOVEL).sound(SoundType.SAND)), "ash_block");
|
||||
flesh = registerBlock(new FleshBlock(Block.Properties.of(Material.SPONGE, MaterialColor.TERRACOTTA_RED).strength(0.4F).harvestLevel(0).harvestTool(ToolType.AXE).sound(new SoundType(1.0F, 0.5F, SoundEvents.CORAL_BLOCK_BREAK, SoundEvents.CORAL_BLOCK_STEP, SoundEvents.CORAL_BLOCK_PLACE, SoundEvents.CORAL_BLOCK_HIT, SoundEvents.CORAL_BLOCK_FALL))), "flesh");
|
||||
|
||||
toadstool_block = registerBlock(new HugeMushroomBlock(Block.Properties.of(Material.WOOD, MaterialColor.COLOR_ORANGE).strength(0.2F).sound(SoundType.WOOD)), "toadstool_block");
|
||||
glowshroom_block = registerBlock(new HugeMushroomBlock(Block.Properties.of(Material.WOOD, MaterialColor.DIAMOND).strength(0.2F).sound(SoundType.WOOD).lightLevel(10)), "glowshroom_block");
|
||||
|
||||
//Trees
|
||||
origin_sapling = registerBlock(new SaplingBlockBOP(new OriginTree(), Block.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.GRASS)), "origin_sapling");
|
||||
origin_leaves = registerBlock(new LeavesBlock(Block.Properties.of(Material.LEAVES, MaterialColor.EMERALD).strength(0.2F).randomTicks().sound(SoundType.GRASS).noOcclusion()), "origin_leaves");
|
||||
|
|
|
@ -53,8 +53,11 @@ public class ModVanillaCompat
|
|||
addFeature(Biomes.MODIFIED_GRAVELLY_MOUNTAINS, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.VIOLET_FEATURE.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(2))));
|
||||
|
||||
addFeature(Biomes.MUSHROOM_FIELDS, GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.toadstool.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(3))));
|
||||
addFeature(Biomes.MUSHROOM_FIELDS, GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.glowshroom.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(2))));
|
||||
addFeature(Biomes.MUSHROOM_FIELD_SHORE, GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.toadstool.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(2))));
|
||||
addFeature(Biomes.MUSHROOM_FIELDS, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.HUGE_TOADSTOOL.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(2))));
|
||||
addFeature(Biomes.MUSHROOM_FIELDS, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.SMALL_TOADSTOOL.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(1))));
|
||||
addFeature(Biomes.MUSHROOM_FIELD_SHORE, GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.toadstool.defaultBlockState())).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(3))));
|
||||
addFeature(Biomes.MUSHROOM_FIELD_SHORE, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.HUGE_TOADSTOOL.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(2))));
|
||||
addFeature(Biomes.MUSHROOM_FIELD_SHORE, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.SMALL_TOADSTOOL.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(1))));
|
||||
|
||||
addFeature(Biomes.SAVANNA, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.WILDFLOWER_FEATURE.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(3))));
|
||||
addFeature(Biomes.SAVANNA_PLATEAU, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.WILDFLOWER_FEATURE.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(3))));
|
||||
|
@ -84,7 +87,6 @@ public class ModVanillaCompat
|
|||
addFeature(Biomes.TAIGA_HILLS, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.VIOLET_FEATURE.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(2))));
|
||||
addFeature(Biomes.TAIGA_MOUNTAINS, GenerationStage.Decoration.VEGETAL_DECORATION, BOPBiomeFeatures.VIOLET_FEATURE.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_32.configured(new FrequencyConfig(2))));
|
||||
|
||||
|
||||
//Flammability
|
||||
registerFlammable(BOPBlocks.origin_leaves, 30, 60);
|
||||
registerFlammable(BOPBlocks.flowering_oak_leaves, 30, 60);
|
||||
|
@ -236,6 +238,9 @@ public class ModVanillaCompat
|
|||
registerStrippable(BOPBlocks.hellbark_wood, BOPBlocks.stripped_hellbark_wood);
|
||||
|
||||
//Compostable Blocks
|
||||
registerCompostable(0.85F, BOPBlocks.glowshroom_block);
|
||||
registerCompostable(0.85F, BOPBlocks.toadstool_block);
|
||||
|
||||
registerCompostable(0.3F, BOPBlocks.origin_sapling);
|
||||
registerCompostable(0.3F, BOPBlocks.origin_leaves);
|
||||
registerCompostable(0.3F, BOPBlocks.flowering_oak_sapling);
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"multipart": [
|
||||
{ "when": { "north": true },
|
||||
"apply": { "model": "biomesoplenty:block/glowshroom_block" }
|
||||
},
|
||||
{ "when": { "east": true },
|
||||
"apply": { "model": "biomesoplenty:block/glowshroom_block", "y": 90, "uvlock": true }
|
||||
},
|
||||
{ "when": { "south": true },
|
||||
"apply": { "model": "biomesoplenty:block/glowshroom_block", "y": 180, "uvlock": true }
|
||||
},
|
||||
{ "when": { "west": true },
|
||||
"apply": { "model": "biomesoplenty:block/glowshroom_block", "y": 270, "uvlock": true }
|
||||
},
|
||||
{ "when": { "up": true },
|
||||
"apply": { "model": "biomesoplenty:block/glowshroom_block", "x": 270, "uvlock": true }
|
||||
},
|
||||
{ "when": { "down": true },
|
||||
"apply": { "model": "biomesoplenty:block/glowshroom_block", "x": 90, "uvlock": true }
|
||||
},
|
||||
{ "when": { "north": false },
|
||||
"apply": { "model": "block/mushroom_block_inside" }
|
||||
},
|
||||
{ "when": { "east": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "y": 90, "uvlock": false }
|
||||
},
|
||||
{ "when": { "south": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "y": 180, "uvlock": false }
|
||||
},
|
||||
{ "when": { "west": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "y": 270, "uvlock": false }
|
||||
},
|
||||
{ "when": { "up": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "x": 270, "uvlock": false }
|
||||
},
|
||||
{ "when": { "down": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "x": 90, "uvlock": false }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"multipart": [
|
||||
{ "when": { "north": true },
|
||||
"apply": { "model": "biomesoplenty:block/toadstool_block" }
|
||||
},
|
||||
{ "when": { "east": true },
|
||||
"apply": { "model": "biomesoplenty:block/toadstool_block", "y": 90, "uvlock": true }
|
||||
},
|
||||
{ "when": { "south": true },
|
||||
"apply": { "model": "biomesoplenty:block/toadstool_block", "y": 180, "uvlock": true }
|
||||
},
|
||||
{ "when": { "west": true },
|
||||
"apply": { "model": "biomesoplenty:block/toadstool_block", "y": 270, "uvlock": true }
|
||||
},
|
||||
{ "when": { "up": true },
|
||||
"apply": { "model": "biomesoplenty:block/toadstool_block", "x": 270, "uvlock": true }
|
||||
},
|
||||
{ "when": { "down": true },
|
||||
"apply": { "model": "biomesoplenty:block/toadstool_block", "x": 90, "uvlock": true }
|
||||
},
|
||||
{ "when": { "north": false },
|
||||
"apply": { "model": "block/mushroom_block_inside" }
|
||||
},
|
||||
{ "when": { "east": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "y": 90, "uvlock": false }
|
||||
},
|
||||
{ "when": { "south": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "y": 180, "uvlock": false }
|
||||
},
|
||||
{ "when": { "west": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "y": 270, "uvlock": false }
|
||||
},
|
||||
{ "when": { "up": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "x": 270, "uvlock": false }
|
||||
},
|
||||
{ "when": { "down": false },
|
||||
"apply": { "model": "block/mushroom_block_inside", "x": 90, "uvlock": false }
|
||||
}
|
||||
]
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
"biome.biomesoplenty.fir_clearing": "Fir Clearing",
|
||||
"biome.biomesoplenty.floodplain": "Floodplain",
|
||||
"biome.biomesoplenty.flower_meadow": "Flower Meadow",
|
||||
"biome.biomesoplenty.fungi_forest": "Fungi Forest",
|
||||
"biome.biomesoplenty.fungal_jungle": "Fungal Jungle",
|
||||
"biome.biomesoplenty.ghost_forest": "Ghost Forest",
|
||||
"biome.biomesoplenty.glowstone_grotto": "Glowstone Grotto",
|
||||
"biome.biomesoplenty.grassland": "Grassland",
|
||||
|
@ -158,6 +158,7 @@
|
|||
"block.biomesoplenty.flowering_oak_sapling": "Flowering Oak Sapling",
|
||||
"block.biomesoplenty.glowflower": "Glowflower",
|
||||
"block.biomesoplenty.glowshroom": "Glowshroom",
|
||||
"block.biomesoplenty.glowshroom_block": "Glowshroom Block",
|
||||
"block.biomesoplenty.goldenrod": "Goldenrod",
|
||||
"block.biomesoplenty.hellbark_button": "Hellbark Button",
|
||||
"block.biomesoplenty.hellbark_door": "Hellbark Door",
|
||||
|
@ -330,6 +331,7 @@
|
|||
"block.biomesoplenty.stripped_willow_wood": "Stripped Willow Wood",
|
||||
"block.biomesoplenty.tall_cattail": "Tall Cattail",
|
||||
"block.biomesoplenty.toadstool": "Toadstool",
|
||||
"block.biomesoplenty.toadstool_block": "Toadstool Block",
|
||||
"block.biomesoplenty.umbran_button": "Umbran Button",
|
||||
"block.biomesoplenty.umbran_door": "Umbran Door",
|
||||
"block.biomesoplenty.umbran_fence": "Umbran Fence",
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"textures": {
|
||||
"texture": "biomesoplenty:block/glowshroom_block",
|
||||
"particle": "biomesoplenty:block/glowshroom_block"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 16, 0 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#texture", "cullface":"north" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:block/glowshroom_block"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"textures": {
|
||||
"texture": "biomesoplenty:block/toadstool_block",
|
||||
"particle": "biomesoplenty:block/toadstool_block"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 16, 0 ],
|
||||
"faces": {
|
||||
"north": { "texture": "#texture", "cullface":"north" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:block/toadstool_block"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/glowshroom_block_inventory"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/toadstool_block_inventory"
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 372 B |
Binary file not shown.
After Width: | Height: | Size: 259 B |
Binary file not shown.
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 260 B |
Binary file not shown.
After Width: | Height: | Size: 251 B |
|
@ -98,6 +98,12 @@
|
|||
"conditions": {
|
||||
"biome": "biomesoplenty:flower_meadow"
|
||||
}
|
||||
},
|
||||
"fungal_jungle": {
|
||||
"trigger": "minecraft:location",
|
||||
"conditions": {
|
||||
"biome": "biomesoplenty:fungal_jungle"
|
||||
}
|
||||
},
|
||||
"ghost_forest": {
|
||||
"trigger": "minecraft:location",
|
||||
|
@ -410,12 +416,6 @@
|
|||
"conditions": {
|
||||
"biome": "biomesoplenty:ashen_inferno"
|
||||
}
|
||||
},
|
||||
"fungi_forest": {
|
||||
"trigger": "minecraft:location",
|
||||
"conditions": {
|
||||
"biome": "biomesoplenty:fungi_forest"
|
||||
}
|
||||
},
|
||||
"glowstone_grotto": {
|
||||
"trigger": "minecraft:location",
|
||||
|
|
|
@ -97,6 +97,12 @@
|
|||
"conditions": {
|
||||
"biome": "biomesoplenty:flower_meadow"
|
||||
}
|
||||
},
|
||||
"fungal_jungle": {
|
||||
"trigger": "minecraft:location",
|
||||
"conditions": {
|
||||
"biome": "biomesoplenty:fungal_jungle"
|
||||
}
|
||||
},
|
||||
"ghost_forest": {
|
||||
"trigger": "minecraft:location",
|
||||
|
@ -409,12 +415,6 @@
|
|||
"conditions": {
|
||||
"biome": "biomesoplenty:ashen_inferno"
|
||||
}
|
||||
},
|
||||
"fungi_forest": {
|
||||
"trigger": "minecraft:location",
|
||||
"conditions": {
|
||||
"biome": "biomesoplenty:fungi_forest"
|
||||
}
|
||||
},
|
||||
"glowstone_grotto": {
|
||||
"trigger": "minecraft:location",
|
||||
|
@ -451,6 +451,7 @@
|
|||
"fir_clearing",
|
||||
"floodplain",
|
||||
"flower_meadow",
|
||||
"fungal_jungle",
|
||||
"ghost_forest",
|
||||
"grassland",
|
||||
"gravel_beach",
|
||||
|
@ -503,7 +504,6 @@
|
|||
"woodland",
|
||||
"xeric_shrubland",
|
||||
"ashen_inferno",
|
||||
"fungi_forest",
|
||||
"glowstone_grotto",
|
||||
"undergarden",
|
||||
"visceral_heap"
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "biomesoplenty:glowshroom_block"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": {
|
||||
"min": -6.0,
|
||||
"max": 2.0,
|
||||
"type": "minecraft:uniform"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:limit_count",
|
||||
"limit": {
|
||||
"min": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "biomesoplenty:glowshroom"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "biomesoplenty:toadstool_block"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": {
|
||||
"min": -6.0,
|
||||
"max": 2.0,
|
||||
"type": "minecraft:uniform"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:limit_count",
|
||||
"limit": {
|
||||
"min": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "biomesoplenty:toadstool"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue