diff --git a/MODSRC/vazkii/botania/api/item/IFlowerlessWorld.java b/MODSRC/vazkii/botania/api/item/IFlowerlessWorld.java new file mode 100644 index 000000000..f6b92ea27 --- /dev/null +++ b/MODSRC/vazkii/botania/api/item/IFlowerlessWorld.java @@ -0,0 +1,7 @@ +package vazkii.botania.api.item; + +/** + * A World Provider that implements this will not have Botania flowers generated. + */ +public interface IFlowerlessWorld { +} diff --git a/MODSRC/vazkii/botania/common/core/handler/BiomeDecorationHandler.java b/MODSRC/vazkii/botania/common/core/handler/BiomeDecorationHandler.java index 8402d4ab5..c695d2f75 100644 --- a/MODSRC/vazkii/botania/common/core/handler/BiomeDecorationHandler.java +++ b/MODSRC/vazkii/botania/common/core/handler/BiomeDecorationHandler.java @@ -13,6 +13,7 @@ package vazkii.botania.common.core.handler; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType; +import vazkii.botania.api.item.IFlowerlessWorld; import vazkii.botania.common.block.ModBlocks; import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.eventhandler.EventPriority; @@ -34,7 +35,7 @@ public class BiomeDecorationHandler { int y1 = y + event.rand.nextInt(4) - event.rand.nextInt(4); int z1 = z + event.rand.nextInt(8) - event.rand.nextInt(8); - if(event.world.isAirBlock(x1, y1, z1) && (!event.world.provider.hasNoSky || y1 < 127) && ModBlocks.flower.canBlockStay(event.world, x1, y1, z1)) + if(!(event.world.provider instanceof IFlowerlessWorld) && event.world.isAirBlock(x1, y1, z1) && (!event.world.provider.hasNoSky || y1 < 127) && ModBlocks.flower.canBlockStay(event.world, x1, y1, z1)) event.world.setBlock(x1, y1, z1, ModBlocks.flower, color, 2); } }