diff --git a/src/main/java/vazkii/botania/api/subtile/signature/BasicSignature.java b/src/main/java/vazkii/botania/api/subtile/signature/BasicSignature.java index 957c46999..5bfa0433b 100644 --- a/src/main/java/vazkii/botania/api/subtile/signature/BasicSignature.java +++ b/src/main/java/vazkii/botania/api/subtile/signature/BasicSignature.java @@ -52,9 +52,6 @@ public class BasicSignature extends SubTileSignature { if(clazz == null) return "uwotm8"; - if(clazz.getAnnotation(PassiveFlower.class) != null) - return "botania.flowerType.passiveGenerating"; - if(SubTileGenerating.class.isAssignableFrom(clazz)) return "botania.flowerType.generating"; diff --git a/src/main/java/vazkii/botania/api/subtile/signature/PassiveFlower.java b/src/main/java/vazkii/botania/api/subtile/signature/PassiveFlower.java deleted file mode 100644 index 73dea37f3..000000000 --- a/src/main/java/vazkii/botania/api/subtile/signature/PassiveFlower.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [04/12/2015, 16:47:01 (GMT)] - */ -package vazkii.botania.api.subtile.signature; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -/** - * This annotation used for detecting whether a SubTileEntity - * is a passive flower without having to instantiate it. This - * is used for the flowers' tooltips. - */ -@Retention(value = RUNTIME) -@Target(value = TYPE) -public @interface PassiveFlower { - -} diff --git a/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java b/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java index e8ccc4730..f3044ac53 100644 --- a/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java @@ -8,12 +8,15 @@ */ package vazkii.botania.client.core.handler; +import java.util.Locale; +import java.util.Map; +import java.util.function.IntFunction; + import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.statemap.DefaultStateMapper; import net.minecraft.client.renderer.block.statemap.IStateMapper; -import net.minecraft.item.EnumDyeColor; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoaderRegistry; @@ -22,12 +25,8 @@ import net.minecraftforge.fml.common.registry.RegistryDelegate; import net.minecraftforge.fml.relauncher.ReflectionHelper; import vazkii.botania.api.BotaniaAPIClient; import vazkii.botania.api.item.IFloatingFlower; -import vazkii.botania.api.state.enums.BiomeStoneVariant; import vazkii.botania.client.model.SpecialFlowerModel; import vazkii.botania.client.render.IModelRegister; -import vazkii.botania.common.block.ModBlocks; -import vazkii.botania.common.block.ModFluffBlocks; -import vazkii.botania.common.block.subtile.SubTileDecor; import vazkii.botania.common.block.subtile.SubTileManastar; import vazkii.botania.common.block.subtile.SubTilePureDaisy; import vazkii.botania.common.block.subtile.functional.SubTileAgricarnation; @@ -58,7 +57,6 @@ import vazkii.botania.common.block.subtile.functional.SubTileTigerseye; import vazkii.botania.common.block.subtile.functional.SubTileVinculotus; import vazkii.botania.common.block.subtile.generating.SubTileArcaneRose; import vazkii.botania.common.block.subtile.generating.SubTileDandelifeon; -import vazkii.botania.common.block.subtile.generating.SubTileDaybloom; import vazkii.botania.common.block.subtile.generating.SubTileEndoflame; import vazkii.botania.common.block.subtile.generating.SubTileEntropinnyum; import vazkii.botania.common.block.subtile.generating.SubTileGourmaryllis; @@ -66,17 +64,12 @@ import vazkii.botania.common.block.subtile.generating.SubTileHydroangeas; import vazkii.botania.common.block.subtile.generating.SubTileKekimurus; import vazkii.botania.common.block.subtile.generating.SubTileMunchdew; import vazkii.botania.common.block.subtile.generating.SubTileNarslimmus; -import vazkii.botania.common.block.subtile.generating.SubTileNightshade; import vazkii.botania.common.block.subtile.generating.SubTileRafflowsia; import vazkii.botania.common.block.subtile.generating.SubTileSpectrolus; import vazkii.botania.common.block.subtile.generating.SubTileThermalily; import vazkii.botania.common.lib.LibBlockNames; import vazkii.botania.common.lib.LibMisc; -import java.util.Locale; -import java.util.Map; -import java.util.function.IntFunction; - public final class ModelHandler { public static void registerModels() { @@ -111,16 +104,9 @@ public final class ModelHandler { BotaniaAPIClient.registerSubtileModel(SubTileManastar.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MANASTAR)); BotaniaAPIClient.registerSubtileModel(SubTilePureDaisy.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_PUREDAISY)); - BotaniaAPIClient.registerSubtileModel(SubTileDaybloom.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM)); - BotaniaAPIClient.registerSubtileModel(SubTileDecor.Daybloom.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM + "Decor")); - BotaniaAPIClient.registerSubtileModel(SubTileDaybloom.Prime.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM_PRIME)); BotaniaAPIClient.registerSubtileModel(SubTileEndoflame.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ENDOFLAME)); BotaniaAPIClient.registerSubtileModel(SubTileHydroangeas.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYDROANGEAS)); - BotaniaAPIClient.registerSubtileModel(SubTileDecor.Hydroangeas.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYDROANGEAS + "Decor")); BotaniaAPIClient.registerSubtileModel(SubTileThermalily.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_THERMALILY)); - BotaniaAPIClient.registerSubtileModel(SubTileNightshade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE)); - BotaniaAPIClient.registerSubtileModel(SubTileDecor.Nightshade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE + "Decor")); - BotaniaAPIClient.registerSubtileModel(SubTileNightshade.Prime.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE_PRIME)); BotaniaAPIClient.registerSubtileModel(SubTileArcaneRose.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ARCANE_ROSE)); BotaniaAPIClient.registerSubtileModel(SubTileMunchdew.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MUNCHDEW)); BotaniaAPIClient.registerSubtileModel(SubTileEntropinnyum.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ENTROPINNYUM)); diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java index e14132b96..42649687f 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java @@ -527,10 +527,10 @@ public class GuiLexicon extends GuiScreen { tutorial.add(LexiconData.manaIntro); tutorial.add(LexiconData.pool); tutorial.add(LexiconData.spreader); - if(ConfigHandler.hardcorePassiveGeneration > 0) - tutorial.add(LexiconData.generatingIntro); - tutorial.add(LexiconData.passiveGen); - tutorial.add(LexiconData.daybloom); + tutorial.add(LexiconData.generatingIntro); + tutorial.add(LexiconData.endoflame); +// tutorial.add(LexiconData.passiveGen); +// tutorial.add(LexiconData.daybloom); tutorial.add(LexiconData.functionalIntro); tutorial.add(LexiconData.runicAltar); diff --git a/src/main/java/vazkii/botania/common/achievement/ModAchievements.java b/src/main/java/vazkii/botania/common/achievement/ModAchievements.java index 82606ae69..ff4a817a9 100644 --- a/src/main/java/vazkii/botania/common/achievement/ModAchievements.java +++ b/src/main/java/vazkii/botania/common/achievement/ModAchievements.java @@ -30,7 +30,7 @@ public final class ModAchievements { public static Achievement flowerPickup; public static Achievement lexiconUse; - public static Achievement daybloomPickup; + public static Achievement daybloomPickup; // TODO change this to something else public static Achievement cacophoniumCraft; public static Achievement manaPoolPickup; @@ -91,7 +91,7 @@ public final class ModAchievements { public static void init() { flowerPickup = new AchievementMod(LibAchievementNames.FLOWER_PICKUP, 0, 4, new ItemStack(ModBlocks.flower, 1, 6), null); lexiconUse = new AchievementMod(LibAchievementNames.LEXICON_USE, 1, 5, ModItems.lexicon, flowerPickup); - daybloomPickup = new AchievementMod(LibAchievementNames.DAYBLOOM_PICKUP, 3, 5, ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAYBLOOM), lexiconUse); + daybloomPickup = new AchievementMod(LibAchievementNames.DAYBLOOM_PICKUP, 3, 5, ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYDROANGEAS), lexiconUse); // TODO this too cacophoniumCraft = new AchievementMod(LibAchievementNames.CACOPHONIUM_CRAFT, -1, 2, ModItems.cacophonium, flowerPickup); manaPoolPickup = new AchievementMod(LibAchievementNames.MANA_POOL_PICKUP, 3, 2, ModBlocks.pool, daybloomPickup); diff --git a/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java b/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java index 423e3b926..314a969fd 100644 --- a/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java +++ b/src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java @@ -74,8 +74,6 @@ public class BlockSpecialFlower extends BlockFlower implements ISpecialFlower, I LibBlockNames.SUBTILE_MANASTAR, // Generating - LibBlockNames.SUBTILE_DAYBLOOM, - LibBlockNames.SUBTILE_NIGHTSHADE, LibBlockNames.SUBTILE_ENDOFLAME, LibBlockNames.SUBTILE_HYDROANGEAS, LibBlockNames.SUBTILE_THERMALILY, diff --git a/src/main/java/vazkii/botania/common/block/ModBlocks.java b/src/main/java/vazkii/botania/common/block/ModBlocks.java index a072401bf..eac1fe811 100644 --- a/src/main/java/vazkii/botania/common/block/ModBlocks.java +++ b/src/main/java/vazkii/botania/common/block/ModBlocks.java @@ -74,7 +74,6 @@ import vazkii.botania.common.block.string.BlockRedStringDispenser; import vazkii.botania.common.block.string.BlockRedStringFertilizer; import vazkii.botania.common.block.string.BlockRedStringInterceptor; import vazkii.botania.common.block.string.BlockRedStringRelay; -import vazkii.botania.common.block.subtile.SubTileDecor; import vazkii.botania.common.block.subtile.SubTileManastar; import vazkii.botania.common.block.subtile.SubTilePureDaisy; import vazkii.botania.common.block.subtile.functional.SubTileAgricarnation; @@ -105,7 +104,6 @@ import vazkii.botania.common.block.subtile.functional.SubTileTigerseye; import vazkii.botania.common.block.subtile.functional.SubTileVinculotus; import vazkii.botania.common.block.subtile.generating.SubTileArcaneRose; import vazkii.botania.common.block.subtile.generating.SubTileDandelifeon; -import vazkii.botania.common.block.subtile.generating.SubTileDaybloom; import vazkii.botania.common.block.subtile.generating.SubTileEndoflame; import vazkii.botania.common.block.subtile.generating.SubTileEntropinnyum; import vazkii.botania.common.block.subtile.generating.SubTileGourmaryllis; @@ -113,7 +111,6 @@ import vazkii.botania.common.block.subtile.generating.SubTileHydroangeas; import vazkii.botania.common.block.subtile.generating.SubTileKekimurus; import vazkii.botania.common.block.subtile.generating.SubTileMunchdew; import vazkii.botania.common.block.subtile.generating.SubTileNarslimmus; -import vazkii.botania.common.block.subtile.generating.SubTileNightshade; import vazkii.botania.common.block.subtile.generating.SubTileRafflowsia; import vazkii.botania.common.block.subtile.generating.SubTileSpectrolus; import vazkii.botania.common.block.subtile.generating.SubTileThermalily; @@ -175,9 +172,6 @@ import vazkii.botania.common.item.ModItems; import vazkii.botania.common.lib.LibBlockNames; import vazkii.botania.common.lib.LibOreDict; -import java.util.HashSet; -import java.util.Set; - public final class ModBlocks { public static Block flower; @@ -454,13 +448,9 @@ public final class ModBlocks { BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_PUREDAISY, SubTilePureDaisy.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_MANASTAR, SubTileManastar.class); - registerSubTileWithDecor(LibBlockNames.SUBTILE_DAYBLOOM, SubTileDaybloom.class, SubTileDecor.Daybloom.class); - BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_DAYBLOOM_PRIME, SubTileDaybloom.Prime.class); + BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_HYDROANGEAS, SubTileHydroangeas.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ENDOFLAME, SubTileEndoflame.class); - registerSubTileWithDecor(LibBlockNames.SUBTILE_HYDROANGEAS, SubTileHydroangeas.class, SubTileDecor.Hydroangeas.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_THERMALILY, SubTileThermalily.class); - registerSubTileWithDecor(LibBlockNames.SUBTILE_NIGHTSHADE, SubTileNightshade.class, SubTileDecor.Nightshade.class); - BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_NIGHTSHADE_PRIME, SubTileNightshade.Prime.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ARCANE_ROSE, SubTileArcaneRose.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_MUNCHDEW, SubTileMunchdew.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ENTROPINNYUM, SubTileEntropinnyum.class); @@ -516,11 +506,6 @@ public final class ModBlocks { BotaniaAPI.registerMiniSubTile(key + "Chibi", innerClazz, key); } - private static void registerSubTileWithDecor(String key, Class clazz, Class decor) { - BotaniaAPI.registerSubTile(key, clazz); - BotaniaAPI.registerMiniSubTile(key + "Decor", decor, key); - } - private static void registerTile(Class clazz, String key) { GameRegistry.registerTileEntity(clazz, LibResources.PREFIX_MOD + key); } diff --git a/src/main/java/vazkii/botania/common/block/subtile/SubTileDecor.java b/src/main/java/vazkii/botania/common/block/subtile/SubTileDecor.java deleted file mode 100644 index f71a6bb8e..000000000 --- a/src/main/java/vazkii/botania/common/block/subtile/SubTileDecor.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [Sep 28, 2015, 10:17:01 PM (GMT)] - */ -package vazkii.botania.common.block.subtile; - -import vazkii.botania.api.subtile.SubTileEntity; - -public class SubTileDecor extends SubTileEntity { - - public static class Daybloom extends SubTileDecor { } - public static class Nightshade extends SubTileDecor { } - public static class Hydroangeas extends SubTileDecor { } - -} diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDaybloom.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDaybloom.java deleted file mode 100644 index ed783f822..000000000 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileDaybloom.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [Jan 25, 2014, 3:09:35 PM (GMT)] - */ -package vazkii.botania.common.block.subtile.generating; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; -import vazkii.botania.api.lexicon.LexiconEntry; -import vazkii.botania.api.subtile.signature.PassiveFlower; -import vazkii.botania.common.lexicon.LexiconData; - -import java.util.List; - -@PassiveFlower -public class SubTileDaybloom extends SubTilePassiveGenerating { - - private static final String TAG_PRIME_POSITION_X = "primePositionX"; - private static final String TAG_PRIME_POSITION_Y = "primePositionY"; - private static final String TAG_PRIME_POSITION_Z = "primePositionZ"; - private static final String TAG_SAVED_POSITION = "savedPosition"; - - BlockPos primePosition; - boolean savedPosition; - - @Override - public int getColor() { - return 0xFFFF00; - } - - @Override - public void onUpdate() { - super.onUpdate(); - - if(isPrime() && (!savedPosition || !supertile.getPos().equals(primePosition))) - supertile.getWorld().setBlockToAir(supertile.getPos()); - } - - public void setPrimusPosition() { - primePosition = supertile.getPos(); - - savedPosition = true; - } - - @Override - public List getDrops(List list) { - if(isPrime()) - list.clear(); - - return super.getDrops(list); - } - - @Override - public boolean canGeneratePassively() { - boolean rain = supertile.getWorld().getBiomeGenForCoords(supertile.getPos()).getRainfall() > 0 && (supertile.getWorld().isRaining() || supertile.getWorld().isThundering()); - return supertile.getWorld().isDaytime() && !rain && supertile.getWorld().canBlockSeeSky(supertile.getPos().up()); - } - - @Override - public int getDelayBetweenPassiveGeneration() { - return isPrime() ? 10 : 12; - } - - @Override - public void writeToPacketNBT(NBTTagCompound cmp) { - super.writeToPacketNBT(cmp); - - if(isPrime()) { - cmp.setInteger(TAG_PRIME_POSITION_X, primePosition.getX()); - cmp.setInteger(TAG_PRIME_POSITION_Y, primePosition.getY()); - cmp.setInteger(TAG_PRIME_POSITION_Z, primePosition.getZ()); - cmp.setBoolean(TAG_SAVED_POSITION, savedPosition); - } - } - - @Override - public void readFromPacketNBT(NBTTagCompound cmp) { - super.readFromPacketNBT(cmp); - - if(isPrime()) { - primePosition = new BlockPos( - cmp.getInteger(TAG_PRIME_POSITION_X), - cmp.getInteger(TAG_PRIME_POSITION_Y), - cmp.getInteger(TAG_PRIME_POSITION_Z) - ); - savedPosition = cmp.getBoolean(TAG_SAVED_POSITION); - } - } - - @Override - public boolean shouldSyncPassiveGeneration() { - return true; - } - - @Override - public boolean isPassiveFlower() { - return !isPrime(); - } - - @Override - public LexiconEntry getEntry() { - return LexiconData.daybloom; - } - - public boolean isPrime() { - return false; - } - - public static class Prime extends SubTileDaybloom { - - @Override - public boolean isPrime() { - return true; - } - - @Override - public LexiconEntry getEntry() { - return LexiconData.primusLoci; - } - - } - -} diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java index dfda50d4f..d5dacc9b4 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileHydroangeas.java @@ -10,6 +10,10 @@ */ package vazkii.botania.common.block.subtile.generating; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; @@ -26,17 +30,12 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidBase; import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.subtile.RadiusDescriptor; -import vazkii.botania.api.subtile.signature.PassiveFlower; +import vazkii.botania.api.subtile.SubTileGenerating; import vazkii.botania.common.Botania; import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.lexicon.LexiconData; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -@PassiveFlower -public class SubTileHydroangeas extends SubTilePassiveGenerating { +public class SubTileHydroangeas extends SubTileGenerating { private static final String TAG_BURN_TIME = "burnTime"; private static final String TAG_COOLDOWN = "cooldown"; @@ -181,7 +180,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating { @Override public int getDelayBetweenPassiveGeneration() { boolean rain = supertile.getWorld().getBiomeGenForCoords(supertile.getPos()).getRainfall() > 0 && (supertile.getWorld().isRaining() || supertile.getWorld().isThundering()); - return rain ? 1 : 2; + return rain ? 2 : 3; } public int getCooldown() { diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNightshade.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNightshade.java deleted file mode 100644 index 706f6e797..000000000 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileNightshade.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [Mar 16, 2014, 11:15:42 PM (GMT)] - */ -package vazkii.botania.common.block.subtile.generating; - -import vazkii.botania.api.lexicon.LexiconEntry; -import vazkii.botania.api.subtile.signature.PassiveFlower; -import vazkii.botania.common.lexicon.LexiconData; - -@PassiveFlower -public class SubTileNightshade extends SubTileDaybloom { - - @Override - public boolean canGeneratePassively() { - return !super.canGeneratePassively() && !supertile.getWorld().isDaytime(); - } - - @Override - public int getColor() { - return 0x3D2A90; - } - - @Override - public LexiconEntry getEntry() { - return LexiconData.nightshade; - } - - public static class Prime extends SubTileNightshade { - - @Override - public boolean isPrime() { - return true; - } - - @Override - public LexiconEntry getEntry() { - return LexiconData.primusLoci; - } - - } - -} diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTilePassiveGenerating.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTilePassiveGenerating.java deleted file mode 100644 index be4092079..000000000 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTilePassiveGenerating.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [Mar 16, 2015, 6:03:16 PM (GMT)] - */ -package vazkii.botania.common.block.subtile.generating; - -import vazkii.botania.api.subtile.SubTileGenerating; - -public class SubTilePassiveGenerating extends SubTileGenerating { - - @Override - public boolean isPassiveFlower() { - return true; - } - -} diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java index 1907afb2f..5fdcee10e 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java @@ -55,7 +55,7 @@ public class SubTileRafflowsia extends SubTileGenerating { SubTileEntity stile = ((ISubTileContainer) tile).getSubTile(); String name = stile.getUnlocalizedName(); - if(stile instanceof SubTileGenerating && ((SubTileGenerating) stile).isPassiveFlower()) { + if(stile instanceof SubTileGenerating) { boolean last = name.equals(lastFlower); if(last) lastFlowerTimes++; diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java index c66cd8e62..becef208f 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileThermalily.java @@ -34,11 +34,6 @@ public class SubTileThermalily extends SubTileHydroangeas { Botania.proxy.wispFX(supertile.getPos().getX() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getY() + 0.9 + Math.random() * 0.2 - 0.1, supertile.getPos().getZ() + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); } - @Override - public boolean isPassiveFlower() { - return false; - } - @Override public Material getMaterialToSearchFor() { return Material.LAVA; diff --git a/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java b/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java index ad5e9df1b..989921d6e 100644 --- a/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java @@ -22,9 +22,6 @@ import vazkii.botania.api.item.IFlowerlessWorld; import vazkii.botania.api.state.BotaniaStateProps; import vazkii.botania.common.block.BlockModFlower; import vazkii.botania.common.block.ModBlocks; -import vazkii.botania.common.block.subtile.generating.SubTileDaybloom; -import vazkii.botania.common.block.tile.TileSpecialFlower; -import vazkii.botania.common.lib.LibBlockNames; public final class BiomeDecorationHandler { @@ -50,7 +47,6 @@ public final class BiomeDecorationHandler { int y = event.getWorld().getTopSolidOrLiquidBlock(event.getPos()).getY(); EnumDyeColor color = EnumDyeColor.byMetadata(event.getRand().nextInt(16)); - boolean primus = event.getRand().nextInt(380) == 0; for(int j = 0; j < ConfigHandler.flowerDensity * ConfigHandler.flowerPatchChance; j++) { int x1 = x + event.getRand().nextInt(dist * 2) - dist; @@ -58,17 +54,9 @@ public final class BiomeDecorationHandler { int z1 = z + event.getRand().nextInt(dist * 2) - dist; BlockPos pos2 = new BlockPos(x1, y1, z1); if(event.getWorld().isAirBlock(pos2) && (!event.getWorld().provider.getHasNoSky() || y1 < 127) && ModBlocks.flower.canPlaceBlockAt(event.getWorld(), pos2)) { - if(primus) { - event.getWorld().setBlockState(pos2, ModBlocks.specialFlower.getDefaultState(), 2); - TileSpecialFlower flower = (TileSpecialFlower) event.getWorld().getTileEntity(pos2); - flower.setSubTile(event.getRand().nextBoolean() ? LibBlockNames.SUBTILE_NIGHTSHADE_PRIME : LibBlockNames.SUBTILE_DAYBLOOM_PRIME); - SubTileDaybloom subtile = (SubTileDaybloom) flower.getSubTile(); - subtile.setPrimusPosition(); - } else { - event.getWorld().setBlockState(pos2, ModBlocks.flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, color), 2); - if(event.getRand().nextDouble() < ConfigHandler.flowerTallChance && ((BlockModFlower) ModBlocks.flower).canGrow(event.getWorld(), pos2, event.getWorld().getBlockState(pos2), false)) - BlockModFlower.placeDoubleFlower(event.getWorld(), pos2, color, 0); - } + event.getWorld().setBlockState(pos2, ModBlocks.flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, color), 2); + if(event.getRand().nextDouble() < ConfigHandler.flowerTallChance && ((BlockModFlower) ModBlocks.flower).canGrow(event.getWorld(), pos2, event.getWorld().getBlockState(pos2), false)) + BlockModFlower.placeDoubleFlower(event.getWorld(), pos2, color, 0); } } } diff --git a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java index b44fe6c4e..e44892d86 100644 --- a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java @@ -35,8 +35,6 @@ public final class ConfigHandler { public static ConfigAdaptor adaptor; - public static int hardcorePassiveGeneration = 72000; - public static boolean useAdaptativeConfig = true; public static boolean useShaders = true; @@ -240,9 +238,6 @@ public final class ConfigHandler { desc = "The quantity of Botania flower patches to generate in the world, defaults to 2, the lower the number the less patches generate."; flowerQuantity = loadPropInt("worldgen.flower.quantity", desc, flowerQuantity); - desc = "The amount of time it takes a Passive flower to decay and turn into a dead bush. Defaults to 72000, 60 minutes. Setting this to -1 disables the feature altogether."; - hardcorePassiveGeneration = loadPropInt("passiveDecay.time", desc, hardcorePassiveGeneration); - desc = "The density of each Botania flower patch generated, defaults to 2, the lower the number, the less each patch will have."; adaptor.addMappingInt(0, "worldgen.flower.density", 16); adaptor.addMappingInt(238, "worldgen.flower.density", 2); diff --git a/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java b/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java index bd13bdfda..f1780852f 100644 --- a/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java @@ -10,6 +10,9 @@ */ package vazkii.botania.common.core.handler; +import java.util.ArrayList; +import java.util.List; + import baubles.common.lib.PlayerHandler; import baubles.common.network.PacketHandler; import baubles.common.network.PacketSyncBauble; @@ -70,9 +73,7 @@ import vazkii.botania.common.lexicon.page.PageMultiblock; import vazkii.botania.common.lexicon.page.PagePetalRecipe; import vazkii.botania.common.lexicon.page.PageRuneRecipe; import vazkii.botania.common.lexicon.page.PageText; - -import java.util.ArrayList; -import java.util.List; +import vazkii.botania.common.lib.LibMisc; public class InternalMethodHandler extends DummyMethodHandler { @@ -229,9 +230,9 @@ public class InternalMethodHandler extends DummyMethodHandler { @Override public int getPassiveFlowerDecay() { - return ConfigHandler.hardcorePassiveGeneration; + return LibMisc.PASSIVE_FLOWER_DECAY; } - + @Override @Optional.Method(modid = "BuildCraft|Transport") public boolean isBuildcraftPipe(TileEntity tile) { diff --git a/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java index 5c6ee477f..61366e49d 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java @@ -81,8 +81,6 @@ public final class ModPetalRecipes { pureDaisyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY), white, white, white, white); manastarRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MANASTAR), lightBlue, green, red, cyan); - daybloomRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAYBLOOM), yellow, yellow, orange, lightBlue); - nightshadeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NIGHTSHADE), black, black, purple, gray); endoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENDOFLAME), brown, brown, red, lightGray, manaPowder); hydroangeasRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYDROANGEAS), blue, blue, cyan, cyan, manaPowder); thermalilyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_THERMALILY), red, orange, orange, runeEarth, runeFire); diff --git a/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java b/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java index dacb292bc..8bf880b26 100644 --- a/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java +++ b/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java @@ -92,6 +92,7 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr stacks.add(TextFormatting.ITALIC + refLocalized); } + System.out.println(type); String mod = BotaniaAPI.subTileMods.get(type); if(!mod.equals(LibMisc.MOD_ID)) stacks.add(TextFormatting.ITALIC + "[" + mod + "]"); @@ -119,8 +120,8 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) { String type = getType(stack); switch (type) { - case LibBlockNames.SUBTILE_DAYBLOOM: - return ModAchievements.daybloomPickup; +// case LibBlockNames.SUBTILE_DAYBLOOM: TODO fix this here +// return ModAchievements.daybloomPickup; case LibBlockNames.SUBTILE_ENDOFLAME: return ModAchievements.endoflamePickup; case LibBlockNames.SUBTILE_KEKIMURUS: diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 057675bec..dd2b290a1 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -122,10 +122,6 @@ public final class LexiconData { public static LexiconEntry bergamute; public static LexiconEntry generatingIntro; - public static LexiconEntry passiveGen; - public static LexiconEntry primusLoci; - public static LexiconEntry daybloom; - public static LexiconEntry nightshade; public static LexiconEntry endoflame; public static LexiconEntry hydroangeas; public static LexiconEntry thermalily; @@ -634,27 +630,8 @@ public final class LexiconData { bergamute.setLexiconPages(new PageText("0"), new PagePetalRecipe<>("1", ModPetalRecipes.bergamuteRecipe)); // GENERATING FLOWERS ENTRIES - if (ConfigHandler.hardcorePassiveGeneration > 0) { - generatingIntro = new BasicLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers); - generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2")); - } - - passiveGen = new BasicLexiconEntry(LibLexicon.GFLOWER_PASSIVE_GENERATION, categoryGenerationFlowers); - passiveGen.setPriority().setLexiconPages(new PageText("0"), new PageText("1")) - .setIcon(new ItemStack(Blocks.DEADBUSH)); - - primusLoci = new BasicLexiconEntry(LibLexicon.GFLOWER_PRIMUS_LOCI, categoryGenerationFlowers); - primusLoci.setPriority().setLexiconPages(new PageText("0"), new PageText("1")); - primusLoci.setIcon(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAYBLOOM_PRIME)); - primusLoci.addExtraDisplayedRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAYBLOOM_PRIME)); - primusLoci.addExtraDisplayedRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NIGHTSHADE_PRIME)); - - daybloom = new BasicLexiconEntry(LibLexicon.GFLOWER_DAYBLOOM, categoryGenerationFlowers); - daybloom.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), - new PagePetalRecipe<>("2", ModPetalRecipes.daybloomRecipe)); - - nightshade = new BasicLexiconEntry(LibLexicon.GFLOWER_NIGHTSHADE, categoryGenerationFlowers); - nightshade.setLexiconPages(new PageText("0"), new PagePetalRecipe<>("1", ModPetalRecipes.nightshadeRecipe)); + generatingIntro = new BasicLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers); + generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2")); endoflame = new BasicLexiconEntry(LibLexicon.GFLOWER_ENDOFLAME, categoryGenerationFlowers); endoflame.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("3"), diff --git a/src/main/java/vazkii/botania/common/lib/LibBlockNames.java b/src/main/java/vazkii/botania/common/lib/LibBlockNames.java index fbb63b727..19448a388 100644 --- a/src/main/java/vazkii/botania/common/lib/LibBlockNames.java +++ b/src/main/java/vazkii/botania/common/lib/LibBlockNames.java @@ -110,12 +110,9 @@ public final class LibBlockNames { public static final String SUBTILE_PUREDAISY = "puredaisy"; public static final String SUBTILE_MANASTAR = "manastar"; - public static final String SUBTILE_DAYBLOOM = "daybloom"; - public static final String SUBTILE_DAYBLOOM_PRIME = "daybloomPrime"; public static final String SUBTILE_ENDOFLAME = "endoflame"; public static final String SUBTILE_HYDROANGEAS = "hydroangeas"; public static final String SUBTILE_THERMALILY = "thermalily"; - public static final String SUBTILE_NIGHTSHADE = "nightshade"; public static final String SUBTILE_NIGHTSHADE_PRIME = "nightshadePrime"; public static final String SUBTILE_ARCANE_ROSE = "arcanerose"; public static final String SUBTILE_MUNCHDEW = "munchdew"; diff --git a/src/main/java/vazkii/botania/common/lib/LibMisc.java b/src/main/java/vazkii/botania/common/lib/LibMisc.java index 08ab4e5f0..72f8f5aa3 100644 --- a/src/main/java/vazkii/botania/common/lib/LibMisc.java +++ b/src/main/java/vazkii/botania/common/lib/LibMisc.java @@ -36,5 +36,7 @@ public final class LibMisc { 0x555555, 0x5555FF, 0x55FF55, 0x55FFFF, 0xFF5555, 0xFF55FF, 0xFFFF55, 0xFFFFFF }; + + public static final int PASSIVE_FLOWER_DECAY = 72000; } diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 6f0d7267a..635eb8c94 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -177,15 +177,11 @@ botania.nei.lexicaNoInfo=(there's no Extra Info for this entry, sorry!) botania.nei.quickInfo:tile.livingwood0~0=You can create Livingwood by placing Wood next to a Pure Daisy botania.nei.quickInfo:tile.livingrock0~0=You can create Livingrock by placing Stone next to a Pure Daisy -botania.nei.quickInfo:flower.daybloom=In this world, it's kill or be killed -botania.nei.quickInfo:flower.daybloomPrimus=This flower can not be harvested, but can be found rarely in the world -botania.nei.quickInfo:flower.nightshadePrimus=This flower can not be harvested, but can be found rarely in the world - botania.nei.quickInfo:item.bone~0=You're gonna have a bad time botania.nei.quickInfo:item.lexicon~0=What exactly did you expect? botania.nei.quickInfo:item.terrasteel~4=You can get Terrasteel by tossing the right materials on a Terrestrial Agglomeration Plate botania.nei.quickInfo:item.enderAirBottle~15=You can get this by right clicking with a Glass Bottle while in the End -primus + # BUILDCRAFT INTEGRATION botania.triggers.manaDetector=Mana Burst botania.triggers.manaEmpty=Mana Empty @@ -1168,26 +1164,12 @@ tile.botania:flower.manastar.name=Manastar tile.botania:flower.manastar.reference=Wish upon a star # - GENERATING -tile.botania:flower.daybloom.name=Daybloom -tile.botania:flower.daybloom.reference=A Sting of light -tile.botania:flower.daybloomDecor.name=Daybloom Motif -tile.botania:flower.daybloomDecor.reference=A Stylish Touch of light -tile.botania:flower.daybloomPrime.name=Daybloom Primus -tile.botania:flower.daybloomPrime.reference=You should not have this on you tile.botania:flower.endoflame.name=Endoflame tile.botania:flower.endoflame.reference=Squirting Lag tile.botania:flower.hydroangeas.name=Hydroangeas tile.botania:flower.hydroangeas.reference=Just friendly crustaceans -tile.botania:flower.hydroangeasDecor.name=Hydroangeas Motif -tile.botania:flower.hydroangeasDecor.reference=Just friendlier crustaceans tile.botania:flower.thermalily.name=Thermalily tile.botania:flower.thermalily.reference=A Scarlet Rose indeed -tile.botania:flower.nightshade.name=Nightshade -tile.botania:flower.nightshade.reference=Ghastly signature -tile.botania:flower.nightshadePrime.name=Nightshade Primus -tile.botania:flower.nightshadePrime.reference=You should not have this on you -tile.botania:flower.nightshadeDecor.name=Nightshade Motif -tile.botania:flower.nightshadeDecor.reference=Ghastly signature tile.botania:flower.arcanerose.name=Rosa Arcana tile.botania:flower.arcanerose.reference=Ten blue orbs in the corner tile.botania:flower.munchdew.name=Munchdew @@ -2466,25 +2448,6 @@ botania.tagline.passiveGen=It's free or it's good, pick one botania.page.passiveGen0=The spectrum of &4Generating Flowers&0 can be arranged in two groups, &4Passive&0 and &4Active&0.
&4Passive Flowers&0 are those that simply create &4Mana&0 using a completely free resource, such as the sun, or water. &4Active Flowers&0 require some sort of resource to transform into &4Mana&0, be it renewable or not. botania.page.passiveGen1=At the start of a botanist's career, only very basic and rudimentary &4Passive Flowers&0 are available, such as the &1Daybloom&0 or &1Nightshade&0.
These flowers are required to advance on to more potent and effective &4Active Flowers&0, but they should not be relied upon aside from being a stepping stone, as all &4Passive Flowers&0 will decay into a &1Dead Bush&0 after three days of work. -# -- PRIMUS LOCI -botania.entry.primusLoci=Primus Loci -botania.tagline.primusLoci=Rare flower patches with non-decaying flowers -botania.page.primusLoci0=Among one's travels, one might come across an unusual flower patch, with flowers resembling &1Dayblooms&0 and &1Nightshades&0.
This is called a &4Primus Locus&0, a rare occurence in the world, where two special generating flora, the &1Daybloom Primus&0 and &1Nightshade Primus&0 can appear. -botania.page.primusLoci1=These flowers act as normal &1Dayblooms&0 or &1Nightshades&0, however, they produce mana a little bit faster and do not decay, making them a great find for a fledgling botanist to set up camp around.
Primus flowers are incredibly fickle, and as such, attempting to move them off their natural resting place will kill them. - -# -- DAYBLOOM -botania.entry.daybloom=Daybloom -botania.tagline.daybloom=Mana from the sky -botania.page.daybloom0=The &1Daybloom&0 is the most basic and rudimentary &4Generating Flower&0. Simply put, it performs a modified photosynthesis process, in order to transform sunlight into &4Mana&0.
The process is rather slow, but about half a dozen of these should get the job done, for now. -botania.page.daybloom1=&1Dayblooms&0 are classified as &4passive flowers&0, which means they will decay after some use.
They also produce feeble amounts of &4Mana&0 to begin with, so perhaps hastily upgrading to &1Endoflames&0 or other &1active flowers&0, once available, might be a good idea. -botania.page.daybloom2=&oStarting up a brand new day&r. - -# -- NIGHTSHADE -botania.entry.nightshade=Nightshade -botania.tagline.nightshade=Mana from the moon -botania.page.nightshade0=The &1Nightshade&0 is the dark counterpart of the &1Daybloom&0, as it generates &4Mana&0 passively in any situation the &1Daybloom&0 can not, as long as it's nighttime.
Alike its shining counterpart, they are classified as &4passive flowers&0, and as such will decay. -botania.page.nightshade1=&oThe shadow of the day&r. - # -- ENDOFLAME botania.entry.endoflame=Endoflame botania.tagline.endoflame=Mana from fuel