Files
2020-05-06 05:37:07 +08:00

42 lines
2.4 KiB
Diff

--- ../src-base/minecraft/net/minecraft/world/biome/BiomePlains.java
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomePlains.java
@@ -80,6 +80,7 @@
this.decorator.grassPerChunk = 10;
DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.GRASS);
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(worldIn, rand, new net.minecraft.util.math.ChunkPos(pos), net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS))
for (int i = 0; i < 7; ++i)
{
int j = rand.nextInt(16) + 8;
@@ -89,7 +90,7 @@
}
}
- if (this.sunflowers)
+ if (this.sunflowers && net.minecraftforge.event.terraingen.TerrainGen.decorate(worldIn, rand, new net.minecraft.util.math.ChunkPos(pos), net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS))
{
DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.SUNFLOWER);
@@ -105,6 +106,21 @@
super.decorate(worldIn, rand, pos);
}
+ @Override
+ public void addDefaultFlowers()
+ {
+ BlockFlower red = net.minecraft.init.Blocks.RED_FLOWER;
+ BlockFlower yel = net.minecraft.init.Blocks.YELLOW_FLOWER;
+ addFlower(red.getDefaultState().withProperty(red.getTypeProperty(), BlockFlower.EnumFlowerType.ORANGE_TULIP), 3);
+ addFlower(red.getDefaultState().withProperty(red.getTypeProperty(), BlockFlower.EnumFlowerType.RED_TULIP), 3);
+ addFlower(red.getDefaultState().withProperty(red.getTypeProperty(), BlockFlower.EnumFlowerType.PINK_TULIP), 3);
+ addFlower(red.getDefaultState().withProperty(red.getTypeProperty(), BlockFlower.EnumFlowerType.WHITE_TULIP), 3);
+ addFlower(red.getDefaultState().withProperty(red.getTypeProperty(), BlockFlower.EnumFlowerType.POPPY), 20);
+ addFlower(red.getDefaultState().withProperty(red.getTypeProperty(), BlockFlower.EnumFlowerType.HOUSTONIA), 20);
+ addFlower(red.getDefaultState().withProperty(red.getTypeProperty(), BlockFlower.EnumFlowerType.OXEYE_DAISY), 20);
+ addFlower(yel.getDefaultState().withProperty(yel.getTypeProperty(), BlockFlower.EnumFlowerType.DANDELION), 30);
+ }
+
public WorldGenAbstractTree getRandomTreeFeature(Random rand)
{
return (WorldGenAbstractTree)(rand.nextInt(3) == 0 ? BIG_TREE_FEATURE : TREE_FEATURE);