Java Code Examples for net.minecraft.block.BlockFlower#EnumFlowerType
The following examples show how to use
net.minecraft.block.BlockFlower#EnumFlowerType .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BiomeLushHills.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { double d0 = GRASS_COLOR_NOISE.getValue((double) pos.getX() / 200.0D, (double) pos.getZ() / 200.0D); if (d0 < -0.9D) { int j = rand.nextInt(4); switch (j) { case 0: return BlockFlower.EnumFlowerType.ORANGE_TULIP; case 1: return BlockFlower.EnumFlowerType.RED_TULIP; case 2: return BlockFlower.EnumFlowerType.PINK_TULIP; case 3: default: return BlockFlower.EnumFlowerType.WHITE_TULIP; } } else if (rand.nextInt(3) > 0) { int i = rand.nextInt(3); return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); } else { return BlockFlower.EnumFlowerType.DANDELION; } }
Example 2
Source File: BiomeWoodlands.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { double d0 = GRASS_COLOR_NOISE.getValue((double) pos.getX() / 200.0D, (double) pos.getZ() / 200.0D); if (d0 < -0.8D) { int j = rand.nextInt(4); switch (j) { case 0: return BlockFlower.EnumFlowerType.ORANGE_TULIP; case 1: return BlockFlower.EnumFlowerType.RED_TULIP; case 2: return BlockFlower.EnumFlowerType.PINK_TULIP; case 3: default: return BlockFlower.EnumFlowerType.WHITE_TULIP; } } else if (rand.nextInt(3) > 0) { int i = rand.nextInt(3); return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); } else { return BlockFlower.EnumFlowerType.DANDELION; } }
Example 3
Source File: BiomeMeadow.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
public BiomeMeadow() { super(properties); decorator.treesPerChunk = 0; decorator.extraTreeChance = 0.2F; decorator.flowersPerChunk = 15; decorator.grassPerChunk = 15; decorator.reedsPerChunk = 2; spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 4)); spawnableCreatureList.add(new SpawnListEntry(EntityDonkey.class, 1, 1, 2)); this.flowers.clear(); for (BlockFlower.EnumFlowerType type : BlockFlower.EnumFlowerType.values()) { if (type.getBlockType() == BlockFlower.EnumFlowerColor.YELLOW) continue; if (type == BlockFlower.EnumFlowerType.BLUE_ORCHID) type = BlockFlower.EnumFlowerType.POPPY; addFlower(net.minecraft.init.Blocks.RED_FLOWER.getDefaultState().withProperty(net.minecraft.init.Blocks.RED_FLOWER.getTypeProperty(), type), 10); } }
Example 4
Source File: BiomeMeadow.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { double d0 = GRASS_COLOR_NOISE.getValue((double) pos.getX() / 200.0D, (double) pos.getZ() / 200.0D); if (d0 < -0.8D) { int j = rand.nextInt(5); switch (j) { case 0: return BlockFlower.EnumFlowerType.ORANGE_TULIP; case 1: return BlockFlower.EnumFlowerType.RED_TULIP; case 2: return BlockFlower.EnumFlowerType.PINK_TULIP; case 3: default: return BlockFlower.EnumFlowerType.WHITE_TULIP; } } else if (rand.nextInt(3) > 0) { int i = rand.nextInt(3); return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); } else { return BlockFlower.EnumFlowerType.DANDELION; } }
Example 5
Source File: BiomeLushHills.java From Traverse-Legacy-1-12-2 with MIT License | 6 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { double d0 = GRASS_COLOR_NOISE.getValue((double) pos.getX() / 200.0D, (double) pos.getZ() / 200.0D); if (d0 < -0.9D) { int j = rand.nextInt(4); switch (j) { case 0: return BlockFlower.EnumFlowerType.ORANGE_TULIP; case 1: return BlockFlower.EnumFlowerType.RED_TULIP; case 2: return BlockFlower.EnumFlowerType.PINK_TULIP; case 3: default: return BlockFlower.EnumFlowerType.WHITE_TULIP; } } else if (rand.nextInt(3) > 0) { int i = rand.nextInt(3); return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); } else { return BlockFlower.EnumFlowerType.DANDELION; } }
Example 6
Source File: BiomeWoodlands.java From Traverse-Legacy-1-12-2 with MIT License | 6 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { double d0 = GRASS_COLOR_NOISE.getValue((double) pos.getX() / 200.0D, (double) pos.getZ() / 200.0D); if (d0 < -0.8D) { int j = rand.nextInt(4); switch (j) { case 0: return BlockFlower.EnumFlowerType.ORANGE_TULIP; case 1: return BlockFlower.EnumFlowerType.RED_TULIP; case 2: return BlockFlower.EnumFlowerType.PINK_TULIP; case 3: default: return BlockFlower.EnumFlowerType.WHITE_TULIP; } } else if (rand.nextInt(3) > 0) { int i = rand.nextInt(3); return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); } else { return BlockFlower.EnumFlowerType.DANDELION; } }
Example 7
Source File: BiomeMeadow.java From Traverse-Legacy-1-12-2 with MIT License | 6 votes |
public BiomeMeadow() { super(properties); decorator.treesPerChunk = 0; decorator.extraTreeChance = 0.2F; decorator.flowersPerChunk = 15; decorator.grassPerChunk = 15; decorator.reedsPerChunk = 2; spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 4)); spawnableCreatureList.add(new SpawnListEntry(EntityDonkey.class, 1, 1, 2)); this.flowers.clear(); for (BlockFlower.EnumFlowerType type : BlockFlower.EnumFlowerType.values()) { if (type.getBlockType() == BlockFlower.EnumFlowerColor.YELLOW) continue; if (type == BlockFlower.EnumFlowerType.BLUE_ORCHID) type = BlockFlower.EnumFlowerType.POPPY; addFlower(net.minecraft.init.Blocks.RED_FLOWER.getDefaultState().withProperty(net.minecraft.init.Blocks.RED_FLOWER.getTypeProperty(), type), 10); } }
Example 8
Source File: BiomeMeadow.java From Traverse-Legacy-1-12-2 with MIT License | 6 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { double d0 = GRASS_COLOR_NOISE.getValue((double) pos.getX() / 200.0D, (double) pos.getZ() / 200.0D); if (d0 < -0.8D) { int j = rand.nextInt(5); switch (j) { case 0: return BlockFlower.EnumFlowerType.ORANGE_TULIP; case 1: return BlockFlower.EnumFlowerType.RED_TULIP; case 2: return BlockFlower.EnumFlowerType.PINK_TULIP; case 3: default: return BlockFlower.EnumFlowerType.WHITE_TULIP; } } else if (rand.nextInt(3) > 0) { int i = rand.nextInt(3); return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY); } else { return BlockFlower.EnumFlowerType.DANDELION; } }
Example 9
Source File: BiomeLushHills.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public BiomeLushHills() { super(properties); decorator.treesPerChunk = 2; decorator.flowersPerChunk = 10; decorator.grassPerChunk = 3; this.flowers.clear(); for (BlockFlower.EnumFlowerType type : BlockFlower.EnumFlowerType.values()) { if (type.getBlockType() == BlockFlower.EnumFlowerColor.YELLOW) continue; if (type == BlockFlower.EnumFlowerType.BLUE_ORCHID) type = BlockFlower.EnumFlowerType.POPPY; addFlower(net.minecraft.init.Blocks.RED_FLOWER.getDefaultState().withProperty(net.minecraft.init.Blocks.RED_FLOWER.getTypeProperty(), type), 10); } }
Example 10
Source File: BiomeWoodlands.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public BiomeWoodlands() { super(properties); decorator.treesPerChunk = 4; decorator.flowersPerChunk = 6; decorator.grassPerChunk = 16; this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 2, 4, 4)); this.flowers.clear(); for (BlockFlower.EnumFlowerType type : BlockFlower.EnumFlowerType.values()) { if (type.getBlockType() == BlockFlower.EnumFlowerColor.YELLOW) continue; if (type == BlockFlower.EnumFlowerType.BLUE_ORCHID) type = BlockFlower.EnumFlowerType.POPPY; addFlower(net.minecraft.init.Blocks.RED_FLOWER.getDefaultState().withProperty(net.minecraft.init.Blocks.RED_FLOWER.getTypeProperty(), type), 10); } }
Example 11
Source File: BiomeLushHills.java From Traverse-Legacy-1-12-2 with MIT License | 5 votes |
public BiomeLushHills() { super(properties); decorator.treesPerChunk = 2; decorator.flowersPerChunk = 10; decorator.grassPerChunk = 3; this.flowers.clear(); for (BlockFlower.EnumFlowerType type : BlockFlower.EnumFlowerType.values()) { if (type.getBlockType() == BlockFlower.EnumFlowerColor.YELLOW) continue; if (type == BlockFlower.EnumFlowerType.BLUE_ORCHID) type = BlockFlower.EnumFlowerType.POPPY; addFlower(net.minecraft.init.Blocks.RED_FLOWER.getDefaultState().withProperty(net.minecraft.init.Blocks.RED_FLOWER.getTypeProperty(), type), 10); } }
Example 12
Source File: BiomeWoodlands.java From Traverse-Legacy-1-12-2 with MIT License | 5 votes |
public BiomeWoodlands() { super(properties); decorator.treesPerChunk = 4; decorator.flowersPerChunk = 6; decorator.grassPerChunk = 16; this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 2, 4, 4)); this.flowers.clear(); for (BlockFlower.EnumFlowerType type : BlockFlower.EnumFlowerType.values()) { if (type.getBlockType() == BlockFlower.EnumFlowerColor.YELLOW) continue; if (type == BlockFlower.EnumFlowerType.BLUE_ORCHID) type = BlockFlower.EnumFlowerType.POPPY; addFlower(net.minecraft.init.Blocks.RED_FLOWER.getDefaultState().withProperty(net.minecraft.init.Blocks.RED_FLOWER.getTypeProperty(), type), 10); } }
Example 13
Source File: BiomeLushSwamp.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { return BlockFlower.EnumFlowerType.BLUE_ORCHID; }
Example 14
Source File: BiomeLushSwamp.java From Traverse-Legacy-1-12-2 with MIT License | 4 votes |
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) { return BlockFlower.EnumFlowerType.BLUE_ORCHID; }