From e6fedda008ea7d2272cb1264216af47f7bb4ae0b Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 23 Apr 2016 10:58:56 +1000 Subject: [PATCH] Massive rework of the API --- .../api/biome/IExtendedBiome.java | 16 ++-- .../biomesoplenty/api/block/BOPBlocks.java | 46 ----------- .../api/config/IBOPWorldSettings.java | 20 +++++ .../biomesoplenty/api/config/IConfigObj.java | 77 +++++++++++++++++++ .../{common => api}/enums/BOPClimates.java | 16 ++-- .../generation/BOPGeneratorBase.java | 4 +- .../generation/GeneratorStage.java | 2 +- .../api/generation/Generators.java | 13 ++++ .../api/generation/IBOPGenLayer.java | 13 ++++ .../api/generation/IGenerationManager.java | 21 +++++ .../{biome => }/generation/IGenerator.java | 4 +- .../api/generation/IGeneratorRegistry.java | 20 +++++ .../biome/overworld}/BOPBiome.java | 47 ++++++----- .../common/biome/overworld/BiomeGenAlps.java | 20 ++--- .../biome/overworld/BiomeGenBambooForest.java | 38 +++++---- .../common/biome/overworld/BiomeGenBayou.java | 42 +++++----- .../common/biome/overworld/BiomeGenBog.java | 46 +++++------ .../biome/overworld/BiomeGenBorealForest.java | 44 +++++------ .../biome/overworld/BiomeGenBrushland.java | 44 +++++------ .../biome/overworld/BiomeGenChaparral.java | 39 +++++----- .../overworld/BiomeGenCherryBlossomGrove.java | 38 ++++----- .../biome/overworld/BiomeGenColdDesert.java | 30 ++++---- .../overworld/BiomeGenConiferousForest.java | 48 ++++++------ .../biome/overworld/BiomeGenCoralReef.java | 18 ++--- .../common/biome/overworld/BiomeGenCrag.java | 16 ++-- .../biome/overworld/BiomeGenDeadForest.java | 40 +++++----- .../biome/overworld/BiomeGenDeadSwamp.java | 40 ++++++---- .../overworld/BiomeGenDummyTemplate.java | 30 ++++---- .../overworld/BiomeGenEucalyptusForest.java | 34 ++++---- .../common/biome/overworld/BiomeGenFen.java | 44 +++++------ .../biome/overworld/BiomeGenFlowerField.java | 26 +++---- .../biome/overworld/BiomeGenFlowerIsland.java | 38 ++++----- .../biome/overworld/BiomeGenGlacier.java | 12 +-- .../biome/overworld/BiomeGenGrassland.java | 40 +++++----- .../biome/overworld/BiomeGenGravelBeach.java | 1 - .../common/biome/overworld/BiomeGenGrove.java | 40 +++++----- .../biome/overworld/BiomeGenHeathland.java | 46 +++++------ .../biome/overworld/BiomeGenHighland.java | 24 +++--- .../biome/overworld/BiomeGenKelpForest.java | 20 ++--- .../biome/overworld/BiomeGenLandOfLakes.java | 38 ++++----- .../overworld/BiomeGenLavenderFields.java | 32 ++++---- .../biome/overworld/BiomeGenLushDesert.java | 44 +++++------ .../biome/overworld/BiomeGenLushSwamp.java | 46 +++++------ .../biome/overworld/BiomeGenMangrove.java | 43 +++++------ .../biome/overworld/BiomeGenMapleWoods.java | 40 +++++----- .../common/biome/overworld/BiomeGenMarsh.java | 36 ++++----- .../biome/overworld/BiomeGenMeadow.java | 40 +++++----- .../common/biome/overworld/BiomeGenMoor.java | 40 +++++----- .../biome/overworld/BiomeGenMountain.java | 49 ++++++------ .../biome/overworld/BiomeGenMysticGrove.java | 46 +++++------ .../common/biome/overworld/BiomeGenOasis.java | 45 ++++++----- .../biome/overworld/BiomeGenOminousWoods.java | 48 ++++++------ .../biome/overworld/BiomeGenOrchard.java | 42 +++++----- .../biome/overworld/BiomeGenOriginIsland.java | 13 ++-- .../biome/overworld/BiomeGenOutback.java | 36 ++++----- .../overworld/BiomeGenOvergrownCliffs.java | 36 ++++----- .../biome/overworld/BiomeGenPrairie.java | 44 +++++------ .../biome/overworld/BiomeGenQuagmire.java | 32 ++++---- .../biome/overworld/BiomeGenRainforest.java | 38 ++++----- .../overworld/BiomeGenRedwoodForest.java | 40 +++++----- .../overworld/BiomeGenSacredSprings.java | 42 +++++----- .../overworld/BiomeGenSeasonalForest.java | 44 +++++------ .../biome/overworld/BiomeGenShield.java | 42 +++++----- .../biome/overworld/BiomeGenShrubland.java | 39 +++++----- .../BiomeGenSnowyConiferousForest.java | 38 ++++----- .../biome/overworld/BiomeGenSnowyForest.java | 34 ++++---- .../biome/overworld/BiomeGenSteppe.java | 38 ++++----- .../BiomeGenTemperateRainforest.java | 46 +++++------ .../overworld/BiomeGenTropicalIsland.java | 40 +++++----- .../overworld/BiomeGenTropicalRainforest.java | 46 +++++------ .../biome/overworld/BiomeGenTundra.java | 38 ++++----- .../overworld/BiomeGenVolcanicIsland.java | 9 +-- .../biome/overworld/BiomeGenWasteland.java | 34 ++++---- .../biome/overworld/BiomeGenWetland.java | 45 ++++++----- .../biome/overworld/BiomeGenWoodland.java | 43 +++++------ .../overworld/BiomeGenXericShrubland.java | 44 +++++------ .../biome/vanilla/BiomeExtBirchForest.java | 36 ++++----- .../vanilla/BiomeExtBirchForestHills.java | 36 ++++----- .../biome/vanilla/BiomeExtColdTaiga.java | 26 +++---- .../biome/vanilla/BiomeExtColdTaigaHills.java | 26 +++---- .../common/biome/vanilla/BiomeExtDesert.java | 22 +++--- .../biome/vanilla/BiomeExtDesertHills.java | 18 ++--- .../common/biome/vanilla/BiomeExtEnd.java | 16 ++-- .../biome/vanilla/BiomeExtExtremeHills.java | 28 +++---- .../vanilla/BiomeExtExtremeHillsPlus.java | 28 +++---- .../common/biome/vanilla/BiomeExtForest.java | 42 +++++----- .../biome/vanilla/BiomeExtForestHills.java | 42 +++++----- .../biome/vanilla/BiomeExtIceMountains.java | 26 +++---- .../biome/vanilla/BiomeExtIcePlains.java | 26 +++---- .../common/biome/vanilla/BiomeExtJungle.java | 26 +++---- .../biome/vanilla/BiomeExtJungleHills.java | 26 +++---- .../biome/vanilla/BiomeExtMegaTaiga.java | 28 +++---- .../biome/vanilla/BiomeExtMegaTaigaHills.java | 28 +++---- .../common/biome/vanilla/BiomeExtMesa.java | 26 +++---- .../biome/vanilla/BiomeExtMesaPlateau.java | 26 +++---- .../biome/vanilla/BiomeExtMushroomIsland.java | 20 ++--- .../common/biome/vanilla/BiomeExtOcean.java | 12 +-- .../common/biome/vanilla/BiomeExtPlains.java | 26 +++---- .../biome/vanilla/BiomeExtRoofedForest.java | 26 +++---- .../common/biome/vanilla/BiomeExtSavanna.java | 30 ++++---- .../biome/vanilla/BiomeExtSavannaPlateau.java | 26 +++---- .../biome/vanilla/BiomeExtSwampland.java | 38 ++++----- .../common/biome/vanilla/BiomeExtTaiga.java | 28 +++---- .../biome/vanilla/BiomeExtTaigaHills.java | 28 +++---- .../biome/vanilla}/ExtendedBiomeWrapper.java | 32 ++++---- .../common/block/BlockBOPAsh.java | 4 +- .../common/block/BlockBOPBamboo.java | 4 +- .../common/block/BlockBOPBiomeBlock.java | 12 +-- .../common/block/BlockBOPBones.java | 1 - .../common/block/BlockBOPCoral.java | 4 +- .../common/block/BlockBOPCrystal.java | 5 +- .../common/block/BlockBOPDecoration.java | 5 +- .../common/block/BlockBOPDirt.java | 6 +- .../common/block/BlockBOPDoor.java | 9 +-- .../block/BlockBOPDoubleDecoration.java | 4 +- .../common/block/BlockBOPDoublePlant.java | 7 +- .../common/block/BlockBOPDoubleWoodSlab.java | 10 +-- .../common/block/BlockBOPFarmland.java | 1 - .../common/block/BlockBOPFence.java | 7 +- .../common/block/BlockBOPFenceGate.java | 1 - .../common/block/BlockBOPFlesh.java | 5 +- .../common/block/BlockBOPFlower.java | 8 +- .../common/block/BlockBOPGem.java | 1 - .../common/block/BlockBOPGemOre.java | 1 - .../common/block/BlockBOPGeneric.java | 2 - .../common/block/BlockBOPGrass.java | 17 ++-- .../common/block/BlockBOPHalfOtherSlab.java | 1 - .../common/block/BlockBOPHalfWoodSlab.java | 8 +- .../common/block/BlockBOPHive.java | 1 - .../common/block/BlockBOPHoney.java | 1 - .../common/block/BlockBOPLeaves.java | 6 +- .../common/block/BlockBOPLilypad.java | 7 -- .../common/block/BlockBOPLog.java | 1 - .../common/block/BlockBOPMud.java | 2 - .../common/block/BlockBOPMushroom.java | 1 - .../common/block/BlockBOPPlanks.java | 1 - .../common/block/BlockBOPPlant.java | 6 +- .../common/block/BlockBOPSand.java | 2 - .../common/block/BlockBOPSapling.java | 18 ++--- .../common/block/BlockBOPSeaweed.java | 1 - .../common/block/BlockBOPStone.java | 1 - .../common/block/BlockBOPStoneFormations.java | 4 +- .../common/block/BlockBOPTerrarium.java | 1 - .../common/block/BlockBOPTurnip.java | 1 - .../common/block/BlockBOPVine.java | 6 +- .../common/block/BlockBOPWoodStairs.java | 1 - .../common/block/BlockColoring.java | 55 +++++++++++++ .../{api => common}/block/IBOPBlock.java | 2 +- .../block/ISustainsPlantType.java | 2 +- .../decoration/DecorateBiomeEventHandler.java | 9 ++- .../biomesoplenty/common/init/ModBiomes.java | 10 +-- .../biomesoplenty/common/init/ModBlocks.java | 1 - .../common/init/ModCompatibility.java | 2 +- .../common/init/ModGenerators.java | 67 ++++++++-------- .../{api => common}/item/IColoredItem.java | 2 +- .../common/item/ItemBOPBlock.java | 2 +- .../common/item/ItemBOPSpawnEgg.java | 1 - .../common/util/block/BlockQuery.java | 3 +- .../common/util/block/BlockStateUtils.java | 2 +- .../common/util/config/BOPConfig.java | 63 +-------------- .../common/world/BOPWorldSettings.java | 61 +++++++++++++-- .../world/ChunkProviderGenerateBOP.java | 2 +- .../world}/GenerationManager.java | 9 ++- .../world}/GeneratorRegistry.java | 53 ++++++++++++- .../GeneratorBigFlower.java | 6 +- .../GeneratorBigMushroom.java | 6 +- .../GeneratorBlobs.java | 4 +- .../GeneratorColumns.java | 4 +- .../GeneratorCrystals.java | 4 +- .../GeneratorDoubleFlora.java | 4 +- .../GeneratorFlora.java | 4 +- .../GeneratorGrass.java | 2 +- .../GeneratorLakes.java | 6 +- .../{feature => generator}/GeneratorLogs.java | 4 +- .../GeneratorMixedLily.java | 6 +- .../GeneratorOreBase.java | 6 +- .../GeneratorOreCluster.java | 4 +- .../GeneratorOreSingle.java | 4 +- .../GeneratorReplacing.java | 4 +- .../GeneratorSpike.java | 4 +- .../GeneratorSplatter.java | 4 +- .../GeneratorSplotches.java | 4 +- .../GeneratorWaterside.java | 4 +- .../world/generator}/GeneratorWeighted.java | 9 ++- .../tree/GeneratorBasicTree.java | 4 +- .../tree/GeneratorBayouTree.java | 4 +- .../tree/GeneratorBigTree.java | 5 +- .../tree/GeneratorBulbTree.java | 4 +- .../tree/GeneratorBush.java | 4 +- .../tree/GeneratorHugeTree.java | 2 +- .../tree/GeneratorMahoganyTree.java | 2 +- .../tree/GeneratorMangroveTree.java | 4 +- .../tree/GeneratorMegaJungleTree.java | 4 +- .../tree/GeneratorPalmTree.java | 4 +- .../tree/GeneratorPineTree.java | 4 +- .../tree/GeneratorProfileTree.java | 4 +- .../tree/GeneratorRedwoodTree.java | 6 +- .../tree/GeneratorTaigaTree.java | 4 +- .../tree/GeneratorTreeBase.java | 4 +- .../tree/GeneratorTwigletTree.java | 4 +- .../common/world/layer/BOPGenLayer.java | 4 +- .../common/world/layer/GenLayerBiomeBOP.java | 2 +- .../world/layer/GenLayerBiomeIslands.java | 2 +- .../common/world/layer/GenLayerClimate.java | 2 +- .../world/layer/GenLayerRiverMixBOP.java | 2 +- .../java/biomesoplenty/core/ClientProxy.java | 4 +- 206 files changed, 2157 insertions(+), 1950 deletions(-) create mode 100644 src/main/java/biomesoplenty/api/config/IBOPWorldSettings.java create mode 100644 src/main/java/biomesoplenty/api/config/IConfigObj.java rename src/main/java/biomesoplenty/{common => api}/enums/BOPClimates.java (96%) rename src/main/java/biomesoplenty/api/{biome => }/generation/BOPGeneratorBase.java (94%) rename src/main/java/biomesoplenty/api/{biome => }/generation/GeneratorStage.java (98%) create mode 100644 src/main/java/biomesoplenty/api/generation/Generators.java create mode 100644 src/main/java/biomesoplenty/api/generation/IBOPGenLayer.java create mode 100644 src/main/java/biomesoplenty/api/generation/IGenerationManager.java rename src/main/java/biomesoplenty/api/{biome => }/generation/IGenerator.java (92%) create mode 100644 src/main/java/biomesoplenty/api/generation/IGeneratorRegistry.java rename src/main/java/biomesoplenty/{api/biome => common/biome/overworld}/BOPBiome.java (93%) rename src/main/java/biomesoplenty/{api/biome => common/biome/vanilla}/ExtendedBiomeWrapper.java (83%) create mode 100644 src/main/java/biomesoplenty/common/block/BlockColoring.java rename src/main/java/biomesoplenty/{api => common}/block/IBOPBlock.java (96%) rename src/main/java/biomesoplenty/{api => common}/block/ISustainsPlantType.java (95%) rename src/main/java/biomesoplenty/{api => common}/item/IColoredItem.java (95%) rename src/main/java/biomesoplenty/{api/biome/generation => common/world}/GenerationManager.java (89%) rename src/main/java/biomesoplenty/{api/biome/generation => common/world}/GeneratorRegistry.java (58%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorBigFlower.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorBigMushroom.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorBlobs.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorColumns.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorCrystals.java (97%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorDoubleFlora.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorFlora.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorGrass.java (97%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorLakes.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorLogs.java (97%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorMixedLily.java (96%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorOreBase.java (93%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorOreCluster.java (97%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorOreSingle.java (96%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorReplacing.java (97%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorSpike.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorSplatter.java (96%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorSplotches.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/GeneratorWaterside.java (97%) rename src/main/java/biomesoplenty/{api/biome/generation => common/world/generator}/GeneratorWeighted.java (93%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorBasicTree.java (99%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorBayouTree.java (99%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorBigTree.java (99%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorBulbTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorBush.java (97%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorHugeTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorMahoganyTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorMangroveTree.java (99%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorMegaJungleTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorPalmTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorPineTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorProfileTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorRedwoodTree.java (97%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorTaigaTree.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorTreeBase.java (98%) rename src/main/java/biomesoplenty/common/world/{feature => generator}/tree/GeneratorTwigletTree.java (98%) diff --git a/src/main/java/biomesoplenty/api/biome/IExtendedBiome.java b/src/main/java/biomesoplenty/api/biome/IExtendedBiome.java index 213fab407..91439ba78 100644 --- a/src/main/java/biomesoplenty/api/biome/IExtendedBiome.java +++ b/src/main/java/biomesoplenty/api/biome/IExtendedBiome.java @@ -10,23 +10,23 @@ package biomesoplenty.api.biome; import java.util.Map; -import biomesoplenty.api.biome.generation.GenerationManager; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.IGenerator; -import biomesoplenty.common.enums.BOPClimates; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.api.generation.IGenerationManager; +import biomesoplenty.api.generation.IGenerator; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.BiomeGenBase; public interface IExtendedBiome { - public void applySettings(BOPWorldSettings settings); + public void applySettings(IBOPWorldSettings settings); public void configure(IConfigObj conf); public BiomeOwner getBiomeOwner(); public void addGenerator(String name, GeneratorStage stage, IGenerator generator); - public GenerationManager getGenerationManager(); + public IGenerationManager getGenerationManager(); public Map getWeightMap(); public void clearWeights(); public void addWeight(BOPClimates climate, int weight); diff --git a/src/main/java/biomesoplenty/api/block/BOPBlocks.java b/src/main/java/biomesoplenty/api/block/BOPBlocks.java index e7fbe9a56..175cc5497 100644 --- a/src/main/java/biomesoplenty/api/block/BOPBlocks.java +++ b/src/main/java/biomesoplenty/api/block/BOPBlocks.java @@ -9,19 +9,7 @@ package biomesoplenty.api.block; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.color.IBlockColor; -import net.minecraft.client.renderer.color.IItemColor; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.ColorizerFoliage; -import net.minecraft.world.ColorizerGrass; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.biome.BiomeColorHelper; import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BOPBlocks { @@ -165,38 +153,4 @@ public class BOPBlocks public static Fluid poison_fluid; public static Block hot_spring_water; public static Fluid hot_spring_water_fluid; - - @SideOnly(Side.CLIENT) - public static class Coloring - { - public static final IBlockColor FOLIAGE_COLORING = new IBlockColor() - { - @Override - public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) - { - return world != null && pos != null ? BiomeColorHelper.getFoliageColorAtPos(world, pos) : ColorizerFoliage.getFoliageColorBasic(); - } - }; - - public static final IBlockColor GRASS_COLORING = new IBlockColor() - { - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) - { - return world != null && pos != null ? BiomeColorHelper.getGrassColorAtPos(world, pos) : ColorizerGrass.getGrassColor(0.5D, 1.0D); - } - }; - - public static final IItemColor BLOCK_ITEM_COLORING = new IItemColor() - { - @Override - public int getColorFromItemstack(ItemStack stack, int tintIndex) - { - IBlockState state = ((ItemBlock)stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata()); - IBlockColor blockColor = ((IBOPBlock)state.getBlock()).getBlockColor(); - return blockColor == null ? 0xFFFFFF : blockColor.colorMultiplier(state, null, null, tintIndex); - } - }; - } } diff --git a/src/main/java/biomesoplenty/api/config/IBOPWorldSettings.java b/src/main/java/biomesoplenty/api/config/IBOPWorldSettings.java new file mode 100644 index 000000000..994b34a8c --- /dev/null +++ b/src/main/java/biomesoplenty/api/config/IBOPWorldSettings.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2016, 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.api.config; + +public interface IBOPWorldSettings +{ + boolean isEnabled(GeneratorType type); + + public static enum GeneratorType + { + GEMS, SOILS, TREES, GRASSES, FOLIAGE, FLOWERS, PLANTS, WATER_PLANTS, MUSHROOMS, + ROCK_FORMATIONS, POISON_IVY, FLAX, BERRY_BUSHES, THORNS, QUICKSAND, LIQUID_POISON, HOT_SPRINGS, + NETHER_HIVES, NETHER_PLANTS, END_FEATURES; + } +} diff --git a/src/main/java/biomesoplenty/api/config/IConfigObj.java b/src/main/java/biomesoplenty/api/config/IConfigObj.java new file mode 100644 index 000000000..0309a0ad5 --- /dev/null +++ b/src/main/java/biomesoplenty/api/config/IConfigObj.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright 2016, 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.api.config; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import biomesoplenty.api.block.IBlockPosQuery; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.ResourceLocation; + +public interface IConfigObj +{ + public void addMessage(String message); + public void addMessage(String extraPrefix, String message); + public List flushMessages(); + public boolean isEmpty(); + public boolean has(String name); + public Set getKeys(); + + public IConfigObj getObject(String name); + public ArrayList getObjectArray(String name); + public IConfigObj getObject(String name, boolean warnIfMissing); + public ArrayList getObjectArray(String name, boolean warnIfMissing); + + // Use the methods below when you want to obtain a value from a config file, if it is present, but you have a default value to use if it isn't + // No warning messages will be logged using these methods if the value is missing + public Boolean getBool(String name, Boolean defaultVal); + public String getString(String name, String defaultVal); + public Integer getInt(String name, Integer defaultVal); + public Float getFloat(String name, Float defaultVal); + public IBlockState getBlockState(String name, IBlockState defaultVal); + public IBlockPosQuery getBlockPosQuery(String name, IBlockPosQuery defaultVal); + public ResourceLocation getResourceLocation(String name, ResourceLocation defaultVal); + public E getEnum(String name, E defaultVal, Class clazz); + + // Use the methods below when you want to obtain a value from a config file which SHOULD be present + // If the value is missing, a warning message is logged, and null is returned + public Boolean getBool(String name); + public String getString(String name); + public Integer getInt(String name); + public Float getFloat(String name); + public IBlockState getBlockState(String name); + public IBlockPosQuery getBlockPosQuery(String name); + public ResourceLocation getResourceLocation(String name); + public E getEnum(String name, Class clazz); + + // Use the methods below when you want to obtain an array of values from a config file, if it is present, but you have a default value to use if it isn't + // No warning messages will be logged using these methods if the value is missing + public ArrayList getBoolArray(String name, ArrayList defaultVal); + public ArrayList getStringArray(String name, ArrayList defaultVal); + public ArrayList getIntArray(String name, ArrayList defaultVal); + public ArrayList getFloatArray(String name, ArrayList defaultVal); + public ArrayList getBlockStateArray(String name, ArrayList defaultVal); + public ArrayList getBlockPosQueryArray(String name, ArrayList defaultVal); + public ArrayList getResourceLocationArray(String name, ArrayList defaultVal); + public ArrayList getEnumArray(String name, ArrayList defaultVal, Class clazz); + + // Use the methods below when you want to obtain an array of values from a config file which SHOULD be present + // If the value is missing, a warning message is logged, and null is returned + public ArrayList getBoolArray(String name); + public ArrayList getStringArray(String name); + public ArrayList getIntArray(String name); + public ArrayList getFloatArray(String name); + public ArrayList getBlockStateArray(String name); + public ArrayList getBlockPosQueryArray(String name); + public ArrayList getResourceLocationArray(String name); + public ArrayList getEnumArray(String name, Class clazz); + + +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/enums/BOPClimates.java b/src/main/java/biomesoplenty/api/enums/BOPClimates.java similarity index 96% rename from src/main/java/biomesoplenty/common/enums/BOPClimates.java rename to src/main/java/biomesoplenty/api/enums/BOPClimates.java index e576cd285..bb027d0e4 100644 --- a/src/main/java/biomesoplenty/common/enums/BOPClimates.java +++ b/src/main/java/biomesoplenty/api/enums/BOPClimates.java @@ -1,13 +1,13 @@ -package biomesoplenty.common.enums; - -import biomesoplenty.common.world.layer.BOPGenLayer; -import net.minecraft.init.Biomes; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.BiomeManager.BiomeType; +package biomesoplenty.api.enums; import java.util.ArrayList; import java.util.Iterator; +import biomesoplenty.api.generation.IBOPGenLayer; +import net.minecraft.init.Biomes; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.BiomeManager.BiomeType; + public enum BOPClimates { ICE_CAP (BiomeType.ICY), @@ -46,7 +46,7 @@ public enum BOPClimates { return this; } - public BiomeGenBase getRandomLandBiome(BOPGenLayer layer) + public BiomeGenBase getRandomLandBiome(IBOPGenLayer layer) { int weight = layer.nextInt(this.totalLandBiomesWeight); Iterator iterator = this.landBiomes.iterator(); @@ -60,7 +60,7 @@ public enum BOPClimates { return item.biome; } - public BiomeGenBase getRandomOceanBiome(BOPGenLayer layer, boolean deep) + public BiomeGenBase getRandomOceanBiome(IBOPGenLayer layer, boolean deep) { switch (this) { diff --git a/src/main/java/biomesoplenty/api/biome/generation/BOPGeneratorBase.java b/src/main/java/biomesoplenty/api/generation/BOPGeneratorBase.java similarity index 94% rename from src/main/java/biomesoplenty/api/biome/generation/BOPGeneratorBase.java rename to src/main/java/biomesoplenty/api/generation/BOPGeneratorBase.java index 5ed764a60..bd4371267 100644 --- a/src/main/java/biomesoplenty/api/biome/generation/BOPGeneratorBase.java +++ b/src/main/java/biomesoplenty/api/generation/BOPGeneratorBase.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.biome.generation; +package biomesoplenty.api.generation; import java.util.Random; @@ -24,7 +24,7 @@ public abstract class BOPGeneratorBase extends WorldGenerator implements IGenera protected BOPGeneratorBase(float amountPerChunk) { - this.identifier = GeneratorRegistry.getIdentifier((Class)this.getClass()); + this.identifier = Generators.registry.getIdentifier((Class)this.getClass()); if (this.identifier == null) { diff --git a/src/main/java/biomesoplenty/api/biome/generation/GeneratorStage.java b/src/main/java/biomesoplenty/api/generation/GeneratorStage.java similarity index 98% rename from src/main/java/biomesoplenty/api/biome/generation/GeneratorStage.java rename to src/main/java/biomesoplenty/api/generation/GeneratorStage.java index b72faa2d6..2bc1ae827 100644 --- a/src/main/java/biomesoplenty/api/biome/generation/GeneratorStage.java +++ b/src/main/java/biomesoplenty/api/generation/GeneratorStage.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.biome.generation; +package biomesoplenty.api.generation; import com.google.gson.annotations.SerializedName; diff --git a/src/main/java/biomesoplenty/api/generation/Generators.java b/src/main/java/biomesoplenty/api/generation/Generators.java new file mode 100644 index 000000000..9930bd57d --- /dev/null +++ b/src/main/java/biomesoplenty/api/generation/Generators.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 2016, 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.api.generation; + +public class Generators +{ + public static IGeneratorRegistry registry; +} diff --git a/src/main/java/biomesoplenty/api/generation/IBOPGenLayer.java b/src/main/java/biomesoplenty/api/generation/IBOPGenLayer.java new file mode 100644 index 000000000..19d54b357 --- /dev/null +++ b/src/main/java/biomesoplenty/api/generation/IBOPGenLayer.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 2016, 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.api.generation; + +public interface IBOPGenLayer +{ + int nextInt(int a); +} diff --git a/src/main/java/biomesoplenty/api/generation/IGenerationManager.java b/src/main/java/biomesoplenty/api/generation/IGenerationManager.java new file mode 100644 index 000000000..b2c31a5d8 --- /dev/null +++ b/src/main/java/biomesoplenty/api/generation/IGenerationManager.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright 2016, 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.api.generation; + +import com.google.common.collect.ImmutableCollection; + +import biomesoplenty.api.config.IConfigObj; + +public interface IGenerationManager +{ + void addGenerator(String name, GeneratorStage stage, IGenerator generator); + ImmutableCollection getGeneratorsForStage(GeneratorStage stage); + void removeGenerator(String name); + IGenerator getGenerator(String name); + void configureWith(String name, IConfigObj conf); +} diff --git a/src/main/java/biomesoplenty/api/biome/generation/IGenerator.java b/src/main/java/biomesoplenty/api/generation/IGenerator.java similarity index 92% rename from src/main/java/biomesoplenty/api/biome/generation/IGenerator.java rename to src/main/java/biomesoplenty/api/generation/IGenerator.java index cff569a81..416b072ff 100644 --- a/src/main/java/biomesoplenty/api/biome/generation/IGenerator.java +++ b/src/main/java/biomesoplenty/api/generation/IGenerator.java @@ -6,11 +6,11 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.biome.generation; +package biomesoplenty.api.generation; import java.util.Random; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; +import biomesoplenty.api.config.IConfigObj; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/biomesoplenty/api/generation/IGeneratorRegistry.java b/src/main/java/biomesoplenty/api/generation/IGeneratorRegistry.java new file mode 100644 index 000000000..7c9bed999 --- /dev/null +++ b/src/main/java/biomesoplenty/api/generation/IGeneratorRegistry.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2016, 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.api.generation; + +import biomesoplenty.api.config.IConfigObj; + +public interface IGeneratorRegistry +{ + void registerGenerator(String identifier, Class generatorClass, IGenerator.IGeneratorBuilder builder); + String getIdentifier(Class generatorClass); + Class getGeneratorClass(String identifier); + IGenerator.IGeneratorBuilder getGeneratorBuilder(String identifier); + boolean generatorExists(String identifier); + IGenerator createGenerator(IConfigObj conf); +} diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/BOPBiome.java similarity index 93% rename from src/main/java/biomesoplenty/api/biome/BOPBiome.java rename to src/main/java/biomesoplenty/common/biome/overworld/BOPBiome.java index 4d613879a..75053cd41 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BOPBiome.java @@ -6,27 +6,37 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.biome; +package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.generation.GenerationManager; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.IGenerator; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; + +import biomesoplenty.api.biome.BiomeOwner; +import biomesoplenty.api.biome.IExtendedBiome; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.api.generation.IGenerator; import biomesoplenty.common.block.BlockBOPMushroom; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.init.ModBiomes; import biomesoplenty.common.util.biome.BiomeUtils; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.util.config.BOPConfig; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; +import biomesoplenty.common.world.GenerationManager; import biomesoplenty.common.world.TerrainSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorFlora; import biomesoplenty.core.BiomesOPlenty; import net.minecraft.block.BlockSand; import net.minecraft.block.material.Material; @@ -41,9 +51,6 @@ import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.ChunkPrimer; -import java.util.*; -import java.util.Map.Entry; - public class BOPBiome extends BiomeGenBase implements IExtendedBiome { private GenerationManager generationManager = new GenerationManager(); @@ -66,7 +73,7 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome public final ResourceLocation location; - private BOPBiome(ResourceLocation idLoc, PropsBuilder defaultBuilder, BOPConfig.IConfigObj conf) + private BOPBiome(ResourceLocation idLoc, PropsBuilder defaultBuilder, IConfigObj conf) { super(configureBiomeProps(idLoc, defaultBuilder, conf)); @@ -96,7 +103,7 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome this(new ResourceLocation(BiomesOPlenty.MOD_ID, idName), defaultBuilder, ModBiomes.readConfigFile(idName)); } - public static BiomeProps configureBiomeProps(ResourceLocation idLoc, PropsBuilder defaultBuilder, BOPConfig.IConfigObj conf) + public static BiomeProps configureBiomeProps(ResourceLocation idLoc, PropsBuilder defaultBuilder, IConfigObj conf) { // If there isn't a valid config file, don't use it to configure the biome if (conf.isEmpty()) @@ -121,12 +128,12 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopMushrooms) {this.removeGenerator("glowshrooms");} - if (!settings.generateBopPlants) {this.removeGenerator("roots");} - if (!settings.generateBopFlowers) {this.removeGenerator("miners_delight");} - if (!settings.generateRockFormations) {this.removeGenerator("stone_formations");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("glowshrooms");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("roots");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("miners_delight");} + if (!settings.isEnabled(GeneratorType.ROCK_FORMATIONS)) {this.removeGenerator("stone_formations");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java index bc922fc51..554cdda0a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java @@ -8,13 +8,13 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.common.enums.BOPClimates; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; @@ -50,12 +50,12 @@ public class BiomeGenAlps extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateHotSprings) {this.removeGenerator("hot_springs");} + if (!settings.isEnabled(GeneratorType.HOT_SPRINGS)) {this.removeGenerator("hot_springs");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java index 1ce9f0b46..ae5828501 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java @@ -8,23 +8,29 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import java.util.Random; + import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPPlant; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.*; -import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBulbTree; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockDirt; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; @@ -36,8 +42,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; -import java.util.Random; - public class BiomeGenBambooForest extends BOPBiome { @@ -107,18 +111,18 @@ public class BiomeGenBambooForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java index c17d1df37..b734cd53a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java @@ -8,33 +8,33 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplatter; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBayouTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplatter; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBayouTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.monster.EntitySlime; @@ -114,20 +114,20 @@ public class BiomeGenBayou extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(8); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -136,7 +136,7 @@ public class BiomeGenBayou extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java index 94b7c30ee..ef03de668 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java @@ -8,12 +8,13 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPDoublePlant; @@ -21,19 +22,18 @@ import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.block.BlockBOPPlant; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -129,25 +129,25 @@ public class BiomeGenBog extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} - if (!settings.generateLiquidPoison) {this.removeGenerator("poison_lakes");} + if (!settings.isEnabled(GeneratorType.LIQUID_POISON)) {this.removeGenerator("poison_lakes");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java index 57d05273c..882f0463e 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java @@ -1,23 +1,23 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; @@ -91,20 +91,20 @@ public class BiomeGenBorealForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(20); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -116,7 +116,7 @@ public class BiomeGenBorealForest extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java index b2ea17812..6b0577f55 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java @@ -1,26 +1,26 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPSand; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.block.material.Material; @@ -77,20 +77,20 @@ public class BiomeGenBrushland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} - if (!settings.generateThorns) {this.removeGenerator("thorns");} - if (!settings.generateQuicksand) {this.removeGenerator("quicksand");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");} + if (!settings.isEnabled(GeneratorType.QUICKSAND)) {this.removeGenerator("quicksand");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(6.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -102,7 +102,7 @@ public class BiomeGenBrushland extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java index 0c05a1918..afc9526e6 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java @@ -8,23 +8,22 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplotches; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplotches; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; @@ -95,19 +94,19 @@ public class BiomeGenChaparral extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java index f18842381..2c33a3f2f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java @@ -8,26 +8,26 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.entities.EntityButterfly; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockTallGrass; @@ -98,22 +98,22 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java index 0dab701a1..2efe531ff 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java @@ -8,27 +8,27 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; +import java.util.Random; + import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorBlobs; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplatter; -import biomesoplenty.common.world.feature.GeneratorSplotches; +import biomesoplenty.common.world.generator.GeneratorBlobs; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplatter; +import biomesoplenty.common.world.generator.GeneratorSplotches; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; -import java.util.Random; - public class BiomeGenColdDesert extends BOPBiome { @@ -76,13 +76,13 @@ public class BiomeGenColdDesert extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java index 8a187b52c..e67ac2ef7 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java @@ -1,27 +1,27 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPMushroom; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -106,25 +106,25 @@ public class BiomeGenConiferousForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -133,10 +133,10 @@ public class BiomeGenConiferousForest extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); this.removeGenerator("bromeliad");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java index aa1867830..c9dd446a5 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java @@ -8,16 +8,16 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.util.biome.BiomeUtils; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; @@ -50,12 +50,12 @@ public class BiomeGenCoralReef extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("sapphire");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("sapphire");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java index 12c2baae9..96f497739 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java @@ -8,12 +8,12 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.common.enums.BOPClimates; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Blocks; public class BiomeGenCrag extends BOPBiome @@ -48,11 +48,11 @@ public class BiomeGenCrag extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java index 117c7d5d7..5a94c5895 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java @@ -8,25 +8,25 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; @@ -85,21 +85,21 @@ public class BiomeGenDeadForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} - if (!settings.generateThorns) {this.removeGenerator("thorns");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -109,7 +109,7 @@ public class BiomeGenDeadForest extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java index 0d9b0fcd9..43f943ceb 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java @@ -8,21 +8,31 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPPlant; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.*; +import biomesoplenty.common.enums.BOPGems; +import biomesoplenty.common.enums.BOPPlants; +import biomesoplenty.common.enums.BOPTrees; +import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.*; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplotches; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -88,20 +98,20 @@ public class BiomeGenDeadSwamp extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(0.6F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -110,7 +120,7 @@ public class BiomeGenDeadSwamp extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java index 6c1c0bb1a..070f435c9 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java @@ -8,29 +8,29 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.block.BlockBOPPlant; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorBigMushroom; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorMixedLily; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorBigMushroom; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorMixedLily; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.BlockTallGrass; @@ -175,9 +175,9 @@ public class BiomeGenDummyTemplate extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java index 16249dfd8..f3db81563 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java @@ -8,22 +8,22 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; -import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBulbTree; +import biomesoplenty.common.world.generator.tree.GeneratorBush; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -87,18 +87,18 @@ public class BiomeGenEucalyptusForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("algae"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("algae"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(10); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -107,7 +107,7 @@ public class BiomeGenEucalyptusForest extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } /* diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java index 2031f0985..4643c73f4 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java @@ -8,12 +8,13 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPDoublePlant; @@ -22,21 +23,20 @@ import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.block.BlockBOPPlant; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; @@ -130,22 +130,22 @@ public class BiomeGenFen extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(9); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -155,7 +155,7 @@ public class BiomeGenFen extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java index 9fc0418e4..e2d165314 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerField.java @@ -8,17 +8,17 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.BlockTallGrass; import net.minecraft.util.math.BlockPos; @@ -61,16 +61,16 @@ public class BiomeGenFlowerField extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java index 4ed2cbe82..8bee60e00 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java @@ -8,11 +8,11 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.entities.EntityButterfly; import biomesoplenty.common.entities.EntitySnail; @@ -21,14 +21,14 @@ import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorBigFlower; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplatter; -import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.generator.GeneratorBigFlower; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplatter; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower.EnumFlowerType; @@ -100,18 +100,18 @@ public class BiomeGenFlowerIsland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(1); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -121,10 +121,10 @@ public class BiomeGenFlowerIsland extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java index 641c2017f..ea6d43c13 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java @@ -8,12 +8,12 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPGems; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Blocks; public class BiomeGenGlacier extends BOPBiome @@ -45,9 +45,9 @@ public class BiomeGenGlacier extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java index 96948df70..9021f6fc3 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java @@ -8,26 +8,26 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.block.BlockBOPPlant; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.init.Blocks; @@ -89,21 +89,21 @@ public class BiomeGenGrassland extends BOPBiome { } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java index 5ba54e7a5..bc30927bb 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java @@ -8,7 +8,6 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import net.minecraft.init.Blocks; public class BiomeGenGravelBeach extends BOPBiome diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java index 35b410dc8..101ce2793 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrove.java @@ -8,22 +8,22 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorProfileTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorProfileTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; @@ -87,19 +87,19 @@ public class BiomeGenGrove extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -109,10 +109,10 @@ public class BiomeGenGrove extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java index 42aef8583..c0e13554c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java @@ -8,26 +8,26 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.IBlockPosQuery; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorPineTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorPineTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -99,22 +99,22 @@ public class BiomeGenHeathland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} - if (!settings.generateThorns) {this.removeGenerator("thorns");} + if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.GROUND, Material.GRASS).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(12); @@ -128,10 +128,10 @@ public class BiomeGenHeathland extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java index 0cfeb4024..92ec19c52 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java @@ -8,17 +8,17 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorBlobs; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorBlobs; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; @@ -60,12 +60,12 @@ public class BiomeGenHighland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java index acfe1d0ea..5d8be9b0b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java @@ -8,18 +8,18 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.util.biome.BiomeUtils; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; @@ -52,12 +52,12 @@ public class BiomeGenKelpForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("sapphire");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("sapphire");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java index 635d75841..3b10e2815 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java @@ -8,28 +8,28 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; @@ -109,20 +109,20 @@ public class BiomeGenLandOfLakes extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("wild_rice"); this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("wild_rice"); this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java index 6f5de0ff9..04698bd5c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLavenderFields.java @@ -8,22 +8,22 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockTallGrass; import net.minecraft.util.math.BlockPos; @@ -65,16 +65,16 @@ public class BiomeGenLavenderFields extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(1); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -83,7 +83,7 @@ public class BiomeGenLavenderFields extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java index a7d1f766b..25572bf3b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java @@ -8,28 +8,28 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorBush; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -104,20 +104,20 @@ public class BiomeGenLushDesert extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("desertgrass");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); IBlockPosQuery emptyHardenedClay = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(3); @@ -128,9 +128,9 @@ public class BiomeGenLushDesert extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java index 2305889bb..23d63b797 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java @@ -8,31 +8,31 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.block.BlockBOPPlant; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.BlockOldLeaf; @@ -125,26 +125,26 @@ public class BiomeGenLushSwamp extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateLiquidPoison) {this.removeGenerator("poison_lakes");} + if (!settings.isEnabled(GeneratorType.LIQUID_POISON)) {this.removeGenerator("poison_lakes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java index 32bfbf202..cefe67b77 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java @@ -10,30 +10,27 @@ package biomesoplenty.common.biome.overworld; import java.util.Random; -import net.minecraft.block.BlockOldLeaf; +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.block.BlockBOPSand; +import biomesoplenty.common.enums.BOPGems; +import biomesoplenty.common.enums.BOPTrees; +import biomesoplenty.common.enums.BOPWoods; +import biomesoplenty.common.util.block.BlockQuery; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorMangroveTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; -import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.api.block.IBlockPosQuery; -import biomesoplenty.common.block.BlockBOPSand; -import biomesoplenty.common.enums.BOPGems; -import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorMangroveTree; -import biomesoplenty.common.world.feature.tree.GeneratorPalmTree; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; public class BiomeGenMangrove extends BOPBiome { @@ -116,12 +113,12 @@ public class BiomeGenMangrove extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("sapphire");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("sapphire");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(7.0F); IBlockPosQuery emptySandMud = BlockQuery.buildAnd().states(this.usualTopBlock).create(); @@ -129,8 +126,8 @@ public class BiomeGenMangrove extends BOPBiome treeGenerator.add("mangrove", 1, (new GeneratorMangroveTree.Builder()).placeOn(emptySandMud).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); } - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java index b7d8924f5..11316c653 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java @@ -1,21 +1,21 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -82,19 +82,19 @@ public class BiomeGenMapleWoods extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(20); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -103,9 +103,9 @@ public class BiomeGenMapleWoods extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java index 879f20541..2a660c3e5 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java @@ -8,25 +8,25 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.monster.EntitySlime; @@ -92,20 +92,20 @@ public class BiomeGenMarsh extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java index 7979b2f92..a6b268e23 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java @@ -1,28 +1,28 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.entities.EntityButterfly; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; @@ -108,22 +108,22 @@ public class BiomeGenMeadow extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java index 69a298ad2..f3ee277b3 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java @@ -8,27 +8,27 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; @@ -91,23 +91,23 @@ public class BiomeGenMoor extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java index 09ec0d5f3..a4b4cdd74 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java @@ -10,29 +10,30 @@ package biomesoplenty.common.biome.overworld; import java.util.Random; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import com.google.common.base.CaseFormat; + import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplotches; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorPineTree; -import com.google.common.base.CaseFormat; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplotches; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorPineTree; import net.minecraft.block.BlockDirt; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -159,19 +160,19 @@ public class BiomeGenMountain extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(64, 140).materials(Material.GROUND, Material.GRASS).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(3); @@ -181,7 +182,7 @@ public class BiomeGenMountain extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java index ad9f36366..8fb621362 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java @@ -8,31 +8,31 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.entities.EntityButterfly; import biomesoplenty.common.entities.EntityPixie; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockOldLeaf; @@ -132,24 +132,24 @@ public class BiomeGenMysticGrove extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateHotSprings) {this.removeGenerator("hot_springs");} + if (!settings.isEnabled(GeneratorType.HOT_SPRINGS)) {this.removeGenerator("hot_springs");} - if (!settings.generateLiquidPoison) {this.removeGenerator("poison_lakes");} + if (!settings.isEnabled(GeneratorType.LIQUID_POISON)) {this.removeGenerator("poison_lakes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(10); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -160,10 +160,10 @@ public class BiomeGenMysticGrove extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java index 276ceacaf..eada3ff69 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java @@ -8,19 +8,30 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import java.util.Random; + import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPLeaves; -import biomesoplenty.common.enums.*; +import biomesoplenty.common.enums.BOPFlowers; +import biomesoplenty.common.enums.BOPGems; +import biomesoplenty.common.enums.BOPPlants; +import biomesoplenty.common.enums.BOPTrees; +import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.*; -import biomesoplenty.common.world.feature.tree.GeneratorPalmTree; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorPalmTree; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockOldLeaf; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -28,8 +39,6 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; - -import java.util.Random; public class BiomeGenOasis extends BOPBiome { @@ -98,18 +107,18 @@ public class BiomeGenOasis extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFlowers) {this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("bromeliad");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(10.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -118,7 +127,7 @@ public class BiomeGenOasis extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");this.removeGenerator("desertgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java index c6343a2ff..94429cc9d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java @@ -8,27 +8,27 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPLeaves; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockOldLeaf; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -101,26 +101,26 @@ public class BiomeGenOminousWoods extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateThorns) {this.removeGenerator("thorns");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");} - if (!settings.generateLiquidPoison) {this.removeGenerator("poison_lakes");} + if (!settings.isEnabled(GeneratorType.LIQUID_POISON)) {this.removeGenerator("poison_lakes");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(9); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -132,7 +132,7 @@ public class BiomeGenOminousWoods extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java index 0cb56614c..1272e8551 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOrchard.java @@ -1,22 +1,22 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.passive.EntityHorse; @@ -76,22 +76,22 @@ public class BiomeGenOrchard extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(4); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -99,10 +99,10 @@ public class BiomeGenOrchard extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginIsland.java index 469544652..962a87458 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginIsland.java @@ -8,17 +8,16 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPGrass.BOPGrassType; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntitySkeleton; @@ -78,7 +77,7 @@ public class BiomeGenOriginIsland extends BOPBiome @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { this.removeGenerator("roots"); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java index 5f6da9845..2e5e8b24d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java @@ -8,24 +8,24 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPGrass; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplatter; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplatter; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockSand; import net.minecraft.block.BlockTallGrass; @@ -82,19 +82,19 @@ public class BiomeGenOutback extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} IBlockPosQuery emptyRedSand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); - if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(8.0F).generationAttempts(128).replace(emptyRedSand).with(Blocks.GRASS.getDefaultState()).create());} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(8.0F).generationAttempts(128).replace(emptyRedSand).with(Blocks.GRASS.getDefaultState()).create());} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");} } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java index ba4ebdd2f..b081e5068 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java @@ -8,19 +8,19 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorMahoganyTree; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorMahoganyTree; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -80,16 +80,16 @@ public class BiomeGenOvergrownCliffs extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateHotSprings) {this.removeGenerator("hot_springs");} + if (!settings.isEnabled(GeneratorType.HOT_SPRINGS)) {this.removeGenerator("hot_springs");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(40.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -99,9 +99,9 @@ public class BiomeGenOvergrownCliffs extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java index 7de0a315e..dd029a3b3 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java @@ -1,25 +1,25 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks.EnumType; import net.minecraft.block.BlockTallGrass; @@ -86,27 +86,27 @@ public class BiomeGenPrairie extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java index 4b5ddbff7..f55e47a16 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java @@ -8,24 +8,24 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPLilypad; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplatter; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplatter; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.monster.EntitySlime; import net.minecraft.init.Blocks; @@ -86,21 +86,21 @@ public class BiomeGenQuagmire extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} IBlockPosQuery emptyMud = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); - if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(1.0F).generationAttempts(128).replace(emptyMud).with(Blocks.GRASS.getDefaultState()).create());} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(1.0F).generationAttempts(128).replace(emptyMud).with(Blocks.GRASS.getDefaultState()).create());} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java index 48d40a937..e29e7e4a4 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java @@ -1,22 +1,22 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.BlockPlanks; @@ -95,18 +95,18 @@ public class BiomeGenRainforest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(20); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -117,10 +117,10 @@ public class BiomeGenRainforest extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java index 72ab0eb42..7fe814aba 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java @@ -2,23 +2,23 @@ package biomesoplenty.common.biome.overworld; import java.util.Random; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorRedwoodTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorRedwoodTree; import net.minecraft.block.BlockDirt; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower.EnumFlowerType; @@ -103,18 +103,18 @@ public class BiomeGenRedwoodForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(25.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -123,10 +123,10 @@ public class BiomeGenRedwoodForest extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java index cbf5e1408..355655d79 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java @@ -1,24 +1,24 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPLilypad; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorBush; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower.EnumFlowerType; @@ -89,29 +89,29 @@ public class BiomeGenSacredSprings extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateHotSprings) {this.removeGenerator("hot_springs");} + if (!settings.isEnabled(GeneratorType.HOT_SPRINGS)) {this.removeGenerator("hot_springs");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} - if (!settings.generateBopTrees) {this.removeGenerator("sacred_oak_trees"); this.removeGenerator("large_oak"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("sacred_oak_trees"); this.removeGenerator("large_oak"); this.addGenerator("sacred_oak_trees", GeneratorStage.POST, (new GeneratorBigTree.Builder()).amountPerChunk(0.2F).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(35).maxHeight(40).trunkWidth(2).foliageDensity(2.0D).create()); this.addGenerator("large_oak", GeneratorStage.TREE, (new GeneratorBigTree.Builder()).amountPerChunk(3.0F).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java index 1151f9b12..397086509 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java @@ -1,24 +1,24 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -98,22 +98,22 @@ public class BiomeGenSeasonalForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(15); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -126,7 +126,7 @@ public class BiomeGenSeasonalForest extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java index 2e6ac9dd1..dc6016a03 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java @@ -10,28 +10,28 @@ package biomesoplenty.common.biome.overworld; import java.util.Random; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPMushroom; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorPineTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorPineTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -121,20 +121,20 @@ public class BiomeGenShield extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(9); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -144,7 +144,7 @@ public class BiomeGenShield extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java index 18ce2714c..a1ac9ddc5 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java @@ -8,22 +8,21 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; -import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.BlockTallGrass; import net.minecraft.entity.passive.EntityHorse; @@ -84,19 +83,19 @@ public class BiomeGenShrubland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java index 958126a9c..31ba4c31f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java @@ -1,23 +1,23 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; @@ -84,20 +84,20 @@ public class BiomeGenSnowyConiferousForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -106,10 +106,10 @@ public class BiomeGenSnowyConiferousForest extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java index 64f5c8fe9..212d3a18f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyForest.java @@ -8,20 +8,20 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.util.math.BlockPos; @@ -70,18 +70,18 @@ public class BiomeGenSnowyForest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -90,7 +90,7 @@ public class BiomeGenSnowyForest extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java index 75bdebd60..d39446a6f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java @@ -8,22 +8,24 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; +import java.util.Random; + import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDirt; import biomesoplenty.common.block.BlockBOPGrass; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.BlockTallGrass; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.passive.EntityHorse; @@ -32,8 +34,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; -import java.util.Random; - public class BiomeGenSteppe extends BOPBiome { public IBlockState usualTopBlock; @@ -93,20 +93,20 @@ public class BiomeGenSteppe extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.usualTopBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.usualTopBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java index f22e15efc..699df5f76 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java @@ -1,31 +1,31 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockOldLeaf; @@ -115,22 +115,22 @@ public class BiomeGenTemperateRainforest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(20.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -141,7 +141,7 @@ public class BiomeGenTemperateRainforest extends BOPBiome } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java index bdedf3d72..22334d1bb 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java @@ -8,19 +8,23 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.*; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorPalmTree; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.enums.BOPFlowers; +import biomesoplenty.common.enums.BOPGems; +import biomesoplenty.common.enums.BOPPlants; +import biomesoplenty.common.enums.BOPTrees; +import biomesoplenty.common.enums.BOPWoods; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorPalmTree; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockOldLeaf; import net.minecraft.block.BlockPlanks; @@ -85,16 +89,16 @@ public class BiomeGenTropicalIsland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(25.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -103,9 +107,9 @@ public class BiomeGenTropicalIsland extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java index 7c123447c..4544d6bf3 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java @@ -1,26 +1,26 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPSand; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorMahoganyTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorMahoganyTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockPlanks; @@ -102,20 +102,20 @@ public class BiomeGenTropicalRainforest extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateQuicksand) {this.removeGenerator("quicksand");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.QUICKSAND)) {this.removeGenerator("quicksand");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(15.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -124,10 +124,10 @@ public class BiomeGenTropicalRainforest extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java index e5e9b3a2f..93ec4f3dc 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java @@ -8,23 +8,23 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorBlobs; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBush; +import biomesoplenty.common.world.generator.GeneratorBlobs; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; import net.minecraft.block.BlockTallGrass; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; @@ -91,20 +91,20 @@ public class BiomeGenTundra extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java index 9bc5f4da2..7854e8254 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java @@ -8,15 +8,14 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSplotches; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSplotches; import net.minecraft.init.Blocks; public class BiomeGenVolcanicIsland extends BOPBiome diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java index 33358aa9b..7c6d82b03 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java @@ -8,23 +8,23 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; @@ -85,20 +85,20 @@ public class BiomeGenWasteland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateLiquidPoison) {this.removeGenerator("poison_lakes");} + if (!settings.isEnabled(GeneratorType.LIQUID_POISON)) {this.removeGenerator("poison_lakes");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); IBlockPosQuery emptyDriedSand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(0.3F); @@ -107,7 +107,7 @@ public class BiomeGenWasteland extends BOPBiome treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create()); } - if (!settings.generateBopGrasses) {this.removeGenerator("dead_grass"); this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("dead_grass"); this.removeGenerator("desertgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java index c3f7df8fd..c73266313 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java @@ -8,11 +8,12 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPLeaves; @@ -20,23 +21,21 @@ import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.block.BlockBOPPlant; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; -import net.minecraft.block.BlockDoublePlant; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.BlockOldLeaf; @@ -128,20 +127,20 @@ public class BiomeGenWetland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); - if (!settings.generateBopTrees) {this.removeGenerator("trees"); + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees"); GeneratorWeighted treeGenerator = new GeneratorWeighted(10); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); @@ -150,10 +149,10 @@ public class BiomeGenWetland extends BOPBiome } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); - if (!settings.generateBopFlowers) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java index b9f460be5..cd93e0bd2 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java @@ -8,25 +8,24 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.entities.EntityButterfly; import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.block.BlockDoublePlant; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockTallGrass; @@ -104,23 +103,23 @@ public class BiomeGenWoodland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java index 882d83f61..973d297f5 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java @@ -8,23 +8,25 @@ package biomesoplenty.common.biome.overworld; -import biomesoplenty.api.biome.BOPBiome; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import java.util.Random; + import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPGrass; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockTallGrass; import net.minecraft.block.material.Material; @@ -34,8 +36,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; -import java.util.Random; - public class BiomeGenXericShrubland extends BOPBiome { public IBlockState usualTopBlock; @@ -98,22 +98,22 @@ public class BiomeGenXericShrubland extends BOPBiome } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopSoils) {this.alternateTopBlock = Blocks.GRASS.getDefaultState();} + if (!settings.isEnabled(GeneratorType.SOILS)) {this.alternateTopBlock = Blocks.GRASS.getDefaultState();} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers"); this.removeGenerator("bromeliad");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers"); this.removeGenerator("bromeliad");} GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); - if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("dunegrass"); this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("dunegrass"); this.removeGenerator("desertgrass");} } @Override diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java index bddd051a2..e25d912a8 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java @@ -1,20 +1,20 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtBirchForest extends ExtendedBiomeWrapper @@ -57,20 +57,20 @@ public class BiomeExtBirchForest extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java index 00603afa1..245a5b3ec 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java @@ -1,20 +1,20 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtBirchForestHills extends ExtendedBiomeWrapper @@ -57,20 +57,20 @@ public class BiomeExtBirchForestHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java index e74b9a6b0..59073abe7 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtColdTaiga extends ExtendedBiomeWrapper @@ -36,16 +36,16 @@ public class BiomeExtColdTaiga extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java index 02d4f0d85..094c28ffa 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtColdTaigaHills extends ExtendedBiomeWrapper @@ -36,16 +36,16 @@ public class BiomeExtColdTaigaHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java index 1cfd3bda6..78ec109ec 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPSand; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; @@ -30,14 +30,14 @@ public class BiomeExtDesert extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateQuicksand) {this.removeGenerator("quicksand");} + if (!settings.isEnabled(GeneratorType.QUICKSAND)) {this.removeGenerator("quicksand");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java index f11e2f8d4..f4c98fcf0 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java @@ -1,12 +1,12 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Biomes; public class BiomeExtDesertHills extends ExtendedBiomeWrapper @@ -23,12 +23,12 @@ public class BiomeExtDesertHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java index 77a26ec8f..53e6cd0f9 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java @@ -1,14 +1,14 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorCrystals; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorCrystals; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; @@ -30,9 +30,9 @@ public class BiomeExtEnd extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amethyst");} - if (!settings.generateEndFeatures) {this.removeGenerator("crystals"); this.removeGenerator("biome_essence");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amethyst");} + if (!settings.isEnabled(GeneratorType.END_FEATURES)) {this.removeGenerator("crystals"); this.removeGenerator("biome_essence");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java index b4e710be7..237521115 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java @@ -1,16 +1,16 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.init.Biomes; public class BiomeExtExtremeHills extends ExtendedBiomeWrapper @@ -44,18 +44,18 @@ public class BiomeExtExtremeHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java index 572ad955b..e1eec6088 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java @@ -1,16 +1,16 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.init.Biomes; public class BiomeExtExtremeHillsPlus extends ExtendedBiomeWrapper @@ -44,18 +44,18 @@ public class BiomeExtExtremeHillsPlus extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java index c53bbee06..69140c654 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java @@ -1,22 +1,22 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.init.Biomes; public class BiomeExtForest extends ExtendedBiomeWrapper @@ -71,23 +71,23 @@ public class BiomeExtForest extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java index 03b9b69e3..db8bc8f50 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java @@ -1,22 +1,22 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.init.Biomes; public class BiomeExtForestHills extends ExtendedBiomeWrapper @@ -71,23 +71,23 @@ public class BiomeExtForestHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} - if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");} - if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");} + if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");} + if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java index 36e39bffe..9b8917bdc 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtIceMountains extends ExtendedBiomeWrapper @@ -37,16 +37,16 @@ public class BiomeExtIceMountains extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java index 7cf9e21ee..8c3d89667 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtIcePlains extends ExtendedBiomeWrapper @@ -37,16 +37,16 @@ public class BiomeExtIcePlains extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java index c61c90772..035e0b5c7 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtJungle extends ExtendedBiomeWrapper @@ -42,16 +42,16 @@ public class BiomeExtJungle extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java index 946621ab2..9ba841825 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtJungleHills extends ExtendedBiomeWrapper @@ -42,16 +42,16 @@ public class BiomeExtJungleHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("topaz");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java index c7d5b9c9b..8279d1224 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java @@ -1,17 +1,17 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtMegaTaiga extends ExtendedBiomeWrapper @@ -43,16 +43,16 @@ public class BiomeExtMegaTaiga extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java index 2a16766d4..57bb9d0d6 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java @@ -1,17 +1,17 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtMegaTaigaHills extends ExtendedBiomeWrapper @@ -43,16 +43,16 @@ public class BiomeExtMegaTaigaHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java index eb3e6ff33..939409223 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtMesa extends ExtendedBiomeWrapper @@ -32,16 +32,16 @@ public class BiomeExtMesa extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("desertgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java index d3ded33f8..5d58e2238 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtMesaPlateau extends ExtendedBiomeWrapper @@ -32,16 +32,16 @@ public class BiomeExtMesaPlateau extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("desertgrass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("desertgrass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java index f21f38216..1c62859d7 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java @@ -1,12 +1,12 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.enums.BOPGems; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Biomes; public class BiomeExtMushroomIsland extends ExtendedBiomeWrapper @@ -27,14 +27,14 @@ public class BiomeExtMushroomIsland extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos"); this.removeGenerator("glowshrooms");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos"); this.removeGenerator("glowshrooms");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java index 2595c7a80..bb06ec7d1 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java @@ -1,10 +1,10 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPGems; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorOreSingle; import net.minecraft.init.Biomes; public class BiomeExtOcean extends ExtendedBiomeWrapper @@ -18,8 +18,8 @@ public class BiomeExtOcean extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("sapphire");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("sapphire");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java index ecaa3827a..ce96d3b86 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtPlains extends ExtendedBiomeWrapper @@ -37,16 +37,16 @@ public class BiomeExtPlains extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("peridot");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java index 118b24b0d..c31717edb 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPMushroom; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtRoofedForest extends ExtendedBiomeWrapper @@ -35,16 +35,16 @@ public class BiomeExtRoofedForest extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("amber");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java index 28bfd9769..3c52ebff4 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java @@ -1,18 +1,18 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPSand; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; @@ -44,18 +44,18 @@ public class BiomeExtSavanna extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateQuicksand) {this.removeGenerator("quicksand");} + if (!settings.isEnabled(GeneratorType.QUICKSAND)) {this.removeGenerator("quicksand");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java index d5cbcfabd..6912e933d 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java @@ -1,15 +1,15 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtSavannaPlateau extends ExtendedBiomeWrapper @@ -37,16 +37,16 @@ public class BiomeExtSavannaPlateau extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("ruby");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java index b55da0ef0..27bee1c62 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java @@ -1,9 +1,9 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.block.BlockBOPLeaves; @@ -15,13 +15,13 @@ import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; import net.minecraft.block.BlockOldLeaf; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; @@ -75,22 +75,22 @@ public class BiomeExtSwampland extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("malachite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} + if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} + if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");} - if (!settings.generateBopTrees) {this.removeGenerator("trees");} + if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java index 9116bd628..c9028cc78 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java @@ -1,17 +1,17 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtTaiga extends ExtendedBiomeWrapper @@ -43,16 +43,16 @@ public class BiomeExtTaiga extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java index 4ee65da38..b62dce7ea 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java @@ -1,17 +1,17 @@ package biomesoplenty.common.biome.vanilla; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; -import biomesoplenty.api.biome.ExtendedBiomeWrapper; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.GeneratorWeighted; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorWeighted; import net.minecraft.init.Biomes; public class BiomeExtTaigaHills extends ExtendedBiomeWrapper @@ -43,16 +43,16 @@ public class BiomeExtTaigaHills extends ExtendedBiomeWrapper } @Override - public void applySettings(BOPWorldSettings settings) + public void applySettings(IBOPWorldSettings settings) { - if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} + if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");} - if (!settings.generateBopFlowers) {this.removeGenerator("flowers");} + if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("flowers");} - if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} + if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} + if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} - if (!settings.generateBopGrasses) {this.removeGenerator("grass");} + if (!settings.isEnabled(GeneratorType.GRASSES)) {this.removeGenerator("grass");} } } diff --git a/src/main/java/biomesoplenty/api/biome/ExtendedBiomeWrapper.java b/src/main/java/biomesoplenty/common/biome/vanilla/ExtendedBiomeWrapper.java similarity index 83% rename from src/main/java/biomesoplenty/api/biome/ExtendedBiomeWrapper.java rename to src/main/java/biomesoplenty/common/biome/vanilla/ExtendedBiomeWrapper.java index 830132039..0a9ab9685 100644 --- a/src/main/java/biomesoplenty/api/biome/ExtendedBiomeWrapper.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/ExtendedBiomeWrapper.java @@ -1,21 +1,23 @@ -package biomesoplenty.api.biome; - -import biomesoplenty.api.biome.generation.GenerationManager; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.IGenerator; -import biomesoplenty.common.enums.BOPClimates; -import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.util.biome.BiomeUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorFlora; -import net.minecraft.init.Biomes; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.biome.BiomeGenBase; +package biomesoplenty.common.biome.vanilla; import java.util.HashMap; import java.util.Map; +import biomesoplenty.api.biome.BiomeOwner; +import biomesoplenty.api.biome.IExtendedBiome; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.api.generation.IGenerator; +import biomesoplenty.common.enums.BOPPlants; +import biomesoplenty.common.util.biome.BiomeUtils; +import biomesoplenty.common.world.GenerationManager; +import biomesoplenty.common.world.generator.GeneratorFlora; +import net.minecraft.init.Biomes; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.biome.BiomeGenBase; + public class ExtendedBiomeWrapper implements IExtendedBiome { public final BiomeGenBase biome; @@ -33,7 +35,7 @@ public class ExtendedBiomeWrapper implements IExtendedBiome } @Override - public void applySettings(BOPWorldSettings settings){} + public void applySettings(IBOPWorldSettings settings){} @Override public void configure(IConfigObj conf) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java b/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java index 699de9a4c..b524af74b 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java @@ -8,6 +8,8 @@ package biomesoplenty.common.block; +import java.util.Random; + import biomesoplenty.api.item.BOPItems; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -24,8 +26,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.Random; - public class BlockBOPAsh extends BlockBOPGeneric { protected static final AxisAlignedBB COLLISION_BOX = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java b/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java index 6b0191cea..8699325f8 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java @@ -8,6 +8,8 @@ package biomesoplenty.common.block; +import java.util.Random; + import biomesoplenty.api.block.BOPBlocks; import net.minecraft.block.Block; import net.minecraft.block.SoundType; @@ -25,8 +27,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.Random; - public class BlockBOPBamboo extends BlockBOPDecoration { protected static final AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 0.8125D, 1.0D, 0.8125D); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java b/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java index 94f428357..652448235 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java @@ -8,8 +8,13 @@ package biomesoplenty.common.block; -import biomesoplenty.api.biome.BOPBiome; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; + import biomesoplenty.api.item.BOPItems; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.util.biome.BiomeUtils; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -22,11 +27,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Random; - public class BlockBOPBiomeBlock extends BlockBOPGeneric { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBones.java b/src/main/java/biomesoplenty/common/block/BlockBOPBones.java index 0879d6d0e..af248c2ec 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBones.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBones.java @@ -8,7 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.SoundType; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java b/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java index bda6cde67..b28536ef2 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java @@ -8,6 +8,8 @@ package biomesoplenty.common.block; +import static net.minecraft.block.BlockLiquid.LEVEL; + import biomesoplenty.api.block.BlockQueries; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -19,8 +21,6 @@ import net.minecraft.util.IStringSerializable; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import static net.minecraft.block.BlockLiquid.LEVEL; - public class BlockBOPCoral extends BlockBOPDecoration { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java b/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java index a5e5063ed..1d8b5e747 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java @@ -8,7 +8,8 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; +import java.util.Random; + import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; @@ -25,8 +26,6 @@ import net.minecraft.item.ItemBlock; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; -import java.util.Random; - public class BlockBOPCrystal extends Block implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java b/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java index 92add5468..81a06fac8 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java @@ -8,7 +8,8 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; +import java.util.Random; + import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.SoundType; @@ -28,8 +29,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.Random; - public class BlockBOPDecoration extends Block implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java index 90c5afec7..73075c6bf 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java @@ -11,10 +11,8 @@ package biomesoplenty.common.block; import java.util.Random; import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.api.block.ISustainsPlantType; import biomesoplenty.common.item.ItemBOPBlock; -import biomesoplenty.common.util.block.VariantPagingHelper; +import biomesoplenty.common.util.block.VariantPagingHelper.IPagedVariants; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -37,7 +35,7 @@ import net.minecraftforge.common.EnumPlantType; public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType { // add properties - public static enum BOPDirtType implements IStringSerializable, VariantPagingHelper.IPagedVariants + public static enum BOPDirtType implements IStringSerializable, IPagedVariants { LOAMY, SANDY, SILTY; @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java index 2a0da103a..ead56d73e 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java @@ -8,7 +8,10 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + import biomesoplenty.common.enums.BOPWoods; import net.minecraft.block.BlockDoor; import net.minecraft.block.material.Material; @@ -27,10 +30,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; - public class BlockBOPDoor extends BlockDoor implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java index c6fe53d8c..24d2edc31 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java @@ -8,6 +8,8 @@ package biomesoplenty.common.block; +import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; @@ -23,8 +25,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockBOPDoubleDecoration extends BlockBOPDecoration { // add half property diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java index c4fc24f81..454638f44 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java @@ -8,11 +8,14 @@ package biomesoplenty.common.block; +import java.util.List; + +import com.google.common.collect.ImmutableSet; + import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.block.BlockStateUtils; -import com.google.common.collect.ImmutableSet; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; @@ -35,8 +38,6 @@ import net.minecraftforge.common.IShearable; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.List; - public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements IShearable { // add properties (note we inherit HALF from BlockDoubleDecoration) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java index 9f6ee3543..4995877cb 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java @@ -8,11 +8,14 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; +import java.util.ArrayList; +import java.util.List; + +import com.google.common.collect.ImmutableSet; + import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.block.BlockStateUtils; import biomesoplenty.common.util.block.VariantPagingHelper; -import com.google.common.collect.ImmutableSet; import net.minecraft.block.BlockSlab; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -32,9 +35,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.ArrayList; -import java.util.List; - public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java index cb6d72322..88162b24b 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java @@ -11,7 +11,6 @@ package biomesoplenty.common.block; import java.util.Random; import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.item.ItemBOPBlock; import biomesoplenty.common.util.block.VariantPagingHelper; import net.minecraft.block.Block; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFence.java b/src/main/java/biomesoplenty/common/block/BlockBOPFence.java index f8ab79727..6fdd91e16 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFence.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFence.java @@ -8,7 +8,9 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; +import java.util.HashMap; +import java.util.Map; + import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.BlockFence; @@ -25,9 +27,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; -import java.util.HashMap; -import java.util.Map; - public class BlockBOPFence extends BlockFence implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java b/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java index 105805cf6..5f3e60ae5 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java @@ -11,7 +11,6 @@ package biomesoplenty.common.block; import java.util.HashMap; import java.util.Map; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.BlockFenceGate; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java b/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java index 5edabaefd..a56c0c01f 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java @@ -8,7 +8,8 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; +import java.util.Random; + import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; @@ -30,8 +31,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.Random; - public class BlockBOPFlesh extends Block implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java b/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java index e74ad7a85..8ce9972ba 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java @@ -8,6 +8,10 @@ package biomesoplenty.common.block; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.common.config.GameplayConfigurationHandler; import biomesoplenty.common.enums.BOPFlowers; @@ -38,10 +42,6 @@ import net.minecraftforge.common.IShearable; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - public class BlockBOPFlower extends BlockBOPDecoration implements IShearable { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGem.java b/src/main/java/biomesoplenty/common/block/BlockBOPGem.java index afffc02bf..d4dff1632 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGem.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGem.java @@ -8,7 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java b/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java index 8275a18e1..ac00ecbe1 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java @@ -12,7 +12,6 @@ import static biomesoplenty.common.block.BlockBOPGem.VARIANT; import java.util.Random; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.item.ItemBOPBlock; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java b/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java index f47e7e6a3..fa6755b0e 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java @@ -11,8 +11,6 @@ package biomesoplenty.common.block; import java.util.HashSet; import java.util.Set; -import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.api.block.ISustainsPlantType; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.SoundType; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java index b77f931c2..b37873f78 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java @@ -8,12 +8,15 @@ package biomesoplenty.common.block; +import java.util.Random; + import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.api.block.BOPBlocks.Coloring; -import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.api.block.ISustainsPlantType; import biomesoplenty.common.item.ItemBOPBlock; -import net.minecraft.block.*; +import net.minecraft.block.Block; +import net.minecraft.block.BlockDirt; +import net.minecraft.block.BlockGrass; +import net.minecraft.block.BlockTallGrass; +import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; @@ -40,8 +43,6 @@ import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.Random; - public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPlantType { // add properties (note we also inherit the SNOWY property from BlockGrass) @@ -83,9 +84,9 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla } } @Override - public IBlockColor getBlockColor() { return Coloring.GRASS_COLORING; } + public IBlockColor getBlockColor() { return BlockColoring.GRASS_COLORING; } @Override - public IItemColor getItemColor() { return Coloring.BLOCK_ITEM_COLORING; } + public IItemColor getItemColor() { return BlockColoring.BLOCK_ITEM_COLORING; } public BlockBOPGrass() { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java index 595eb187d..ef945ca20 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java @@ -13,7 +13,6 @@ import java.util.List; import com.google.common.collect.ImmutableSet; import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.util.block.BlockStateUtils; import net.minecraft.block.BlockSlab; import net.minecraft.block.SoundType; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java index cb8be9e57..74a15cff3 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java @@ -8,11 +8,13 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; +import java.util.List; + +import com.google.common.collect.ImmutableSet; + import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.block.BlockStateUtils; import biomesoplenty.common.util.block.VariantPagingHelper; -import com.google.common.collect.ImmutableSet; import net.minecraft.block.BlockSlab; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -32,8 +34,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.List; - public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHive.java b/src/main/java/biomesoplenty/common/block/BlockBOPHive.java index a56d3d607..7fca97995 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHive.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHive.java @@ -10,7 +10,6 @@ package biomesoplenty.common.block; import java.util.Random; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.entities.EntityWasp; import biomesoplenty.common.item.ItemBOPBlock; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java b/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java index b847dc794..ee6932546 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java @@ -8,7 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.SoundType; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java b/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java index 0cc8062f8..a11f0de80 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java @@ -13,12 +13,8 @@ import java.util.Random; import com.google.common.collect.Lists; -import biomesoplenty.api.block.BOPBlocks.Coloring; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; -import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.init.ModBlocks; import biomesoplenty.common.item.ItemBOPBlock; import biomesoplenty.common.util.block.VariantPagingHelper; import net.minecraft.block.BlockLeaves; @@ -148,7 +144,7 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock } @Override @SideOnly(Side.CLIENT) - public IItemColor getItemColor() { return Coloring.BLOCK_ITEM_COLORING; } + public IItemColor getItemColor() { return BlockColoring.BLOCK_ITEM_COLORING; } private BlockBOPLeaves() { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java b/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java index 82dea3a36..28f413fcc 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.item.ItemBOPLilypad; import net.minecraft.block.BlockLilyPad; import net.minecraft.block.SoundType; @@ -21,13 +19,8 @@ import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.item.ItemBlock; import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.ColorizerFoliage; -import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeColorHelper; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLog.java b/src/main/java/biomesoplenty/common/block/BlockBOPLog.java index 54f391e39..9d757d4d4 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLog.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLog.java @@ -8,7 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.item.ItemBOPBlock; import biomesoplenty.common.util.block.VariantPagingHelper; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java index 4afb4b264..c2846ebb1 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java @@ -10,8 +10,6 @@ package biomesoplenty.common.block; import java.util.Random; -import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.api.block.ISustainsPlantType; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java b/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java index 313d1e5eb..91abac125 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java @@ -9,7 +9,6 @@ package biomesoplenty.common.block; import biomesoplenty.api.block.BlockQueries; -import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.properties.IProperty; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java b/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java index a2ce87cb4..1f7ec04c8 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java @@ -8,7 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.item.ItemBOPBlock; import biomesoplenty.common.util.block.VariantPagingHelper; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java b/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java index 440c091b7..8afa20b44 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java @@ -8,6 +8,9 @@ package biomesoplenty.common.block; +import java.util.List; +import java.util.Random; + import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.enums.BOPPlants; @@ -49,9 +52,6 @@ import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.List; -import java.util.Random; - // TODO: pick block? public class BlockBOPPlant extends BlockBOPDecoration implements IShearable diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSand.java b/src/main/java/biomesoplenty/common/block/BlockBOPSand.java index 8dab5ff72..f88e78606 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSand.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSand.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.api.block.ISustainsPlantType; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.BlockFalling; import net.minecraft.block.SoundType; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java b/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java index 78212338a..5ba922143 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java @@ -16,15 +16,15 @@ import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.item.ItemBOPSapling; import biomesoplenty.common.util.block.VariantPagingHelper; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; -import biomesoplenty.common.world.feature.tree.GeneratorMahoganyTree; -import biomesoplenty.common.world.feature.tree.GeneratorMangroveTree; -import biomesoplenty.common.world.feature.tree.GeneratorPalmTree; -import biomesoplenty.common.world.feature.tree.GeneratorPineTree; -import biomesoplenty.common.world.feature.tree.GeneratorRedwoodTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorBulbTree; +import biomesoplenty.common.world.generator.tree.GeneratorMahoganyTree; +import biomesoplenty.common.world.generator.tree.GeneratorMangroveTree; +import biomesoplenty.common.world.generator.tree.GeneratorPalmTree; +import biomesoplenty.common.world.generator.tree.GeneratorPineTree; +import biomesoplenty.common.world.generator.tree.GeneratorRedwoodTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; import net.minecraft.block.Block; import net.minecraft.block.BlockOldLeaf; import net.minecraft.block.BlockPlanks; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java b/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java index 571e03b69..dd6bd1f53 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java @@ -11,7 +11,6 @@ package biomesoplenty.common.block; import static net.minecraft.block.BlockLiquid.LEVEL; import biomesoplenty.api.block.BlockQueries; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPStone.java b/src/main/java/biomesoplenty/common/block/BlockBOPStone.java index e5d3a484c..789fcecab 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPStone.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPStone.java @@ -8,7 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.SoundType; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java b/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java index d583d26df..d6036d90c 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java @@ -10,6 +10,7 @@ package biomesoplenty.common.block; import java.util.Random; +import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -26,9 +27,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import biomesoplenty.api.block.BlockQueries; -import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.common.item.ItemBOPBlock; public class BlockBOPStoneFormations extends BlockBOPDecoration implements IBOPBlock { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java b/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java index 179f4bdf5..57b860413 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java @@ -8,7 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPTurnip.java b/src/main/java/biomesoplenty/common/block/BlockBOPTurnip.java index d19c89179..afabb439b 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPTurnip.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPTurnip.java @@ -9,7 +9,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.BlockCrops; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPVine.java b/src/main/java/biomesoplenty/common/block/BlockBOPVine.java index bf3a1c279..658462bec 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPVine.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPVine.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import biomesoplenty.api.block.BOPBlocks.Coloring; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.BlockVine; import net.minecraft.block.SoundType; @@ -36,9 +34,9 @@ public class BlockBOPVine extends BlockVine implements IBOPBlock @Override public String getStateName(IBlockState state) {return "";} @Override - public IBlockColor getBlockColor() { return useGreyScaleTextures ? Coloring.FOLIAGE_COLORING : null; } + public IBlockColor getBlockColor() { return useGreyScaleTextures ? BlockColoring.FOLIAGE_COLORING : null; } @Override - public IItemColor getItemColor() { return Coloring.BLOCK_ITEM_COLORING; } + public IItemColor getItemColor() { return BlockColoring.BLOCK_ITEM_COLORING; } // if set to true, (the default), use BlockVine getBlockColor(), getRenderColor() and colorMultiplier() functions to color the texture based on biome // if set to false, use 0xFFFFFF for all the color functions so that the texture is used as it is diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java b/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java index 32c89bc96..c82a01a4a 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java @@ -11,7 +11,6 @@ package biomesoplenty.common.block; import java.util.HashMap; import java.util.Map; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.BlockStairs; diff --git a/src/main/java/biomesoplenty/common/block/BlockColoring.java b/src/main/java/biomesoplenty/common/block/BlockColoring.java new file mode 100644 index 000000000..2b1a7a7f6 --- /dev/null +++ b/src/main/java/biomesoplenty/common/block/BlockColoring.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2016, 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.block; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.color.IBlockColor; +import net.minecraft.client.renderer.color.IItemColor; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.ColorizerFoliage; +import net.minecraft.world.ColorizerGrass; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.biome.BiomeColorHelper; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class BlockColoring +{ + public static final IBlockColor FOLIAGE_COLORING = new IBlockColor() + { + @Override + public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) + { + return world != null && pos != null ? BiomeColorHelper.getFoliageColorAtPos(world, pos) : ColorizerFoliage.getFoliageColorBasic(); + } + }; + + public static final IBlockColor GRASS_COLORING = new IBlockColor() + { + @Override + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) + { + return world != null && pos != null ? BiomeColorHelper.getGrassColorAtPos(world, pos) : ColorizerGrass.getGrassColor(0.5D, 1.0D); + } + }; + + public static final IItemColor BLOCK_ITEM_COLORING = new IItemColor() + { + @Override + public int getColorFromItemstack(ItemStack stack, int tintIndex) + { + IBlockState state = ((ItemBlock)stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata()); + IBlockColor blockColor = ((IBOPBlock)state.getBlock()).getBlockColor(); + return blockColor == null ? 0xFFFFFF : blockColor.colorMultiplier(state, null, null, tintIndex); + } + }; +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/api/block/IBOPBlock.java b/src/main/java/biomesoplenty/common/block/IBOPBlock.java similarity index 96% rename from src/main/java/biomesoplenty/api/block/IBOPBlock.java rename to src/main/java/biomesoplenty/common/block/IBOPBlock.java index 71e0ef6e9..f6220199f 100644 --- a/src/main/java/biomesoplenty/api/block/IBOPBlock.java +++ b/src/main/java/biomesoplenty/common/block/IBOPBlock.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.block; +package biomesoplenty.common.block; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/biomesoplenty/api/block/ISustainsPlantType.java b/src/main/java/biomesoplenty/common/block/ISustainsPlantType.java similarity index 95% rename from src/main/java/biomesoplenty/api/block/ISustainsPlantType.java rename to src/main/java/biomesoplenty/common/block/ISustainsPlantType.java index 38ebfe0d4..cdc5c204c 100644 --- a/src/main/java/biomesoplenty/api/block/ISustainsPlantType.java +++ b/src/main/java/biomesoplenty/common/block/ISustainsPlantType.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.block; +package biomesoplenty.common.block; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; diff --git a/src/main/java/biomesoplenty/common/handler/decoration/DecorateBiomeEventHandler.java b/src/main/java/biomesoplenty/common/handler/decoration/DecorateBiomeEventHandler.java index 3bf5ae8dc..277612867 100644 --- a/src/main/java/biomesoplenty/common/handler/decoration/DecorateBiomeEventHandler.java +++ b/src/main/java/biomesoplenty/common/handler/decoration/DecorateBiomeEventHandler.java @@ -12,9 +12,10 @@ import java.util.Random; import biomesoplenty.api.biome.BOPBiomes; import biomesoplenty.api.biome.IExtendedBiome; -import biomesoplenty.api.biome.generation.GenerationManager; -import biomesoplenty.api.biome.generation.GeneratorStage; -import biomesoplenty.api.biome.generation.IGenerator; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.api.generation.IGenerationManager; +import biomesoplenty.api.generation.IGenerator; +import biomesoplenty.common.world.GenerationManager; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; @@ -83,7 +84,7 @@ public class DecorateBiomeEventHandler if (extendedBiome != null) { - GenerationManager generationManager = extendedBiome.getGenerationManager(); + IGenerationManager generationManager = extendedBiome.getGenerationManager(); for (IGenerator generator : generationManager.getGeneratorsForStage(stage)) { diff --git a/src/main/java/biomesoplenty/common/init/ModBiomes.java b/src/main/java/biomesoplenty/common/init/ModBiomes.java index 2b3bd8583..83dad1ef0 100644 --- a/src/main/java/biomesoplenty/common/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/common/init/ModBiomes.java @@ -8,13 +8,13 @@ package biomesoplenty.common.init; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; import biomesoplenty.api.biome.IExtendedBiome; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.enums.BOPClimates; import biomesoplenty.common.biome.overworld.*; import biomesoplenty.common.biome.vanilla.*; import biomesoplenty.common.command.BOPCommand; -import biomesoplenty.common.enums.BOPClimates; import biomesoplenty.common.util.config.BOPConfig; import biomesoplenty.common.world.WorldTypeBOP; import biomesoplenty.core.BiomesOPlenty; @@ -41,7 +41,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry private static int nextBiomeId = 40; private static File biomeIdMapFile; - private static BOPConfig.IConfigObj biomeIdMapConf; + private static IConfigObj biomeIdMapConf; protected static Map biomeIdMap; private static Set idsReservedInConfig; private static Map biomeWrapperMap; @@ -387,10 +387,10 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry return ImmutableSet.copyOf(presentBiomes); } - public static BOPConfig.IConfigObj readConfigFile(String idName) + public static IConfigObj readConfigFile(String idName) { File configFile = new File(new File(BiomesOPlenty.configDirectory, "biomes"), idName + ".json"); - BOPConfig.IConfigObj conf = new BOPConfig.ConfigFileObj(configFile); + IConfigObj conf = new BOPConfig.ConfigFileObj(configFile); // log any warnings from parsing the config file for (String msg : conf.flushMessages()) {BiomesOPlenty.logger.warn(msg);} diff --git a/src/main/java/biomesoplenty/common/init/ModBlocks.java b/src/main/java/biomesoplenty/common/init/ModBlocks.java index fef19f0dc..62f799cc0 100644 --- a/src/main/java/biomesoplenty/common/init/ModBlocks.java +++ b/src/main/java/biomesoplenty/common/init/ModBlocks.java @@ -8,7 +8,6 @@ package biomesoplenty.common.init; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.block.*; import biomesoplenty.common.command.BOPCommand; diff --git a/src/main/java/biomesoplenty/common/init/ModCompatibility.java b/src/main/java/biomesoplenty/common/init/ModCompatibility.java index 3b8966016..18b01467c 100644 --- a/src/main/java/biomesoplenty/common/init/ModCompatibility.java +++ b/src/main/java/biomesoplenty/common/init/ModCompatibility.java @@ -5,7 +5,7 @@ import java.util.List; import com.google.common.base.Function; import com.google.common.collect.Lists; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.enums.BOPClimates; import biomesoplenty.common.integration.ThaumcraftCompat; import biomesoplenty.core.BiomesOPlenty; import net.minecraft.world.biome.BiomeGenBase; diff --git a/src/main/java/biomesoplenty/common/init/ModGenerators.java b/src/main/java/biomesoplenty/common/init/ModGenerators.java index b7a932012..a0954fb8c 100644 --- a/src/main/java/biomesoplenty/common/init/ModGenerators.java +++ b/src/main/java/biomesoplenty/common/init/ModGenerators.java @@ -8,39 +8,40 @@ package biomesoplenty.common.init; -import static biomesoplenty.api.biome.generation.GeneratorRegistry.registerGenerator; -import biomesoplenty.api.biome.generation.GeneratorWeighted; -import biomesoplenty.common.world.feature.GeneratorBigFlower; -import biomesoplenty.common.world.feature.GeneratorBigMushroom; -import biomesoplenty.common.world.feature.GeneratorBlobs; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorCrystals; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorLogs; -import biomesoplenty.common.world.feature.GeneratorMixedLily; -import biomesoplenty.common.world.feature.GeneratorOreCluster; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorSpike; -import biomesoplenty.common.world.feature.GeneratorSplatter; -import biomesoplenty.common.world.feature.GeneratorSplotches; -import biomesoplenty.common.world.feature.GeneratorWaterside; -import biomesoplenty.common.world.feature.tree.GeneratorBasicTree; -import biomesoplenty.common.world.feature.tree.GeneratorBayouTree; -import biomesoplenty.common.world.feature.tree.GeneratorBigTree; -import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; -import biomesoplenty.common.world.feature.tree.GeneratorBush; -import biomesoplenty.common.world.feature.tree.GeneratorMahoganyTree; -import biomesoplenty.common.world.feature.tree.GeneratorMangroveTree; -import biomesoplenty.common.world.feature.tree.GeneratorMegaJungleTree; -import biomesoplenty.common.world.feature.tree.GeneratorPalmTree; -import biomesoplenty.common.world.feature.tree.GeneratorPineTree; -import biomesoplenty.common.world.feature.tree.GeneratorProfileTree; -import biomesoplenty.common.world.feature.tree.GeneratorRedwoodTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; -import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; +import static biomesoplenty.common.world.GeneratorRegistry.registerGenerator; + +import biomesoplenty.common.world.generator.GeneratorBigFlower; +import biomesoplenty.common.world.generator.GeneratorBigMushroom; +import biomesoplenty.common.world.generator.GeneratorBlobs; +import biomesoplenty.common.world.generator.GeneratorColumns; +import biomesoplenty.common.world.generator.GeneratorCrystals; +import biomesoplenty.common.world.generator.GeneratorDoubleFlora; +import biomesoplenty.common.world.generator.GeneratorFlora; +import biomesoplenty.common.world.generator.GeneratorGrass; +import biomesoplenty.common.world.generator.GeneratorLakes; +import biomesoplenty.common.world.generator.GeneratorLogs; +import biomesoplenty.common.world.generator.GeneratorMixedLily; +import biomesoplenty.common.world.generator.GeneratorOreCluster; +import biomesoplenty.common.world.generator.GeneratorOreSingle; +import biomesoplenty.common.world.generator.GeneratorSpike; +import biomesoplenty.common.world.generator.GeneratorSplatter; +import biomesoplenty.common.world.generator.GeneratorSplotches; +import biomesoplenty.common.world.generator.GeneratorWaterside; +import biomesoplenty.common.world.generator.GeneratorWeighted; +import biomesoplenty.common.world.generator.tree.GeneratorBasicTree; +import biomesoplenty.common.world.generator.tree.GeneratorBayouTree; +import biomesoplenty.common.world.generator.tree.GeneratorBigTree; +import biomesoplenty.common.world.generator.tree.GeneratorBulbTree; +import biomesoplenty.common.world.generator.tree.GeneratorBush; +import biomesoplenty.common.world.generator.tree.GeneratorMahoganyTree; +import biomesoplenty.common.world.generator.tree.GeneratorMangroveTree; +import biomesoplenty.common.world.generator.tree.GeneratorMegaJungleTree; +import biomesoplenty.common.world.generator.tree.GeneratorPalmTree; +import biomesoplenty.common.world.generator.tree.GeneratorPineTree; +import biomesoplenty.common.world.generator.tree.GeneratorProfileTree; +import biomesoplenty.common.world.generator.tree.GeneratorRedwoodTree; +import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree; +import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree; public class ModGenerators { diff --git a/src/main/java/biomesoplenty/api/item/IColoredItem.java b/src/main/java/biomesoplenty/common/item/IColoredItem.java similarity index 95% rename from src/main/java/biomesoplenty/api/item/IColoredItem.java rename to src/main/java/biomesoplenty/common/item/IColoredItem.java index 3dfeb8ae8..144f93968 100644 --- a/src/main/java/biomesoplenty/api/item/IColoredItem.java +++ b/src/main/java/biomesoplenty/common/item/IColoredItem.java @@ -5,7 +5,7 @@ * * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.item; +package biomesoplenty.common.item; import net.minecraft.client.renderer.color.IItemColor; import net.minecraftforge.fml.relauncher.Side; diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPBlock.java b/src/main/java/biomesoplenty/common/item/ItemBOPBlock.java index 2f641a799..d7680564e 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBOPBlock.java +++ b/src/main/java/biomesoplenty/common/item/ItemBOPBlock.java @@ -12,7 +12,7 @@ import java.util.List; import com.google.common.collect.ImmutableSet; -import biomesoplenty.api.block.IBOPBlock; +import biomesoplenty.common.block.IBOPBlock; import biomesoplenty.common.util.block.BlockStateUtils; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java b/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java index 6fff52c28..14f83fbda 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java +++ b/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java @@ -8,7 +8,6 @@ package biomesoplenty.common.item; -import biomesoplenty.api.item.IColoredItem; import biomesoplenty.common.init.ModEntities; import net.minecraft.block.BlockFence; import net.minecraft.block.BlockLiquid; diff --git a/src/main/java/biomesoplenty/common/util/block/BlockQuery.java b/src/main/java/biomesoplenty/common/util/block/BlockQuery.java index fad551983..7ee98f866 100644 --- a/src/main/java/biomesoplenty/common/util/block/BlockQuery.java +++ b/src/main/java/biomesoplenty/common/util/block/BlockQuery.java @@ -11,7 +11,8 @@ package biomesoplenty.common.util.block; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; -import biomesoplenty.api.block.ISustainsPlantType; +import biomesoplenty.common.block.ISustainsPlantType; + import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; import net.minecraft.block.Block; diff --git a/src/main/java/biomesoplenty/common/util/block/BlockStateUtils.java b/src/main/java/biomesoplenty/common/util/block/BlockStateUtils.java index 2602037cd..7bab3397d 100644 --- a/src/main/java/biomesoplenty/common/util/block/BlockStateUtils.java +++ b/src/main/java/biomesoplenty/common/util/block/BlockStateUtils.java @@ -16,7 +16,7 @@ import java.util.Stack; import com.google.common.collect.ImmutableSet; -import biomesoplenty.api.block.IBOPBlock; +import biomesoplenty.common.block.IBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/biomesoplenty/common/util/config/BOPConfig.java b/src/main/java/biomesoplenty/common/util/config/BOPConfig.java index e686e1da2..d5bfa6336 100644 --- a/src/main/java/biomesoplenty/common/util/config/BOPConfig.java +++ b/src/main/java/biomesoplenty/common/util/config/BOPConfig.java @@ -27,6 +27,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockStateUtils; @@ -54,68 +55,6 @@ public class BOPConfig } } - public static interface IConfigObj - { - public void addMessage(String message); - public void addMessage(String extraPrefix, String message); - public List flushMessages(); - public boolean isEmpty(); - public boolean has(String name); - public Set getKeys(); - - public IConfigObj getObject(String name); - public ArrayList getObjectArray(String name); - public IConfigObj getObject(String name, boolean warnIfMissing); - public ArrayList getObjectArray(String name, boolean warnIfMissing); - - // Use the methods below when you want to obtain a value from a config file, if it is present, but you have a default value to use if it isn't - // No warning messages will be logged using these methods if the value is missing - public Boolean getBool(String name, Boolean defaultVal); - public String getString(String name, String defaultVal); - public Integer getInt(String name, Integer defaultVal); - public Float getFloat(String name, Float defaultVal); - public IBlockState getBlockState(String name, IBlockState defaultVal); - public IBlockPosQuery getBlockPosQuery(String name, IBlockPosQuery defaultVal); - public ResourceLocation getResourceLocation(String name, ResourceLocation defaultVal); - public E getEnum(String name, E defaultVal, Class clazz); - - // Use the methods below when you want to obtain a value from a config file which SHOULD be present - // If the value is missing, a warning message is logged, and null is returned - public Boolean getBool(String name); - public String getString(String name); - public Integer getInt(String name); - public Float getFloat(String name); - public IBlockState getBlockState(String name); - public IBlockPosQuery getBlockPosQuery(String name); - public ResourceLocation getResourceLocation(String name); - public E getEnum(String name, Class clazz); - - // Use the methods below when you want to obtain an array of values from a config file, if it is present, but you have a default value to use if it isn't - // No warning messages will be logged using these methods if the value is missing - public ArrayList getBoolArray(String name, ArrayList defaultVal); - public ArrayList getStringArray(String name, ArrayList defaultVal); - public ArrayList getIntArray(String name, ArrayList defaultVal); - public ArrayList getFloatArray(String name, ArrayList defaultVal); - public ArrayList getBlockStateArray(String name, ArrayList defaultVal); - public ArrayList getBlockPosQueryArray(String name, ArrayList defaultVal); - public ArrayList getResourceLocationArray(String name, ArrayList defaultVal); - public ArrayList getEnumArray(String name, ArrayList defaultVal, Class clazz); - - // Use the methods below when you want to obtain an array of values from a config file which SHOULD be present - // If the value is missing, a warning message is logged, and null is returned - public ArrayList getBoolArray(String name); - public ArrayList getStringArray(String name); - public ArrayList getIntArray(String name); - public ArrayList getFloatArray(String name); - public ArrayList getBlockStateArray(String name); - public ArrayList getBlockPosQueryArray(String name); - public ArrayList getResourceLocationArray(String name); - public ArrayList getEnumArray(String name, Class clazz); - - - } - - // Abstract base class for a config object public static abstract class ConfigObjBase implements IConfigObj { diff --git a/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java b/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java index 93e12461d..efe388663 100644 --- a/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java +++ b/src/main/java/biomesoplenty/common/world/BOPWorldSettings.java @@ -14,10 +14,12 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; +import biomesoplenty.api.config.IBOPWorldSettings; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.config.BOPConfig; import biomesoplenty.core.BiomesOPlenty; -public class BOPWorldSettings +public class BOPWorldSettings implements IBOPWorldSettings { public static Gson serializer = new GsonBuilder().create(); @@ -161,7 +163,7 @@ public class BOPWorldSettings this.fromConfigObj(new BOPConfig.ConfigObj(jsonString)); } - public void fromConfigObj(BOPConfig.IConfigObj worldConfig) + public void fromConfigObj(IConfigObj worldConfig) { this.landScheme = worldConfig.getEnum("landScheme", this.landScheme, LandMassScheme.class); this.tempScheme = worldConfig.getEnum("tempScheme", this.tempScheme, TemperatureVariationScheme.class); @@ -239,10 +241,59 @@ public class BOPWorldSettings // Allow defaults to be overridden from file - BOPConfig.IConfigObj worldConfig = new BOPConfig.ConfigFileObj(new File(BiomesOPlenty.configDirectory, "world.json")); + IConfigObj worldConfig = new BOPConfig.ConfigFileObj(new File(BiomesOPlenty.configDirectory, "world.json")); this.fromConfigObj(worldConfig); } - - + + @Override + public boolean isEnabled(GeneratorType type) + { + switch (type) + { + case GEMS: + return this.generateBopGems; + case SOILS: + return this.generateBopSoils; + case TREES: + return this.generateBopTrees; + case GRASSES: + return this.generateBopGrasses; + case FOLIAGE: + return this.generateBopFoliage; + case FLOWERS: + return this.generateBopFlowers; + case PLANTS: + return this.generateBopPlants; + case WATER_PLANTS: + return this.generateBopWaterPlants; + case MUSHROOMS: + return this.generateBopMushrooms; + case ROCK_FORMATIONS: + return this.generateRockFormations; + case POISON_IVY: + return this.generatePoisonIvy; + case FLAX: + return this.generateFlax; + case BERRY_BUSHES: + return this.generateBerryBushes; + case THORNS: + return this.generateThorns; + case QUICKSAND: + return this.generateQuicksand; + case LIQUID_POISON: + return this.generateLiquidPoison; + case HOT_SPRINGS: + return this.generateHotSprings; + case NETHER_HIVES: + return this.generateNetherHives; + case NETHER_PLANTS: + return this.generateNetherPlants; + case END_FEATURES: + return this.generateEndFeatures; + + default: + return true; + } + } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java b/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java index edec0bf48..ab7a5c159 100644 --- a/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java +++ b/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java @@ -8,7 +8,7 @@ package biomesoplenty.common.world; -import biomesoplenty.api.biome.BOPBiome; +import biomesoplenty.common.biome.overworld.BOPBiome; import biomesoplenty.common.util.biome.BiomeUtils; import net.minecraft.block.BlockFalling; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/biomesoplenty/api/biome/generation/GenerationManager.java b/src/main/java/biomesoplenty/common/world/GenerationManager.java similarity index 89% rename from src/main/java/biomesoplenty/api/biome/generation/GenerationManager.java rename to src/main/java/biomesoplenty/common/world/GenerationManager.java index 4957e2df4..3cdba0a21 100644 --- a/src/main/java/biomesoplenty/api/biome/generation/GenerationManager.java +++ b/src/main/java/biomesoplenty/common/world/GenerationManager.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.biome.generation; +package biomesoplenty.common.world; import java.util.ArrayList; import java.util.HashMap; @@ -15,9 +15,12 @@ import java.util.Map; import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.api.generation.IGenerationManager; +import biomesoplenty.api.generation.IGenerator; -public class GenerationManager +public class GenerationManager implements IGenerationManager { private Map generators = new HashMap(); diff --git a/src/main/java/biomesoplenty/api/biome/generation/GeneratorRegistry.java b/src/main/java/biomesoplenty/common/world/GeneratorRegistry.java similarity index 58% rename from src/main/java/biomesoplenty/api/biome/generation/GeneratorRegistry.java rename to src/main/java/biomesoplenty/common/world/GeneratorRegistry.java index e78647fe1..e4d9ec32b 100644 --- a/src/main/java/biomesoplenty/api/biome/generation/GeneratorRegistry.java +++ b/src/main/java/biomesoplenty/common/world/GeneratorRegistry.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.biome.generation; +package biomesoplenty.common.world; import java.util.HashMap; import java.util.Map; @@ -14,7 +14,12 @@ import java.util.Map; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.api.generation.Generators; +import biomesoplenty.api.generation.IGenerator; +import biomesoplenty.api.generation.IGenerator.IGeneratorBuilder; +import biomesoplenty.api.generation.IGeneratorRegistry; public class GeneratorRegistry { @@ -64,4 +69,48 @@ public class GeneratorRegistry generator.configure(conf); return generator; } + + static + { + Generators.registry = new GeneratorRegistryImpl(); + } + + public static class GeneratorRegistryImpl implements IGeneratorRegistry + { + @Override + public void registerGenerator(String identifier, Class generatorClass, IGeneratorBuilder builder) + { + GeneratorRegistry.registerGenerator(identifier, generatorClass, builder); + } + + @Override + public String getIdentifier(Class generatorClass) + { + return GeneratorRegistry.getIdentifier(generatorClass); + } + + @Override + public Class getGeneratorClass(String identifier) + { + return GeneratorRegistry.getGeneratorClass(identifier); + } + + @Override + public IGeneratorBuilder getGeneratorBuilder(String identifier) + { + return GeneratorRegistry.getGeneratorBuilder(identifier); + } + + @Override + public boolean generatorExists(String identifier) + { + return GeneratorRegistry.generatorExists(identifier); + } + + @Override + public IGenerator createGenerator(IConfigObj conf) + { + return GeneratorRegistry.createGenerator(conf); + } + } } diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorBigFlower.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorBigFlower.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorBigFlower.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorBigFlower.java index b22c132ae..2603ed4ed 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorBigFlower.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorBigFlower.java @@ -6,13 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; -import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.BOPGeneratorBase; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.block.BlockBOPLog; import biomesoplenty.common.enums.BOPTrees; @@ -22,7 +23,6 @@ import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockLog; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorBigMushroom.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorBigMushroom.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorBigMushroom.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorBigMushroom.java index 955e0fa3a..3efe2c714 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorBigMushroom.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorBigMushroom.java @@ -6,17 +6,17 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; -import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.BOPGeneratorBase; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.BlockHugeMushroom; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorBlobs.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorBlobs.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorBlobs.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorBlobs.java index 3e0e0ca21..eaf86689b 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorBlobs.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorBlobs.java @@ -6,15 +6,15 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorColumns.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorColumns.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorColumns.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorColumns.java index fb42dea92..250fe7dad 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorColumns.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorColumns.java @@ -6,16 +6,16 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorCrystals.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorCrystals.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorCrystals.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorCrystals.java index cb98e6a6e..af05dbf68 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorCrystals.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorCrystals.java @@ -1,10 +1,10 @@ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorDoubleFlora.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorDoubleFlora.java index b2bc0c6e9..2996fc960 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorDoubleFlora.java @@ -6,17 +6,17 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.block.BlockBOPDecoration; import biomesoplenty.common.block.BlockBOPDoubleDecoration; import biomesoplenty.common.block.BlockBOPDoublePlant; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.BlockDoublePlant; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorFlora.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorFlora.java index d6fc4f7a0..9da0c5448 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorFlora.java @@ -6,13 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.block.BlockBOPDecoration; import biomesoplenty.common.block.BlockBOPFlower; import biomesoplenty.common.block.BlockBOPLeaves; @@ -24,7 +25,6 @@ import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.BlockFlower; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorGrass.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorGrass.java index ab6112f91..26826863e 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorGrass.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorLakes.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorLakes.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorLakes.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorLakes.java index b5cbf2497..a5e6fdc76 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorLakes.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorLakes.java @@ -6,16 +6,16 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; -import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.BOPGeneratorBase; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorLogs.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorLogs.java index 1de1ae0f9..ccb2dd6d7 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorLogs.java @@ -6,17 +6,17 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.block.BlockBOPLog; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.BlockLog; import net.minecraft.block.BlockNewLog; import net.minecraft.block.BlockOldLog; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorMixedLily.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorMixedLily.java similarity index 96% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorMixedLily.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorMixedLily.java index 48772c54e..946e186b7 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorMixedLily.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorMixedLily.java @@ -6,17 +6,17 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; -import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.BOPGeneratorBase; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.BlockLilyPad; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreBase.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorOreBase.java similarity index 93% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorOreBase.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorOreBase.java index 5e6ec30e9..127894d7a 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreBase.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorOreBase.java @@ -6,18 +6,18 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import org.apache.commons.lang3.tuple.Pair; -import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.BOPGeneratorBase; import biomesoplenty.common.block.BlockBOPGem; import biomesoplenty.common.enums.BOPGems; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreCluster.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorOreCluster.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorOreCluster.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorOreCluster.java index d829ffc1d..5808c7181 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreCluster.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorOreCluster.java @@ -6,16 +6,16 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreSingle.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorOreSingle.java similarity index 96% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorOreSingle.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorOreSingle.java index 63b80a9dd..cfe464306 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreSingle.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorOreSingle.java @@ -6,16 +6,16 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorReplacing.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorReplacing.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorReplacing.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorReplacing.java index 0e735a723..9fd18385f 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorReplacing.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorReplacing.java @@ -6,12 +6,12 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; -import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.generation.BOPGeneratorBase; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorSpike.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorSpike.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorSpike.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorSpike.java index d330e9b0f..afad1bb59 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorSpike.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorSpike.java @@ -5,7 +5,7 @@ * * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; @@ -14,10 +14,10 @@ import org.apache.commons.lang3.tuple.Pair; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplatter.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorSplatter.java similarity index 96% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorSplatter.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorSplatter.java index a19546d85..b5d047c89 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplatter.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorSplatter.java @@ -6,14 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplotches.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorSplotches.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorSplotches.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorSplotches.java index f5f1d83e2..0d530b05e 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplotches.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorSplotches.java @@ -6,14 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorWaterside.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorWaterside.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/GeneratorWaterside.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorWaterside.java index ad0af552f..48b797f32 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorWaterside.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorWaterside.java @@ -6,15 +6,15 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature; +package biomesoplenty.common.world.generator; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/api/biome/generation/GeneratorWeighted.java b/src/main/java/biomesoplenty/common/world/generator/GeneratorWeighted.java similarity index 93% rename from src/main/java/biomesoplenty/api/biome/generation/GeneratorWeighted.java rename to src/main/java/biomesoplenty/common/world/generator/GeneratorWeighted.java index 24ae2fc38..ef8b450b9 100644 --- a/src/main/java/biomesoplenty/api/biome/generation/GeneratorWeighted.java +++ b/src/main/java/biomesoplenty/common/world/generator/GeneratorWeighted.java @@ -6,13 +6,18 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.api.biome.generation; +package biomesoplenty.common.world.generator; import java.util.HashMap; import java.util.Map.Entry; import java.util.Random; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; +import biomesoplenty.api.config.IConfigObj; +import biomesoplenty.api.generation.BOPGeneratorBase; +import biomesoplenty.api.generation.GeneratorStage; +import biomesoplenty.api.generation.IGenerator; +import biomesoplenty.api.generation.IGenerator.IGeneratorBuilder; +import biomesoplenty.common.world.GeneratorRegistry; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBasicTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBasicTree.java similarity index 99% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBasicTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBasicTree.java index f152029e3..e709748d9 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBasicTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBasicTree.java @@ -6,14 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.*; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.BlockCocoa; import net.minecraft.block.BlockSapling; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBayouTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBayouTree.java similarity index 99% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBayouTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBayouTree.java index daab260c6..fc158f140 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBayouTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBayouTree.java @@ -6,17 +6,17 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBigTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBigTree.java similarity index 99% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBigTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBigTree.java index ee3941f9c..596fa9f3d 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBigTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBigTree.java @@ -6,13 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; + import com.google.common.collect.Lists; import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockLog; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBulbTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBulbTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBulbTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBulbTree.java index fb1a08549..aae4cfbf6 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBulbTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBulbTree.java @@ -6,13 +6,13 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.BlockDirectional; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBush.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBush.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBush.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBush.java index 89b24587c..de8437f6a 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBush.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorBush.java @@ -6,14 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorHugeTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorHugeTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorHugeTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorHugeTree.java index 837136b4a..dbc26bbca 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorHugeTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorHugeTree.java @@ -6,7 +6,7 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMahoganyTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMahoganyTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMahoganyTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMahoganyTree.java index f31e5a7ec..4497af137 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMahoganyTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMahoganyTree.java @@ -5,7 +5,7 @@ * * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMangroveTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMangroveTree.java similarity index 99% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMangroveTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMangroveTree.java index 48268d537..ca68aa973 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMangroveTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMangroveTree.java @@ -6,17 +6,17 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery; import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMegaJungleTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMegaJungleTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMegaJungleTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMegaJungleTree.java index db0ff5ea1..7f2c6c207 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMegaJungleTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorMegaJungleTree.java @@ -6,12 +6,12 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; +import biomesoplenty.api.config.IConfigObj; import net.minecraft.block.BlockPlanks; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPalmTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorPalmTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPalmTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorPalmTree.java index 56d34cd7f..724932862 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPalmTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorPalmTree.java @@ -6,14 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPineTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorPineTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPineTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorPineTree.java index 5022e9dbf..c875e265f 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPineTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorPineTree.java @@ -6,14 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorProfileTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorProfileTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorProfileTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorProfileTree.java index 70d8aee89..2ae41ba87 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorProfileTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorProfileTree.java @@ -6,14 +6,14 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorRedwoodTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorRedwoodTree.java similarity index 97% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorRedwoodTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorRedwoodTree.java index b92965472..33e91c681 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorRedwoodTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorRedwoodTree.java @@ -5,19 +5,19 @@ * * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.block.BlockBOPLog; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; -import biomesoplenty.common.world.feature.GeneratorSpike; +import biomesoplenty.common.world.generator.GeneratorSpike; import net.minecraft.block.BlockOldLeaf; import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTaigaTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTaigaTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTaigaTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTaigaTree.java index 5b4162dc5..c9c0c68ef 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTaigaTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTaigaTree.java @@ -6,13 +6,13 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.config.IConfigObj; import biomesoplenty.common.util.biome.GeneratorUtils; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.BlockOldLeaf; import net.minecraft.block.BlockOldLog; import net.minecraft.block.BlockPlanks; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTreeBase.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTreeBase.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTreeBase.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTreeBase.java index 48c167098..a285c30e0 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTreeBase.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTreeBase.java @@ -6,12 +6,12 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; -import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.IBlockPosQuery; +import biomesoplenty.api.generation.BOPGeneratorBase; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.block.BlockBOPLog; import biomesoplenty.common.enums.BOPTrees; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTwigletTree.java b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTwigletTree.java similarity index 98% rename from src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTwigletTree.java rename to src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTwigletTree.java index 8a7aefbd2..27ef906da 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTwigletTree.java +++ b/src/main/java/biomesoplenty/common/world/generator/tree/GeneratorTwigletTree.java @@ -6,13 +6,13 @@ * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ -package biomesoplenty.common.world.feature.tree; +package biomesoplenty.common.world.generator.tree; import java.util.Random; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.IBlockPosQuery; -import biomesoplenty.common.util.config.BOPConfig.IConfigObj; +import biomesoplenty.api.config.IConfigObj; import net.minecraft.block.BlockCocoa; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; diff --git a/src/main/java/biomesoplenty/common/world/layer/BOPGenLayer.java b/src/main/java/biomesoplenty/common/world/layer/BOPGenLayer.java index 32305f7d8..9a878fcd4 100644 --- a/src/main/java/biomesoplenty/common/world/layer/BOPGenLayer.java +++ b/src/main/java/biomesoplenty/common/world/layer/BOPGenLayer.java @@ -7,9 +7,10 @@ ******************************************************************************/ package biomesoplenty.common.world.layer; +import biomesoplenty.api.generation.IBOPGenLayer; import net.minecraft.world.gen.layer.GenLayer; -public abstract class BOPGenLayer extends GenLayer +public abstract class BOPGenLayer extends GenLayer implements IBOPGenLayer { public BOPGenLayer(long seed) { @@ -22,5 +23,4 @@ public abstract class BOPGenLayer extends GenLayer { return super.nextInt(a); } - } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java index 8dde6ce34..f503c736c 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java @@ -8,7 +8,7 @@ package biomesoplenty.common.world.layer; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.enums.BOPClimates; import biomesoplenty.common.init.ModBiomes; import biomesoplenty.common.world.BOPWorldSettings; import net.minecraft.init.Biomes; diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java index 6d91e3bcc..1a486fd75 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java @@ -8,7 +8,7 @@ package biomesoplenty.common.world.layer; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.enums.BOPClimates; import net.minecraft.init.Biomes; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.layer.GenLayer; diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerClimate.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerClimate.java index e570ceac6..494ee0618 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerClimate.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerClimate.java @@ -1,6 +1,6 @@ package biomesoplenty.common.world.layer; -import biomesoplenty.common.enums.BOPClimates; +import biomesoplenty.api.enums.BOPClimates; import net.minecraft.util.math.MathHelper; import net.minecraft.world.gen.layer.GenLayer; import net.minecraft.world.gen.layer.IntCache; diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java index 248668000..8af5628a0 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java @@ -8,8 +8,8 @@ package biomesoplenty.common.world.layer; -import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; +import biomesoplenty.common.biome.overworld.BOPBiome; import net.minecraft.init.Biomes; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.layer.GenLayer; diff --git a/src/main/java/biomesoplenty/core/ClientProxy.java b/src/main/java/biomesoplenty/core/ClientProxy.java index b0cbb185b..e21fc7c83 100644 --- a/src/main/java/biomesoplenty/core/ClientProxy.java +++ b/src/main/java/biomesoplenty/core/ClientProxy.java @@ -8,19 +8,19 @@ package biomesoplenty.core; -import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; -import biomesoplenty.api.item.IColoredItem; import biomesoplenty.api.particle.BOPParticleTypes; import biomesoplenty.client.particle.EntityPixieTrailFX; import biomesoplenty.client.particle.EntityTrailFX; import biomesoplenty.client.texture.ForgeRedirectedResourcePack; +import biomesoplenty.common.block.IBOPBlock; import biomesoplenty.common.config.MiscConfigurationHandler; import biomesoplenty.common.entities.*; import biomesoplenty.common.entities.projectiles.EntityDart; import biomesoplenty.common.entities.projectiles.EntityMudball; import biomesoplenty.common.entities.projectiles.RenderDart; import biomesoplenty.common.entities.projectiles.RenderMudball; +import biomesoplenty.common.item.IColoredItem; import biomesoplenty.common.util.inventory.CreativeTabBOP; import com.google.common.collect.Lists; import net.minecraft.block.Block;