diff --git a/README.md b/README.md index 26f993b..65a7650 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Ancient Trees -**LATEST OFFICIAL VERSION**: [Ancient Trees 1.5.1 for MC 1.7.10][latest] ([changelog][changelog.md]) ([all +**LATEST OFFICIAL VERSION**: [Ancient Trees 1.6.0 for MC 1.7.10][latest] ([changelog][changelog.md]) ([all releases][releases])
*DEPENDS ON*: [Kore Sample 1.3.0 (or later) for MC 1.7.10][koresample] diff --git a/api/ForestryAPI/LICENSE.txt b/api/ForestryAPI/LICENSE.txt deleted file mode 100755 index 45bdcf0..0000000 --- a/api/ForestryAPI/LICENSE.txt +++ /dev/null @@ -1,11 +0,0 @@ -License („MIT“) - -Forestry API - -Copyright (c) 2011 - 2014 SirSengir. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/ForestryAPI/README.md b/api/ForestryAPI/README.md deleted file mode 100755 index e080d79..0000000 --- a/api/ForestryAPI/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Forestry API -==================================== - -### What is it? - -Forestry is a modification for the game Minecraft and known primarily for its farms and bees. This is the API for inter-mod operations. - -### Homepage - -[Wiki](http://forestry.sengir.net/) - -[Forums](http://forestry.sengir.net/forum/) - -[IRC #forestry on esper.net](http://webchat.esper.net/?nick=ForestryWiki...&channels=forestry&prompt=1) - -### Notes - -This is only the API. It is not intended to be used by itself, but rather for use either with Forestry itself or another mod which wants to use a functionality of Forestry. - -Package versioning follows the rules laid out by http://semver.org/ - -Bugfixes are generally welcome. If you want to contribute something which changes game mechanics, please talk to someone with commit privileges first. Nothing is more frustrating than putting a lot of work and effort into a new game mechanic and then having the PR rejected because it doesn’t fit gameplay-wise. - -### License & Copyright - -Forestry API is (c) 2011 - 2014 SirSengir and licensed under MIT. See the LICENSE.txt for more information. Note that the core Forestry source is licensed differently! The Forestry API may also contain code contributed by CovertJaguar, Player, MysteriousAges, Binnie and others. diff --git a/api/ForestryAPI/forestry/api/apiculture/BeeManager.java b/api/ForestryAPI/forestry/api/apiculture/BeeManager.java deleted file mode 100755 index c2f61b1..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/BeeManager.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; -import java.util.HashMap; - -import net.minecraft.item.ItemStack; - -import forestry.api.genetics.IMutation; -/** - * - * Some miscellaneous lists and settings for bees. - * - * @author SirSengir - */ -public class BeeManager { - - /** - * Species templates for bees that can drop from hives. - * - * 0 - Forest 1 - Meadows 2 - Desert 3 - Jungle 4 - End 5 - Snow 6 - Swamp - * - * see {@link IMutation} for template format - */ - @Deprecated // Deprecated since 3.1. Use HiveManager instead - public static ArrayList[] hiveDrops; - - /** - * 0 - Common Village Bees 1 - Uncommon Village Bees (20 % of spawns) - */ - public static ArrayList[] villageBees; - - /** - * List of items that can induce swarming. Integer denotes x in 1000 chance. - */ - public static HashMap inducers = new HashMap(); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/EnumBeeChromosome.java b/api/ForestryAPI/forestry/api/apiculture/EnumBeeChromosome.java deleted file mode 100755 index 049c844..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/EnumBeeChromosome.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IAlleleArea; -import forestry.api.genetics.IAlleleBoolean; -import forestry.api.genetics.IAlleleFloat; -import forestry.api.genetics.IAlleleFlowers; -import forestry.api.genetics.IAlleleInteger; -import forestry.api.genetics.IAlleleTolerance; -import forestry.api.genetics.IChromosomeType; -import forestry.api.genetics.ISpeciesRoot; - -/** - * Enum representing the order of chromosomes in a bee's genome and what they control. - * - * @author SirSengir - */ -public enum EnumBeeChromosome implements IChromosomeType { - /** - * Species of the bee. Alleles here must implement {@link IAlleleBeeSpecies}. - */ - SPECIES(IAlleleBeeSpecies.class), - /** - * (Production) Speed of the bee. - */ - SPEED(IAlleleFloat.class), - /** - * Lifespan of the bee. - */ - LIFESPAN(IAlleleInteger.class), - /** - * Fertility of the bee. Determines number of offspring. - */ - FERTILITY(IAlleleInteger.class), - /** - * Temperature difference to its native supported one the bee can tolerate. - */ - TEMPERATURE_TOLERANCE(IAlleleTolerance.class), - /** - * Slightly incorrectly named. If true, a naturally dirunal bee can work during the night. If true, a naturally nocturnal bee can work during the day. - */ - NOCTURNAL(IAlleleBoolean.class), - /** - * Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for FIRE_RESIST. - */ - @Deprecated - HUMIDITY(IAllele.class), - /** - * Humidity difference to its native supported one the bee can tolerate. - */ - HUMIDITY_TOLERANCE(IAlleleTolerance.class), - /** - * If true the bee can work during rain. - */ - TOLERANT_FLYER(IAlleleBoolean.class), - /** - * If true, the bee can work without a clear view of the sky. - */ - CAVE_DWELLING(IAlleleBoolean.class), - /** - * Contains the supported flower provider. - */ - FLOWER_PROVIDER(IAlleleFlowers.class), - /** - * Determines pollination speed. - */ - FLOWERING(IAlleleInteger.class), - /** - * Determines the size of the bee's territory. - */ - TERRITORY(IAlleleArea.class), - /** - * Determines the bee's effect. - */ - EFFECT(IAlleleBeeEffect.class); - - Class clss; - - EnumBeeChromosome(Class clss) { - this.clss = clss; - } - - @Override - public Class getAlleleClass() { - return clss; - } - - @Override - public String getName() { - return this.toString().toLowerCase(); - } - - @Override - public ISpeciesRoot getSpeciesRoot() { - return AlleleManager.alleleRegistry.getSpeciesRoot("rootBees"); - } -} diff --git a/api/ForestryAPI/forestry/api/apiculture/EnumBeeType.java b/api/ForestryAPI/forestry/api/apiculture/EnumBeeType.java deleted file mode 100755 index e3e45c2..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/EnumBeeType.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.Locale; - -public enum EnumBeeType { - DRONE, PRINCESS, QUEEN, LARVAE, NONE; - - public static final EnumBeeType[] VALUES = values(); - - String name; - - private EnumBeeType() { - this.name = this.toString().toLowerCase(Locale.ENGLISH); - } - - public String getName() { - return name; - } -} diff --git a/api/ForestryAPI/forestry/api/apiculture/FlowerManager.java b/api/ForestryAPI/forestry/api/apiculture/FlowerManager.java deleted file mode 100755 index 9362635..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/FlowerManager.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; - -import net.minecraft.item.ItemStack; -import forestry.api.genetics.IFlowerProvider; -import forestry.api.genetics.IFlowerRegistry; - -public class FlowerManager { - /** - * ItemStacks representing simple flower blocks. Meta-sensitive, processed by the basic {@link IFlowerProvider}. - * - * @deprecated since Forestry 3.4. Use {@link #IFlowerRegistry.registerPlantableFlower(ItemStack flower, double weight, String... flowerTypes)} instead. - *
e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);
- */ - @Deprecated - public static ArrayList plainFlowers = new ArrayList(); - - /** - *
e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);
- */ - public static IFlowerRegistry flowerRegistry; - - public static final String FlowerTypeVanilla = "flowersVanilla"; - public static final String FlowerTypeNether = "flowersNether"; - public static final String FlowerTypeCacti = "flowersCacti"; - public static final String FlowerTypeMushrooms = "flowersMushrooms"; - public static final String FlowerTypeEnd = "flowersEnd"; - public static final String FlowerTypeJungle = "flowersJungle"; - public static final String FlowerTypeSnow = "flowersSnow"; - public static final String FlowerTypeWheat = "flowersWheat"; - public static final String FlowerTypeGourd = "flowersGourd"; -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IAlleleBeeEffect.java b/api/ForestryAPI/forestry/api/apiculture/IAlleleBeeEffect.java deleted file mode 100755 index b2dddb3..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IAlleleBeeEffect.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IAlleleEffect; -import forestry.api.genetics.IEffectData; - -public interface IAlleleBeeEffect extends IAlleleEffect { - - /** - * Called by apiaries to cause an effect in the world. - * - * @param genome - * Genome of the bee queen causing this effect - * @param storedData - * Object containing the stored effect data for the apiary/hive the bee is in. - * @param housing {@link IBeeHousing} the bee currently resides in. - * @return storedData, may have been manipulated. - */ - IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing); - - /** - * Is called to produce bee effects. - * - * @param genome - * @param storedData - * Object containing the stored effect data for the apiary/hive the bee is in. - * @param housing {@link IBeeHousing} the bee currently resides in. - * @return storedData, may have been manipulated. - */ - IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IAlleleBeeSpecies.java b/api/ForestryAPI/forestry/api/apiculture/IAlleleBeeSpecies.java deleted file mode 100755 index f409b6a..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IAlleleBeeSpecies.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import forestry.api.genetics.IAlleleSpecies; - -public interface IAlleleBeeSpecies extends IAlleleSpecies { - - /** - * @return the IBeeRoot - */ - IBeeRoot getRoot(); - - /** - * @return true if this species is only active at night. - */ - boolean isNocturnal(); - - /** - * @return Map of possible products with the chance for drop each bee cycle. (0 - 100) - */ - Map getProducts(); - - /** - * @return Map of possible specialities with the chance for drop each bee cycle. (0 - 100) - */ - Map getSpecialty(); - - /** - * Only jubilant bees produce specialities. - * @return true if the bee is jubilant, false otherwise. - */ - boolean isJubilant(IBeeGenome genome, IBeeHousing housing); - - @SideOnly(Side.CLIENT) - IIcon getIcon(EnumBeeType type, int renderPass); - - /** - * @return Path of the texture to use for entity rendering. - */ - String getEntityTexture(); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IAlvearyComponent.java b/api/ForestryAPI/forestry/api/apiculture/IAlvearyComponent.java deleted file mode 100755 index 80cf98b..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IAlvearyComponent.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.core.ITileStructure; - -/** - * Needs to be implemented by TileEntities that want to be part of an alveary. - */ -public interface IAlvearyComponent extends ITileStructure { - - void registerBeeModifier(IBeeModifier modifier); - - void removeBeeModifier(IBeeModifier modifier); - - void registerBeeListener(IBeeListener event); - - void removeBeeListener(IBeeListener event); - - void addTemperatureChange(float change, float boundaryDown, float boundaryUp); - - void addHumidityChange(float change, float boundaryDown, float boundaryUp); - - /** - * @return true if this TE has a function other than a plain alveary block. Returning true prevents the TE from becoming master. - */ - boolean hasFunction(); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IApiaristTracker.java b/api/ForestryAPI/forestry/api/apiculture/IApiaristTracker.java deleted file mode 100755 index 0c65f56..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IApiaristTracker.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IBreedingTracker; -import forestry.api.genetics.IIndividual; - -/** - * Can be used to garner information on bee breeding. See {@link forestry.api.genetics.ISpeciesRoot} for retrieval functions. - * - * @author SirSengir - */ -public interface IApiaristTracker extends IBreedingTracker { - - /** - * Register the birth of a queen. Will mark species as discovered. - * - * @param queen - * Created queen. - */ - void registerQueen(IIndividual queen); - - /** - * @return Amount of queens bred with this tracker. - */ - int getQueenCount(); - - /** - * Register the birth of a princess. Will mark species as discovered. - * - * @param princess - * Created princess. - */ - void registerPrincess(IIndividual princess); - - /** - * @return Amount of princesses bred with this tracker. - */ - int getPrincessCount(); - - /** - * Register the birth of a drone. Will mark species as discovered. - * - * @param drone - * Created drone. - */ - void registerDrone(IIndividual drone); - - /** - * @return Amount of drones bred with this tracker. - */ - int getDroneCount(); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IArmorApiarist.java b/api/ForestryAPI/forestry/api/apiculture/IArmorApiarist.java deleted file mode 100755 index fef81eb..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IArmorApiarist.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * When implemented by armor piece items, allows them to act as apiarist's armor. - */ -public interface IArmorApiarist { - /** - * Called when the apiarist's armor acts as protection against an attack. - * - * @param player - * Player being attacked - * @param armor - * Armor item - * @param cause - * Optional cause of attack, such as a bee effect identifier - * @param doProtect - * Whether or not to actually do the side effects of protection - * @return Whether or not the armor should protect the player from that attack - */ - public boolean protectPlayer(EntityPlayer player, ItemStack armor, String cause, boolean doProtect); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBee.java b/api/ForestryAPI/forestry/api/apiculture/IBee.java deleted file mode 100755 index f9e1fb3..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBee.java +++ /dev/null @@ -1,108 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.core.IErrorState; -import forestry.api.genetics.IEffectData; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.IIndividualLiving; -import net.minecraft.item.ItemStack; -import net.minecraft.world.biome.BiomeGenBase; - -import java.util.ArrayList; - -/** - * Other implementations than Forestry's default one are not supported. - * - * @author SirSengir - */ -public interface IBee extends IIndividualLiving { - - /** - * @return Bee's genetic information. - */ - IBeeGenome getGenome(); - - /** - * @return Genetic information of the bee's mate, null if unmated. - */ - IBeeGenome getMate(); - - /** - * @return true if the individual is originally of natural origin. - */ - boolean isNatural(); - - /** - * @return generation this individual is removed from the original individual. - */ - int getGeneration(); - - /** - * Set the natural flag on this bee. - * @param flag - */ - void setIsNatural(boolean flag); - - /** - * @return true if the bee is mated with another whose isNatural() doesn't match. - * @deprecated since Forestry 3.4.0. Only princesses have isNatural() so this is always false - */ - @Deprecated - boolean isIrregularMating(); - - IEffectData[] doEffect(IEffectData[] storedData, IBeeHousing housing); - - IEffectData[] doFX(IEffectData[] storedData, IBeeHousing housing); - - /** - * @return true if the bee may spawn offspring - */ - boolean canSpawn(); - - /** - * Determines whether the queen can work. - * - * @param housing the {@link IBeeHousing} the bee currently resides in. - * @return Ordinal of the error code encountered. 0 - EnumErrorCode.OK - */ - @Deprecated // Deprecated since Forestry 3.2.0. Use canWork instead. - int isWorking(IBeeHousing housing); - - /** - * Determines whether the queen can work. - * - * @param housing the {@link IBeeHousing} the bee currently resides in. - * @return the error code encountered. - */ - IErrorState canWork(IBeeHousing housing); - - boolean hasFlower(IBeeHousing housing); - - /** - * @deprecated since Forestry 3.2. Use getSuitableBiomes() - */ - @Deprecated - ArrayList getSuitableBiomeIds(); - ArrayList getSuitableBiomes(); - - ItemStack[] getProduceList(); - - ItemStack[] getSpecialtyList(); - - ItemStack[] produceStacks(IBeeHousing housing); - - IBee spawnPrincess(IBeeHousing housing); - - IBee[] spawnDrones(IBeeHousing housing); - - void plantFlowerRandom(IBeeHousing housing); - - IIndividual retrievePollen(IBeeHousing housing); - - boolean pollinateRandom(IBeeHousing housing, IIndividual pollen); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeeGenome.java b/api/ForestryAPI/forestry/api/apiculture/IBeeGenome.java deleted file mode 100755 index 642eeeb..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeeGenome.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.EnumTolerance; -import forestry.api.genetics.IFlowerProvider; -import forestry.api.genetics.IGenome; - -/** - * Only the default implementation is supported. - * - * @author SirSengir - * - */ -public interface IBeeGenome extends IGenome { - - IAlleleBeeSpecies getPrimary(); - - IAlleleBeeSpecies getSecondary(); - - float getSpeed(); - - int getLifespan(); - - int getFertility(); - - EnumTolerance getToleranceTemp(); - - EnumTolerance getToleranceHumid(); - - boolean getNocturnal(); - - boolean getTolerantFlyer(); - - boolean getCaveDwelling(); - - IFlowerProvider getFlowerProvider(); - - int getFlowering(); - - int[] getTerritory(); - - IAlleleBeeEffect getEffect(); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeeHousing.java b/api/ForestryAPI/forestry/api/apiculture/IBeeHousing.java deleted file mode 100755 index 5d795a3..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeeHousing.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.item.ItemStack; - -import forestry.api.genetics.IHousing; - -public interface IBeeHousing extends IBeeModifier, IBeeListener, IHousing { - - ItemStack getQueen(); - - ItemStack getDrone(); - - void setQueen(ItemStack itemstack); - - void setDrone(ItemStack itemstack); - - /** - * @return true if princesses and drones can (currently) mate in this housing to generate queens. - */ - boolean canBreed(); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeeListener.java b/api/ForestryAPI/forestry/api/apiculture/IBeeListener.java deleted file mode 100755 index 7fd5865..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeeListener.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.item.ItemStack; - -import forestry.api.genetics.IIndividual; - -public interface IBeeListener { - - /** - * Called on queen update. - * - * @param queen - */ - void onQueenChange(ItemStack queen); - - /** - * Called when the bees wear out the housing's equipment. - * - * @param amount - * Integer indicating the amount worn out. - */ - void wearOutEquipment(int amount); - - /** - * Called just before the children are generated, and the queen removed. - * - * @param queen - */ - void onQueenDeath(IBee queen); - - /** - * Called after the children have been spawned, but before the queen appears - * - * @param queen - */ - void onPostQueenDeath(IBee queen); - - boolean onPollenRetrieved(IBee queen, IIndividual pollen, boolean isHandled); - - boolean onEggLaid(IBee queen); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeeModifier.java b/api/ForestryAPI/forestry/api/apiculture/IBeeModifier.java deleted file mode 100755 index 4f9f7bb..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeeModifier.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -public interface IBeeModifier { - - /** - * @param genome Genome of the bee this modifier is called for. - * @param currentModifier Current modifier. - * @return Float used to modify the base territory. - */ - float getTerritoryModifier(IBeeGenome genome, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @param mate - * @param currentModifier Current modifier. - * @return Float used to modify the base mutation chance. - */ - float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @param currentModifier Current modifier. - * @return Float used to modify the life span of queens. - */ - float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @param currentModifier Current modifier. - * @return Float modifying the production speed of queens. - */ - float getProductionModifier(IBeeGenome genome, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @return Float modifying the flowering of queens. - */ - float getFloweringModifier(IBeeGenome genome, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @return Float modifying the chance for a swarmer queen to die off. - */ - float getGeneticDecay(IBeeGenome genome, float currentModifier); - - /** - * @return Boolean indicating if housing can ignore rain - */ - boolean isSealed(); - - /** - * @return Boolean indicating if housing can ignore darkness/night - */ - boolean isSelfLighted(); - - /** - * @return Boolean indicating if housing can ignore not seeing the sky - */ - boolean isSunlightSimulated(); - - /** - * @return Boolean indicating whether this housing simulates the nether - */ - boolean isHellish(); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeeMutation.java b/api/ForestryAPI/forestry/api/apiculture/IBeeMutation.java deleted file mode 100755 index fffc7d6..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeeMutation.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IGenome; -import forestry.api.genetics.IMutation; - -public interface IBeeMutation extends IMutation { - - IBeeRoot getRoot(); - - /** - * @param housing - * @param allele0 - * @param allele1 - * @param genome0 - * @param genome1 - * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously! - */ - float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeeRoot.java b/api/ForestryAPI/forestry/api/apiculture/IBeeRoot.java deleted file mode 100755 index b4bbb29..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeeRoot.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.core.IStructureLogic; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.ISpeciesRoot; - -public interface IBeeRoot extends ISpeciesRoot { - - /** - * @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != EnumBeeType.NONE - */ - @Override - boolean isMember(ItemStack stack); - - /** - * @return {@link IBee} pattern parsed from the passed stack's nbt data. - */ - @Override - IBee getMember(ItemStack stack); - - @Override - IBee getMember(NBTTagCompound compound); - - /* GENOME CONVERSION */ - @Override - IBee templateAsIndividual(IAllele[] template); - - @Override - IBee templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - @Override - IBeeGenome templateAsGenome(IAllele[] template); - - @Override - IBeeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /* BREEDING TRACKER */ - /** - * @param world - * @return {@link IApiaristTracker} associated with the passed world. - */ - IApiaristTracker getBreedingTracker(World world, GameProfile player); - - /* BEE SPECIFIC */ - /** - * @return type of bee encoded on the itemstack. EnumBeeType.NONE if it isn't a bee. - */ - EnumBeeType getType(ItemStack stack); - - /** - * @return true if passed item is a drone. Equal to getType(ItemStack stack) == EnumBeeType.DRONE - */ - boolean isDrone(ItemStack stack); - - /** - * @return true if passed item is mated (i.e. a queen) - */ - boolean isMated(ItemStack stack); - - /** - * @param genome - * Valid {@link IBeeGenome} - * @return {@link IBee} from the passed genome - */ - IBee getBee(World world, IBeeGenome genome); - - /** - * Creates an IBee suitable for a queen containing the necessary second genome for the mate. - * - * @param genome - * Valid {@link IBeeGenome} - * @param mate - * Valid {@link IBee} representing the mate. - * @return Mated {@link IBee} from the passed genomes. - */ - IBee getBee(World world, IBeeGenome genome, IBee mate); - - /* TEMPLATES */ - @Override - ArrayList getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection getMutations(boolean shuffle); - - /* GAME MODE */ - void resetBeekeepingMode(); - - ArrayList getBeekeepingModes(); - - IBeekeepingMode getBeekeepingMode(World world); - - IBeekeepingMode getBeekeepingMode(String name); - - void registerBeekeepingMode(IBeekeepingMode mode); - - void setBeekeepingMode(World world, String name); - - /* MISC */ - /** - * @param housing - * Object implementing IBeeHousing. - * @return IBeekeepingLogic - */ - IBeekeepingLogic createBeekeepingLogic(IBeeHousing housing); - - /** - * TileEntities wanting to function as alveary components need to implement structure logic for validation. - * - * @return IStructureLogic for alvearies. - */ - IStructureLogic createAlvearyStructureLogic(IAlvearyComponent structure); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeekeepingLogic.java b/api/ForestryAPI/forestry/api/apiculture/IBeekeepingLogic.java deleted file mode 100755 index 0a4da7b..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeekeepingLogic.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.core.INBTTagable; -import forestry.api.genetics.IEffectData; - -public interface IBeekeepingLogic extends INBTTagable { - - /* STATE INFORMATION */ - int getBreedingTime(); - - int getTotalBreedingTime(); - - IBee getQueen(); - - IBeeHousing getHousing(); - - IEffectData[] getEffectData(); - - /* UPDATING */ - void update(); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IBeekeepingMode.java b/api/ForestryAPI/forestry/api/apiculture/IBeekeepingMode.java deleted file mode 100755 index 80d3098..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IBeekeepingMode.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; - -import net.minecraft.world.World; - -public interface IBeekeepingMode extends IBeeModifier { - - /** - * @return Localized name of this beekeeping mode. - */ - String getName(); - - /** - * @return Localized list of strings outlining the behaviour of this beekeeping mode. - */ - ArrayList getDescription(); - - /** - * @return Float used to modify the wear on comb frames. - */ - float getWearModifier(); - - /** - * @param queen - * @return fertility taking into account the birthing queen and surroundings. - */ - int getFinalFertility(IBee queen, World world, int x, int y, int z); - - /** - * @param queen - * @return true if the queen is genetically "fatigued" and should not be reproduced anymore. - */ - boolean isFatigued(IBee queen, IBeeHousing housing); - - /** - * @param queen - * @param housing - * @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect. - */ - boolean isOverworked(IBee queen, IBeeHousing housing); - - /** - * - * @param queen - * @param offspring - * @param housing - * @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect. - */ - boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing); - - /** - * @param queen - * @return true if an offspring of this queen is considered a natural - */ - boolean isNaturalOffspring(IBee queen); - - /** - * @param queen - * @return true if this mode allows the passed queen or princess to be multiplied - */ - boolean mayMultiplyPrincess(IBee queen); - - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IHiveDrop.java b/api/ForestryAPI/forestry/api/apiculture/IHiveDrop.java deleted file mode 100755 index ea175f8..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IHiveDrop.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * Bees can be seeded either as hive drops or as mutation results. - * - * Add IHiveDrops with HiveManager.get___Hive.addDrop - * - * @author SirSengir - */ -public interface IHiveDrop { - - ItemStack getPrincess(World world, int x, int y, int z, int fortune); - - Collection getDrones(World world, int x, int y, int z, int fortune); - - Collection getAdditional(World world, int x, int y, int z, int fortune); - - /** - * Chance to drop. Default drops have 80 (= 80 %). - * - * @param world Minecraft world this is called for. - * @param x x-Coordinate of the broken hive. - * @param y y-Coordinate of the broken hive. - * @param z z-Coordinate of the broken hive. - * @return Chance for drop as an integer of 0 - 100. - */ - int getChance(World world, int x, int y, int z); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/IHiveFrame.java b/api/ForestryAPI/forestry/api/apiculture/IHiveFrame.java deleted file mode 100755 index dabc9e0..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/IHiveFrame.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.item.ItemStack; - -public interface IHiveFrame extends IBeeModifier { - - /** - * Wears out a frame. - * - * @param housing - * IBeeHousing the frame is contained in. - * @param frame - * ItemStack containing the actual frame. - * @param queen - * Current queen in the caller. - * @param wear - * Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account. - * @return ItemStack containing the actual frame with adjusted damage. - */ - ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/hives/HiveManager.java b/api/ForestryAPI/forestry/api/apiculture/hives/HiveManager.java deleted file mode 100644 index 0e3ebfa..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/hives/HiveManager.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -public class HiveManager { - - public static IHiveRegistry hiveRegistry; - public static IHiveGenHelper genHelper; - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveDescription.java b/api/ForestryAPI/forestry/api/apiculture/hives/IHiveDescription.java deleted file mode 100644 index fcd5baf..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveDescription.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; - -public interface IHiveDescription { - - /** - * The hive generator for this hive. - */ - IHiveGen getHiveGen(); - - /** - * The hive block to be placed in the world. - */ - Block getBlock(); - int getMeta(); - - /** - * returns true if the hive can be generated in these conditions. - * Used as a fast early-elimination check for hives that have no hope of spawning in the area. - */ - boolean isGoodBiome(BiomeGenBase biome); - boolean isGoodHumidity(EnumHumidity humidity); - boolean isGoodTemperature(EnumTemperature temperature); - - /** - * float representing the relative chance a hive will generate in a chunk. - * Default is 1.0, higher numbers result in more hives, smaller will result in fewer. - * Tree hives want around 3.0 to 4.0 since there are less locations to generate on. - */ - float getGenChance(); - - /** - * Called after successful hive generation. - * world, x, y, z give the location of the new hive. - **/ - void postGen(World world, int x, int y, int z); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveGen.java b/api/ForestryAPI/forestry/api/apiculture/hives/IHiveGen.java deleted file mode 100644 index 7505470..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveGen.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import net.minecraft.world.World; - -public interface IHiveGen { - - /** - * return a Y value that the hive should try to generate at. - * returns negative if the hive can't be placed anywhere. - */ - int getYForHive(World world, int x, int z); - - /** - * returns true if the hive can be generated at this location. - * Used for advanced conditions, like checking that the ground below the hive is a certain type. - */ - boolean isValidLocation(World world, int x, int y, int z); - - /** - * returns true if the hive can safely replace the block at this location. - */ - boolean canReplace(World world, int x, int y, int z); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveGenHelper.java b/api/ForestryAPI/forestry/api/apiculture/hives/IHiveGenHelper.java deleted file mode 100644 index 72e3898..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveGenHelper.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import net.minecraft.block.Block; - -public interface IHiveGenHelper { - - /** - * Returns a hiveGen for a hive that spawns on the ground. - * validGroundBlocks specifies which block materials it can spawn on. - */ - IHiveGen ground(Block... validGroundBlocks); - - /** - * Returns a hiveGen for a hive that spawns in trees. - */ - IHiveGen tree(); - -} diff --git a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveRegistry.java b/api/ForestryAPI/forestry/api/apiculture/hives/IHiveRegistry.java deleted file mode 100644 index 0d2c437..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/hives/IHiveRegistry.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import java.util.List; - -import forestry.api.apiculture.IHiveDrop; - -public interface IHiveRegistry { - - /* Forestry Hive Names */ - public static final String forest = "Forestry:forest"; - public static final String meadows = "Forestry:meadows"; - public static final String desert = "Forestry:desert"; - public static final String jungle = "Forestry:jungle"; - public static final String end = "Forestry:end"; - public static final String snow = "Forestry:snow"; - public static final String swamp = "Forestry:swamp"; - - /** - * Adds a new hive to be generated in the world. - */ - void registerHive(String hiveName, IHiveDescription hiveDescription); - - /** - * Add drops to a registered hive. - */ - void addDrops(String hiveName, List drop); -} diff --git a/api/ForestryAPI/forestry/api/apiculture/hives/package-info.java b/api/ForestryAPI/forestry/api/apiculture/hives/package-info.java deleted file mode 100644 index ce626ac..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/hives/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="4.0.0", owner="ForestryAPI|apiculture", provides="ForestryAPI|hives") -package forestry.api.apiculture.hives; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/apiculture/package-info.java b/api/ForestryAPI/forestry/api/apiculture/package-info.java deleted file mode 100755 index c63e475..0000000 --- a/api/ForestryAPI/forestry/api/apiculture/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.6.0", owner="ForestryAPI|core", provides="ForestryAPI|apiculture") -package forestry.api.apiculture; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/arboriculture/EnumGermlingType.java b/api/ForestryAPI/forestry/api/arboriculture/EnumGermlingType.java deleted file mode 100755 index a564be0..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/EnumGermlingType.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -public enum EnumGermlingType { - SAPLING("sapling"), BLOSSOM("blossom"), POLLEN("pollen"), GERMLING("germling"), NONE("none"); - - public static final EnumGermlingType[] VALUES = values(); - - private final String name; - - private EnumGermlingType(String name) { - this.name = name; - } - - public String getName() { - return name; - } - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/EnumGrowthConditions.java b/api/ForestryAPI/forestry/api/arboriculture/EnumGrowthConditions.java deleted file mode 100755 index 8b28601..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/EnumGrowthConditions.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -public enum EnumGrowthConditions { - HOSTILE, PALTRY, NORMAL, GOOD, EXCELLENT -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/EnumTreeChromosome.java b/api/ForestryAPI/forestry/api/arboriculture/EnumTreeChromosome.java deleted file mode 100755 index 8f74d0c..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/EnumTreeChromosome.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IAlleleArea; -import forestry.api.genetics.IAlleleBoolean; -import forestry.api.genetics.IAlleleFloat; -import forestry.api.genetics.IAlleleInteger; -import forestry.api.genetics.IAllelePlantType; -import forestry.api.genetics.IChromosomeType; -import forestry.api.genetics.IFruitFamily; -import forestry.api.genetics.ISpeciesRoot; -import net.minecraftforge.common.EnumPlantType; - -public enum EnumTreeChromosome implements IChromosomeType { - - /** - * Determines the following: - WorldGen, including the used wood blocks - {@link IFruitFamily}s supported. Limits which {@link IFruitProvider} - * will actually yield fruit with this species. - Native {@link EnumPlantType} for this tree. Combines with the PLANT chromosome. - */ - SPECIES(IAlleleTreeSpecies.class), - /** - * {@link IGrowthProvider}, determines conditions required by the tree to grow. - */ - GROWTH(IAlleleGrowth.class), - /** - * A float modifying the height of the tree. Taken into account at worldgen. - */ - HEIGHT(IAlleleFloat.class), - /** - * Chance for saplings. - */ - FERTILITY(IAlleleFloat.class), - /** - * {@link IFruitProvider}, determines if and what fruits are grown on the tree. Limited by the {@link IFruitFamily}s the species supports. - */ - FRUITS(IAlleleFruit.class), - /** - * Chance for fruit leaves and/or drops. - */ - YIELD(IAlleleFloat.class), - /** - * May add additional tolerances for {@link EnumPlantTypes}. - */ - PLANT(IAllelePlantType.class), - /** - * Determines the speed at which fruit will ripen on this tree. - */ - SAPPINESS(IAlleleFloat.class), - /** - * Territory for leaf effects. Unused. - */ - TERRITORY(IAlleleArea.class), - /** - * Leaf effect. Unused. - */ - EFFECT(IAlleleLeafEffect.class), - /** - * Amount of random ticks which need to elapse before a sapling will grow into a tree. - */ - MATURATION(IAlleleInteger.class), - - GIRTH(IAlleleInteger.class), - /** - * Determines if the tree can burn. - */ - FIREPROOF(IAlleleBoolean.class), - ; - - Class clss; - - EnumTreeChromosome(Class clss) { - this.clss = clss; - } - - @Override - public Class getAlleleClass() { - return clss; - } - - @Override - public String getName() { - return this.toString().toLowerCase(); - } - - @Override - public ISpeciesRoot getSpeciesRoot() { - return AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees"); - } - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IAlleleFruit.java b/api/ForestryAPI/forestry/api/arboriculture/IAlleleFruit.java deleted file mode 100755 index 0f54db5..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IAlleleFruit.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.IAllele; - -/** - * Simple allele encapsulating an {@link IFruitProvider}. - */ -public interface IAlleleFruit extends IAllele { - - IFruitProvider getProvider(); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IAlleleGrowth.java b/api/ForestryAPI/forestry/api/arboriculture/IAlleleGrowth.java deleted file mode 100755 index 6cb4b43..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IAlleleGrowth.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.IAllele; - -/** - * Simple allele encapsulating an {@link IGrowthProvider}. - */ -public interface IAlleleGrowth extends IAllele { - - IGrowthProvider getProvider(); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IAlleleLeafEffect.java b/api/ForestryAPI/forestry/api/arboriculture/IAlleleLeafEffect.java deleted file mode 100755 index d52d963..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IAlleleLeafEffect.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -import forestry.api.genetics.IAlleleEffect; -import forestry.api.genetics.IEffectData; - -/** - * Simple allele encapsulating a leaf effect. (Not implemented) - */ -public interface IAlleleLeafEffect extends IAlleleEffect { - - IEffectData doEffect(ITreeGenome genome, IEffectData storedData, World world, int x, int y, int z); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IAlleleTreeSpecies.java b/api/ForestryAPI/forestry/api/arboriculture/IAlleleTreeSpecies.java deleted file mode 100755 index be05725..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IAlleleTreeSpecies.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenerator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraftforge.common.EnumPlantType; - -import forestry.api.genetics.IAlleleSpecies; -import forestry.api.genetics.IFruitFamily; - -public interface IAlleleTreeSpecies extends IAlleleSpecies { - - ITreeRoot getRoot(); - - /** - * @return Native plant type of this species. - */ - EnumPlantType getPlantType(); - - /** - * @return List of all {@link IFruitFamily}s which can grow on leaves generated by this species. - */ - Collection getSuitableFruit(); - - /** - * @param tree - * @param world - * @param x - * @param y - * @param z - * @return Tree generator for the tree at the given location. - */ - WorldGenerator getGenerator(ITree tree, World world, int x, int y, int z); - - /** - * @return All available generator classes for this species. - */ - Class[] getGeneratorClasses(); - - /* TEXTURES AND OVERRIDES */ - int getLeafColour(ITree tree); - - short getLeafIconIndex(ITree tree, boolean fancy); - - @SideOnly(Side.CLIENT) - IIcon getGermlingIcon(EnumGermlingType type, int renderPass); - - @SideOnly(Side.CLIENT) - int getGermlingColour(EnumGermlingType type, int renderPass); - - /** - * - * @return Array of ItemStacks representing logs that these tree produces, the first one being the primary one - */ - ItemStack[] getLogStacks(); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IArboristTracker.java b/api/ForestryAPI/forestry/api/arboriculture/IArboristTracker.java deleted file mode 100755 index 9777e87..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IArboristTracker.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.IBreedingTracker; - -public interface IArboristTracker extends IBreedingTracker { - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IFruitProvider.java b/api/ForestryAPI/forestry/api/arboriculture/IFruitProvider.java deleted file mode 100755 index ef54fc9..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IFruitProvider.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import forestry.api.genetics.IFruitFamily; - -public interface IFruitProvider { - - IFruitFamily getFamily(); - - int getColour(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime); - - boolean markAsFruitLeaf(ITreeGenome genome, World world, int x, int y, int z); - - int getRipeningPeriod(); - - // / Products, Chance - ItemStack[] getProducts(); - - // / Specialty, Chance - ItemStack[] getSpecialty(); - - ItemStack[] getFruits(ITreeGenome genome, World world, int x, int y, int z, int ripeningTime); - - /** - * @return Short, human-readable identifier used in the treealyzer. - */ - String getDescription(); - - /* TEXTURE OVERLAY */ - /** - * @param genome - * @param world - * @param x - * @param y - * @param z - * @param ripeningTime - * Elapsed ripening time for the fruit. - * @param fancy - * @return IIcon index of the texture to overlay on the leaf block. - */ - short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy); - - /** - * @return true if this fruit provider requires fruit blocks to spawn, false otherwise. - */ - boolean requiresFruitBlocks(); - - /** - * Tries to spawn a fruit block at the potential position when the tree generates. - * - * @param genome - * @param world - * @param x - * @param y - * @param z - * @return true if a fruit block was spawned, false otherwise. - */ - boolean trySpawnFruitBlock(ITreeGenome genome, World world, int x, int y, int z); - - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister register); -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IGrowthProvider.java b/api/ForestryAPI/forestry/api/arboriculture/IGrowthProvider.java deleted file mode 100755 index 92e553e..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IGrowthProvider.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -public interface IGrowthProvider { - - /** - * Check to see whether a sapling at the given location with the given genome can grow into a tree. - * - * @param genome Genome of the tree this is called for. - * @param world Minecraft world the tree will inhabit. - * @param xPos x-Coordinate to attempt growth at. - * @param yPos y-Coordinate to attempt growth at. - * @param zPos z-Coordinate to attempt growth at. - * @param expectedGirth Trunk size of the tree to generate. - * @param expectedHeight Height of the tree to generate. - * @return true if the tree can grow at the given coordinates, false otherwise. - */ - boolean canGrow(ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth, int expectedHeight); - - EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, int xPos, int yPos, int zPos); - - /** - * @return Short, human-readable identifier used in the treealyzer. - */ - String getDescription(); - - /** - * @return Detailed description of growth behaviour used in the treealyzer. - */ - String[] getInfo(); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/ILeafTickHandler.java b/api/ForestryAPI/forestry/api/arboriculture/ILeafTickHandler.java deleted file mode 100755 index 4d7fba4..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/ILeafTickHandler.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -public interface ILeafTickHandler { - boolean onRandomLeafTick(ITree tree, World world, int biomeId, int x, int y, int z, boolean isDestroyed); -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/IToolGrafter.java b/api/ForestryAPI/forestry/api/arboriculture/IToolGrafter.java deleted file mode 100755 index 339725e..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/IToolGrafter.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IToolGrafter { - /** - * Called by leaves to determine the increase in sapling droprate. - * - * @param stack ItemStack containing the grafter. - * @param world Minecraft world the player and the target block inhabit. - * @param x x-Coordinate of the broken leaf block. - * @param y y-Coordinate of the broken leaf block. - * @param z z-Coordinate of the broken leaf block. - * @return Float representing the factor the usual drop chance is to be multiplied by. - */ - float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, int x, int y, int z); -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/ITree.java b/api/ForestryAPI/forestry/api/arboriculture/ITree.java deleted file mode 100755 index 5cbd736..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/ITree.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.EnumSet; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenerator; - -import net.minecraftforge.common.EnumPlantType; - -import forestry.api.genetics.IEffectData; -import forestry.api.genetics.IIndividual; -import forestry.api.world.ITreeGenData; - -public interface ITree extends IIndividual, ITreeGenData { - - void mate(ITree other); - - IEffectData[] doEffect(IEffectData[] storedData, World world, int biomeid, int x, int y, int z); - - IEffectData[] doFX(IEffectData[] storedData, World world, int biomeid, int x, int y, int z); - - ITreeGenome getGenome(); - - ITreeGenome getMate(); - - EnumSet getPlantTypes(); - - ITree[] getSaplings(World world, int x, int y, int z, float modifier); - - ItemStack[] getProduceList(); - - ItemStack[] getSpecialtyList(); - - ItemStack[] produceStacks(World world, int x, int y, int z, int ripeningTime); - - /** - * - * @param world - * @param x - * @param y - * @param z - * @return Boolean indicating whether a sapling can stay planted at the given position. - */ - boolean canStay(World world, int x, int y, int z); - - /** - * - * @param world - * @param x - * @param y - * @param z - * @return Boolean indicating whether a sapling at the given position can grow into a tree. - */ - boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight); - - /** - * @return Integer denoting the maturity (block ticks) required for a sapling to attempt to grow into a tree. - */ - int getRequiredMaturity(); - - /** - * @return Integer denoting how resilient leaf blocks are against adverse influences (i.e. caterpillars). - */ - int getResilience(); - - /** - * @param world - * @param x - * @param y - * @param z - * @return Integer denoting the size of the tree trunk. - */ - int getGirth(World world, int x, int y, int z); - - - - /** - * - * @param world - * @param x - * @param y - * @param z - * @return Growth conditions at the given position. - */ - EnumGrowthConditions getGrowthCondition(World world, int x, int y, int z); - - WorldGenerator getTreeGenerator(World world, int x, int y, int z, boolean wasBonemealed); - - ITree copy(); - - boolean isPureBred(EnumTreeChromosome chromosome); - - boolean canBearFruit(); -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/ITreeGenome.java b/api/ForestryAPI/forestry/api/arboriculture/ITreeGenome.java deleted file mode 100755 index ee5a1f0..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/ITreeGenome.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.EnumSet; - -import net.minecraftforge.common.EnumPlantType; - -import forestry.api.genetics.IGenome; - -public interface ITreeGenome extends IGenome { - - IAlleleTreeSpecies getPrimary(); - - IAlleleTreeSpecies getSecondary(); - - IFruitProvider getFruitProvider(); - - IGrowthProvider getGrowthProvider(); - - float getHeight(); - - float getFertility(); - - /** - * @return Determines either a) how many fruit leaves there are or b) the chance for any fruit leave to drop a sapling. Exact usage determined by the - * IFruitProvider - */ - float getYield(); - - float getSappiness(); - - EnumSet getPlantTypes(); - - /** - * @return Amount of random block ticks required for a sapling to mature into a fully grown tree. - */ - int getMaturationTime(); - - int getGirth(); - - IAlleleLeafEffect getEffect(); -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/ITreeModifier.java b/api/ForestryAPI/forestry/api/arboriculture/ITreeModifier.java deleted file mode 100755 index 775f91e..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/ITreeModifier.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -public interface ITreeModifier { - - /** - * - * @param genome - * @return Float used to modify the height. - */ - float getHeightModifier(ITreeGenome genome, float currentModifier); - - /** - * - * @param genome - * @return Float used to modify the yield. - */ - float getYieldModifier(ITreeGenome genome, float currentModifier); - - /** - * - * @param genome - * @return Float used to modify the sappiness. - */ - float getSappinessModifier(ITreeGenome genome, float currentModifier); - - /** - * - * @param genome - * @return Float used to modify the maturation. - */ - float getMaturationModifier(ITreeGenome genome, float currentModifier); - - /** - * @param genome0 - * @param genome1 - * @return Float used to modify the base mutation chance. - */ - float getMutationModifier(ITreeGenome genome0, ITreeGenome genome1, float currentModifier); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/ITreeMutation.java b/api/ForestryAPI/forestry/api/arboriculture/ITreeMutation.java deleted file mode 100755 index 6580496..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/ITreeMutation.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IGenome; -import forestry.api.genetics.IMutation; -import forestry.api.genetics.ISpeciesRoot; - -public interface ITreeMutation extends IMutation { - - /** - * @return {@link ISpeciesRoot} this mutation is associated with. - */ - ITreeRoot getRoot(); - - /** - * @param world - * @param x - * @param y - * @param z - * @param allele0 - * @param allele1 - * @param genome0 - * @param genome1 - * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously! - */ - float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/ITreeRoot.java b/api/ForestryAPI/forestry/api/arboriculture/ITreeRoot.java deleted file mode 100755 index e966ca0..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/ITreeRoot.java +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IChromosome; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.ISpeciesRoot; - -public interface ITreeRoot extends ISpeciesRoot { - - @Override - boolean isMember(ItemStack itemstack); - - @Override - ITree getMember(ItemStack itemstack); - - @Override - ITree getMember(NBTTagCompound compound); - - @Override - ITree templateAsIndividual(IAllele[] template); - - @Override - ITree templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - @Override - ITreeGenome templateAsGenome(IAllele[] template); - - @Override - ITreeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /** - * @param world - * @return {@link IArboristTracker} associated with the passed world. - */ - @Override - IArboristTracker getBreedingTracker(World world, GameProfile player); - - /* TREE SPECIFIC */ - /** - * Register a leaf tick handler. - * @param handler the {@link ILeafTickHandler} to register. - */ - void registerLeafTickHandler(ILeafTickHandler handler); - - Collection getLeafTickHandlers(); - - /** - * @return type of tree encoded on the itemstack. EnumBeeType.NONE if it isn't a tree. - */ - EnumGermlingType getType(ItemStack stack); - - ITree getTree(World world, int x, int y, int z); - - ITree getTree(World world, ITreeGenome genome); - - boolean plantSapling(World world, ITree tree, GameProfile owner, int x, int y, int z); - - /** - * @deprecated since Forestry 3.5.0. Use ITreeGenData setLeavesDecorative. - */ - @Deprecated - // decorative=true for creative and player-placed leaves. No decay, pollination, or drops. - boolean setLeaves(World world, IIndividual tree, GameProfile owner, int x, int y, int z, boolean decorative); - - /** - * @deprecated since Forestry 3.5.0. Use ITreeGenData setLeaves. - */ - @Deprecated - // set normal leaves created as worldgen - boolean setLeaves(World world, IIndividual tree, GameProfile owner, int x, int y, int z); - - @Override - IChromosome[] templateAsChromosomes(IAllele[] template); - - @Override - IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive); - - boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, short[] indices, int x, int y, int z); - - /* GAME MODE */ - ArrayList getTreekeepingModes(); - - ITreekeepingMode getTreekeepingMode(World world); - - ITreekeepingMode getTreekeepingMode(String name); - - void registerTreekeepingMode(ITreekeepingMode mode); - - void setTreekeepingMode(World world, String name); - - /* TEMPLATES */ - @Override - ArrayList getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection getMutations(boolean shuffle); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/ITreekeepingMode.java b/api/ForestryAPI/forestry/api/arboriculture/ITreekeepingMode.java deleted file mode 100755 index cc5224d..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/ITreekeepingMode.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.ArrayList; - -public interface ITreekeepingMode extends ITreeModifier { - - /** - * @return Localized name of this treekeeping mode. - */ - String getName(); - - /** - * @return Localized list of strings outlining the behaviour of this treekeeping mode. - */ - ArrayList getDescription(); - -} diff --git a/api/ForestryAPI/forestry/api/arboriculture/package-info.java b/api/ForestryAPI/forestry/api/arboriculture/package-info.java deleted file mode 100755 index de96114..0000000 --- a/api/ForestryAPI/forestry/api/arboriculture/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.3.0", owner="ForestryAPI|core", provides="ForestryAPI|arboriculture") -package forestry.api.arboriculture; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/circuits/ChipsetManager.java b/api/ForestryAPI/forestry/api/circuits/ChipsetManager.java deleted file mode 100755 index c5f0db5..0000000 --- a/api/ForestryAPI/forestry/api/circuits/ChipsetManager.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -public class ChipsetManager { - - public static ISolderManager solderManager; - public static ICircuitRegistry circuitRegistry; - -} diff --git a/api/ForestryAPI/forestry/api/circuits/ICircuit.java b/api/ForestryAPI/forestry/api/circuits/ICircuit.java deleted file mode 100755 index 01b7e79..0000000 --- a/api/ForestryAPI/forestry/api/circuits/ICircuit.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import java.util.List; - -import net.minecraft.tileentity.TileEntity; - -public interface ICircuit { - String getUID(); - - boolean requiresDiscovery(); - - int getLimit(); - - String getName(); - - boolean isCircuitable(TileEntity tile); - - void onInsertion(int slot, TileEntity tile); - - void onLoad(int slot, TileEntity tile); - - void onRemoval(int slot, TileEntity tile); - - void onTick(int slot, TileEntity tile); - - void addTooltip(List list); -} diff --git a/api/ForestryAPI/forestry/api/circuits/ICircuitBoard.java b/api/ForestryAPI/forestry/api/circuits/ICircuitBoard.java deleted file mode 100755 index 3b424d7..0000000 --- a/api/ForestryAPI/forestry/api/circuits/ICircuitBoard.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import java.util.List; - -import net.minecraft.tileentity.TileEntity; - -import forestry.api.core.INBTTagable; - -public interface ICircuitBoard extends INBTTagable { - - int getPrimaryColor(); - - int getSecondaryColor(); - - void addTooltip(List list); - - void onInsertion(TileEntity tile); - - void onLoad(TileEntity tile); - - void onRemoval(TileEntity tile); - - void onTick(TileEntity tile); - - ICircuit[] getCircuits(); - -} diff --git a/api/ForestryAPI/forestry/api/circuits/ICircuitLayout.java b/api/ForestryAPI/forestry/api/circuits/ICircuitLayout.java deleted file mode 100755 index e90853b..0000000 --- a/api/ForestryAPI/forestry/api/circuits/ICircuitLayout.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -public interface ICircuitLayout { - - String getUID(); - - String getName(); - - String getUsage(); - -} diff --git a/api/ForestryAPI/forestry/api/circuits/ICircuitLibrary.java b/api/ForestryAPI/forestry/api/circuits/ICircuitLibrary.java deleted file mode 100755 index 0d65ba4..0000000 --- a/api/ForestryAPI/forestry/api/circuits/ICircuitLibrary.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -public interface ICircuitLibrary { - -} diff --git a/api/ForestryAPI/forestry/api/circuits/ICircuitRegistry.java b/api/ForestryAPI/forestry/api/circuits/ICircuitRegistry.java deleted file mode 100755 index 40bfeca..0000000 --- a/api/ForestryAPI/forestry/api/circuits/ICircuitRegistry.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface ICircuitRegistry { - - /* CIRCUITS */ - Map getRegisteredCircuits(); - - void registerCircuit(ICircuit circuit); - - ICircuit getCircuit(String uid); - - ICircuitLibrary getCircuitLibrary(World world, String playername); - - @Deprecated - void registerLegacyMapping(int id, String uid); - - @Deprecated - ICircuit getFromLegacyMap(int id); - - /* LAYOUTS */ - Map getRegisteredLayouts(); - - void registerLayout(ICircuitLayout layout); - - ICircuitLayout getLayout(String uid); - - ICircuitLayout getDefaultLayout(); - - ICircuitBoard getCircuitboard(ItemStack itemstack); - - boolean isChipset(ItemStack itemstack); - -} diff --git a/api/ForestryAPI/forestry/api/circuits/ISolderManager.java b/api/ForestryAPI/forestry/api/circuits/ISolderManager.java deleted file mode 100755 index af9b41f..0000000 --- a/api/ForestryAPI/forestry/api/circuits/ISolderManager.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import net.minecraft.item.ItemStack; - -public interface ISolderManager { - - void addRecipe(ICircuitLayout layout, ItemStack resource, ICircuit circuit); - -} diff --git a/api/ForestryAPI/forestry/api/circuits/package-info.java b/api/ForestryAPI/forestry/api/circuits/package-info.java deleted file mode 100755 index 407c743..0000000 --- a/api/ForestryAPI/forestry/api/circuits/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|circuits") -package forestry.api.circuits; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/core/BiomeHelper.java b/api/ForestryAPI/forestry/api/core/BiomeHelper.java deleted file mode 100644 index 6ae0a09..0000000 --- a/api/ForestryAPI/forestry/api/core/BiomeHelper.java +++ /dev/null @@ -1,52 +0,0 @@ -package forestry.api.core; - -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.BiomeDictionary; - -import java.util.HashMap; -import java.util.Map; - -public class BiomeHelper { - - private static final Map isBiomeHellishCache = new HashMap(); - - /** - * Determines if it can rain or snow in the given biome. - */ - public static boolean canRainOrSnow(BiomeGenBase biomeGenBase) { - return biomeGenBase.getEnableSnow() || biomeGenBase.canSpawnLightningBolt(); - } - - /** - * @deprecated since Forestry 3.2. Use canRainOrSnow(BiomeGenBase biomeGenBase) - */ - @Deprecated - public static boolean canRainOrSnow(int biomeID) { - return BiomeDictionary.isBiomeRegistered(biomeID) && canRainOrSnow(BiomeGenBase.getBiome(biomeID)); - } - - /** - * Determines if a given BiomeGenBase is of HELLISH temperature, since it is treated separately from actual temperature values. - * Uses the BiomeDictionary. - * @param biomeGen BiomeGenBase of the biome in question - * @return true, if the BiomeGenBase is a Nether-type biome; false otherwise. - */ - public static boolean isBiomeHellish(BiomeGenBase biomeGen) { - if (isBiomeHellishCache.containsKey(biomeGen)) { - return isBiomeHellishCache.get(biomeGen); - } - - boolean isBiomeHellish = BiomeDictionary.isBiomeOfType(biomeGen, BiomeDictionary.Type.NETHER); - isBiomeHellishCache.put(biomeGen, isBiomeHellish); - return isBiomeHellish; - } - - /** - * @deprecated since Forestry 3.2. Use isBiomeHellish(BiomeGenBase biomeGen) - */ - @Deprecated - public static boolean isBiomeHellish(int biomeID) { - return BiomeDictionary.isBiomeRegistered(biomeID) && isBiomeHellish(BiomeGenBase.getBiome(biomeID)); - } - -} diff --git a/api/ForestryAPI/forestry/api/core/EnumHumidity.java b/api/ForestryAPI/forestry/api/core/EnumHumidity.java deleted file mode 100755 index a874316..0000000 --- a/api/ForestryAPI/forestry/api/core/EnumHumidity.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -/** - * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location. - * - * This enum concerns humidity. - */ -public enum EnumHumidity { - ARID("Arid"), NORMAL("Normal"), DAMP("Damp"); - - public final String name; - - private EnumHumidity(String name) { - this.name = name; - } - - public String getName() { - return this.name; - } - - /** - * Determines the EnumHumidity given a floating point representation of Minecraft Rainfall. - * To check if rainfall is possible in a biome, use BiomeHelper.canRainOrSnow(). - * @param rawHumidity raw rainfall value - * @return EnumHumidity corresponding to rainfall value - */ - public static EnumHumidity getFromValue(float rawHumidity) { - if (rawHumidity > 0.85f) { // matches BiomeGenBase.isHighHumidity() - return DAMP; - } - else if (rawHumidity >= 0.3f) { - return NORMAL; - } - else { - return ARID; - } - } -} diff --git a/api/ForestryAPI/forestry/api/core/EnumTemperature.java b/api/ForestryAPI/forestry/api/core/EnumTemperature.java deleted file mode 100755 index 329a9ab..0000000 --- a/api/ForestryAPI/forestry/api/core/EnumTemperature.java +++ /dev/null @@ -1,111 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import java.security.InvalidParameterException; - -import net.minecraft.util.IIcon; -import net.minecraft.world.biome.BiomeGenBase; - -import net.minecraftforge.common.BiomeDictionary; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location. - * - * This enum concerns temperature. - */ -public enum EnumTemperature { - NONE("None", "habitats/ocean"), ICY("Icy", "habitats/snow"), COLD("Cold", "habitats/taiga"), - NORMAL("Normal", "habitats/plains"), WARM("Warm", "habitats/jungle"), HOT("Hot", "habitats/desert"), HELLISH("Hellish", "habitats/nether"); - - public final String name; - public final String iconIndex; - - private EnumTemperature(String name, String iconIndex) { - this.name = name; - this.iconIndex = iconIndex; - } - - public String getName() { - return this.name; - } - - @SideOnly(Side.CLIENT) - public IIcon getIcon() { - return ForestryAPI.textureManager.getDefault(iconIndex); - } - - /** - * Determines if a given BiomeGenBase is of HELLISH temperature, since it is treated separately from actual temperature values. - * Uses the BiomeDictionary. - * @param biomeGen BiomeGenBase of the biome in question - * @return true, if the BiomeGenBase is a Nether-type biome; false otherwise. - * @deprecated since 3.2. Use BiomeHelper.isBiomeHellish(BiomeGenBase biomeGen) - */ - @Deprecated - public static boolean isBiomeHellish(BiomeGenBase biomeGen) { - return BiomeHelper.isBiomeHellish(biomeGen); - } - - /** - * Determines if a given biomeID is of HELLISH temperature, since it is treated separately from actual temperature values. - * Uses the BiomeDictionary. - * @param biomeID ID of the BiomeGenBase in question - * @return true, if the biomeID is a Nether-type biome; false otherwise. - * @deprecated since 3.2. Use BiomeHelper.isBiomeHellish(BiomeGenBase biomeGen) - */ - @Deprecated - @SuppressWarnings("deprecated") - public static boolean isBiomeHellish(int biomeID) { - return BiomeHelper.isBiomeHellish(biomeID); - } - - /** - * Determines the EnumTemperature given a floating point representation of - * Minecraft temperature. Hellish biomes are handled based on their biome - * type - check BiomeHelper.isBiomeHellish. - * @param rawTemp raw temperature value - * @return EnumTemperature corresponding to value of rawTemp - */ - public static EnumTemperature getFromValue(float rawTemp) { - if (rawTemp > 1.00f) { - return HOT; - } - else if (rawTemp > 0.80f) { - return WARM; - } - else if (rawTemp > 0.30f) { - return NORMAL; - } - else if (rawTemp > 0.0f) { - return COLD; - } - else { - return ICY; - } - } - - public static EnumTemperature getFromBiome(BiomeGenBase biomeGenBase) { - if (BiomeHelper.isBiomeHellish(biomeGenBase)) { - return HELLISH; - } - return getFromValue(biomeGenBase.temperature); - } - - /** - * @deprecated since Forestry 3.2. Use getFromBiome(BiomeGenBase biomeGenBase) - */ - @Deprecated - public static EnumTemperature getFromBiome(int biomeID) { - if (BiomeDictionary.isBiomeRegistered(biomeID)) - throw new InvalidParameterException("BiomeID is not registered: " + biomeID); - return getFromBiome(BiomeGenBase.getBiome(biomeID)); - } - -} diff --git a/api/ForestryAPI/forestry/api/core/ErrorStateRegistry.java b/api/ForestryAPI/forestry/api/core/ErrorStateRegistry.java deleted file mode 100644 index cbb690b..0000000 --- a/api/ForestryAPI/forestry/api/core/ErrorStateRegistry.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - ******************************************************************************* - * Copyright (c) 2011-2014 SirSengir. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v3 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl-3.0.txt - * - * Various Contributors including, but not limited to: - * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges - ******************************************************************************* - */ -package forestry.api.core; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import net.minecraft.client.renderer.texture.IIconRegister; - -/** - * - * @author CovertJaguar - */ -public class ErrorStateRegistry { - - private static final BiMap states = HashBiMap.create(); - private static final Map stateNames = new HashMap(); - private static final Set stateView = Collections.unmodifiableSet(states.inverse().keySet()); - - public static void registerErrorState(IErrorState state) { - if (states.containsKey(state.getID())) - throw new RuntimeException("Forestry Error State does not possess a unique id."); - states.put(state.getID(), state); - addStateName(state, state.getUniqueName()); - } - - public static void addAlias(IErrorState state, String name) { - if (!states.values().contains(state)) - throw new RuntimeException("Forestry Error State did not exist while trying to register alias."); - addStateName(state, name); - } - - private static void addStateName(IErrorState state, String name) { - if (!name.contains(":")) - throw new RuntimeException("Forestry Error State name must be in the format :."); - if (stateNames.containsKey(name)) - throw new RuntimeException("Forestry Error State does not possess a unique name."); - stateNames.put(name, state); - } - - public static IErrorState getErrorState(short id) { - return states.get(id); - } - - public static IErrorState getErrorState(String name) { - return stateNames.get(name); - } - - public static Set getErrorStates() { - return stateView; - } - - @SideOnly(Side.CLIENT) - public static void initIcons(IIconRegister register) { - for (IErrorState code : states.values()) { - code.registerIcons(register); - } - } -} diff --git a/api/ForestryAPI/forestry/api/core/ForestryAPI.java b/api/ForestryAPI/forestry/api/core/ForestryAPI.java deleted file mode 100755 index 24c5b7e..0000000 --- a/api/ForestryAPI/forestry/api/core/ForestryAPI.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Forestry's API is divided into several subcategories to make it easier to understand. - * - * If you need to distribute API files, try to only include the parts you are actually - * using to minimize conflicts due to API changes. - * - * .core - Miscallenous base classes and interfaces as well as some basics for tools, armor, game modes and stuff needed by biome mods. - * .fuels - Managers and classes to facilitate adding fuels to various engines and machines. - * .recipes - Managers and helpers to facilitate adding new recipes to various machines. - * .storage - Managers, events and interfaces for defining new backpacks and handling backpack behaviour. - * .mail - Anything related to handling letters and adding new mail carrier systems. - * .genetics - Shared code for all genetic subclasses. - * \ .apiculture - Bees. - * \ .arboriculture - Trees. - * \ .lepidopterology - Butterflies. - * - * Note that if Forestry is not present, all these references will be null. - */ -public class ForestryAPI { - - /** - * The main mod instance for Forestry. - */ - public static Object instance; - - /** - * A {@link ITextureManager} needed for some things in the API. - */ - @SideOnly(Side.CLIENT) - public static ITextureManager textureManager; - - /** - * The currently active {@link IGameMode}. - */ - public static IGameMode activeMode; - - /** - * Provides information on certain Forestry constants (Villager IDs, Chest gen keys, etc) - */ - public static IForestryConstants forestryConstants; - -} diff --git a/api/ForestryAPI/forestry/api/core/ForestryEvent.java b/api/ForestryAPI/forestry/api/core/ForestryEvent.java deleted file mode 100755 index 362aa64..0000000 --- a/api/ForestryAPI/forestry/api/core/ForestryEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.entity.player.EntityPlayer; - -import cpw.mods.fml.common.eventhandler.Event; - -import com.mojang.authlib.GameProfile; - -import forestry.api.genetics.IAlleleSpecies; -import forestry.api.genetics.IBreedingTracker; -import forestry.api.genetics.IMutation; -import forestry.api.genetics.ISpeciesRoot; - -public abstract class ForestryEvent extends Event { - - private static abstract class BreedingEvent extends ForestryEvent { - public final ISpeciesRoot root; - public final IBreedingTracker tracker; - public final GameProfile username; - - private BreedingEvent(ISpeciesRoot root, GameProfile username, IBreedingTracker tracker) { - super(); - this.root = root; - this.username = username; - this.tracker = tracker; - } - } - - public static class SpeciesDiscovered extends BreedingEvent { - public final IAlleleSpecies species; - public SpeciesDiscovered(ISpeciesRoot root, GameProfile username, IAlleleSpecies species, IBreedingTracker tracker) { - super(root, username, tracker); - this.species = species; - } - } - - public static class MutationDiscovered extends BreedingEvent { - public final IMutation allele; - public MutationDiscovered(ISpeciesRoot root, GameProfile username, IMutation allele, IBreedingTracker tracker) { - super(root, username, tracker); - this.allele = allele; - } - } - - public static class SyncedBreedingTracker extends ForestryEvent { - public final IBreedingTracker tracker; - public final EntityPlayer player; - public SyncedBreedingTracker(IBreedingTracker tracker, EntityPlayer player) { - super(); - this.tracker = tracker; - this.player = player; - } - - } -} diff --git a/api/ForestryAPI/forestry/api/core/IArmorNaturalist.java b/api/ForestryAPI/forestry/api/core/IArmorNaturalist.java deleted file mode 100755 index 87400e2..0000000 --- a/api/ForestryAPI/forestry/api/core/IArmorNaturalist.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public interface IArmorNaturalist { - - /** - * Called when the naturalist's armor acts as spectacles for seeing pollinated tree leaves/flowers. - * - * @param player - * Player doing the viewing - * @param armor - * Armor item - * @param doSee - * Whether or not to actually do the side effects of viewing - * @return true if the armor actually allows the player to see pollination. - */ - public boolean canSeePollination(EntityPlayer player, ItemStack armor, boolean doSee); -} diff --git a/api/ForestryAPI/forestry/api/core/IErrorState.java b/api/ForestryAPI/forestry/api/core/IErrorState.java deleted file mode 100644 index 167a415..0000000 --- a/api/ForestryAPI/forestry/api/core/IErrorState.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - ******************************************************************************* - * Copyright (c) 2011-2014 SirSengir. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v3 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl-3.0.txt - * - * Various Contributors including, but not limited to: - * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges - ******************************************************************************* - */ -package forestry.api.core; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; - -/** - * - * @author CovertJaguar - */ -public interface IErrorState { - - short getID(); - - String getUniqueName(); - - String getDescription(); - - String getHelp(); - - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister register); - - @SideOnly(value = Side.CLIENT) - IIcon getIcon(); - -} diff --git a/api/ForestryAPI/forestry/api/core/IForestryConstants.java b/api/ForestryAPI/forestry/api/core/IForestryConstants.java deleted file mode 100755 index 4cf876f..0000000 --- a/api/ForestryAPI/forestry/api/core/IForestryConstants.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -public interface IForestryConstants { - - /** - * @return The villager ID for the Apiarist Villager. - */ - public int getApicultureVillagerID(); - - /** - * @return The villager ID for the Arborist Villager. - */ - public int getArboricultureVillagerID(); - - /** - * @return The ChestGenHooks key for adding items to the Forestry Villager chest. - */ - public String getVillagerChestGenKey(); -} diff --git a/api/ForestryAPI/forestry/api/core/IGameMode.java b/api/ForestryAPI/forestry/api/core/IGameMode.java deleted file mode 100755 index 0b2b0c5..0000000 --- a/api/ForestryAPI/forestry/api/core/IGameMode.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.item.ItemStack; - -public interface IGameMode { - - /** - * @return Human-readable identifier for the game mode. (i.e. 'EASY', 'NORMAL', 'HARD') - */ - String getIdentifier(); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, false if unknown setting. - */ - boolean getBooleanSetting(String ident); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, 0 if unknown setting. - */ - int getIntegerSetting(String ident); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, 0 if unknown setting. - */ - float getFloatSetting(String ident); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, an itemstack containing an apple if unknown setting. - */ - ItemStack getStackSetting(String ident); - -} diff --git a/api/ForestryAPI/forestry/api/core/IIconProvider.java b/api/ForestryAPI/forestry/api/core/IIconProvider.java deleted file mode 100755 index 308e3ce..0000000 --- a/api/ForestryAPI/forestry/api/core/IIconProvider.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Provides icons, needed in some interfaces, most notably for bees and trees. - */ -public interface IIconProvider { - - @SideOnly(Side.CLIENT) - IIcon getIcon(short texUID); - - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister register); - -} diff --git a/api/ForestryAPI/forestry/api/core/INBTTagable.java b/api/ForestryAPI/forestry/api/core/INBTTagable.java deleted file mode 100755 index 1d3f858..0000000 --- a/api/ForestryAPI/forestry/api/core/INBTTagable.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.nbt.NBTTagCompound; - -public interface INBTTagable { - void readFromNBT(NBTTagCompound nbttagcompound); - - void writeToNBT(NBTTagCompound nbttagcompound); -} diff --git a/api/ForestryAPI/forestry/api/core/ISpecialInventory.java b/api/ForestryAPI/forestry/api/core/ISpecialInventory.java deleted file mode 100644 index a2943ab..0000000 --- a/api/ForestryAPI/forestry/api/core/ISpecialInventory.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011-2014 SirSengir. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v3 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl-3.0.txt - * - * Various Contributors including, but not limited to: - * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -/** - * Taken from BuildCraft 5.0.x - */ -@Deprecated -public interface ISpecialInventory extends IInventory { - - /** - * Offers an ItemStack for addition to the inventory. - * - * @param stack - * ItemStack offered for addition. Do not manipulate this! - * @param doAdd - * If false no actual addition should take place. Implementors should simulate. - * @param from - * Orientation the ItemStack is offered from. - * @return Amount of items used from the passed stack. - */ - @Deprecated - int addItem(ItemStack stack, boolean doAdd, ForgeDirection from); - - /** - * Requests items to be extracted from the inventory - * - * @param doRemove - * If false no actual extraction may occur. Implementors should simulate. - * Can be used to "peek" at what the result would be - * @param from - * Orientation the ItemStack is requested from. - * @param maxItemCount - * Maximum amount of items to extract (spread over all returned item stacks) - * @return Array of item stacks that were/would be extracted from the inventory - */ - @Deprecated - ItemStack[] extractItem(boolean doRemove, ForgeDirection from, int maxItemCount); - -} diff --git a/api/ForestryAPI/forestry/api/core/IStructureLogic.java b/api/ForestryAPI/forestry/api/core/IStructureLogic.java deleted file mode 100755 index aa93d17..0000000 --- a/api/ForestryAPI/forestry/api/core/IStructureLogic.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -public interface IStructureLogic extends INBTTagable { - - /** - * @return String unique to the type of structure controlled by this structure logic. - */ - String getTypeUID(); - - /** - * Called by {@link ITileStructure}'s validateStructure(). - */ - void validateStructure(); - -} diff --git a/api/ForestryAPI/forestry/api/core/ITextureManager.java b/api/ForestryAPI/forestry/api/core/ITextureManager.java deleted file mode 100755 index a259fca..0000000 --- a/api/ForestryAPI/forestry/api/core/ITextureManager.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public interface ITextureManager { - - void registerIconProvider(IIconProvider provider); - - IIcon getIcon(short texUID); - - IIcon getDefault(String ident); -} diff --git a/api/ForestryAPI/forestry/api/core/ITileStructure.java b/api/ForestryAPI/forestry/api/core/ITileStructure.java deleted file mode 100755 index fd9c7f4..0000000 --- a/api/ForestryAPI/forestry/api/core/ITileStructure.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.tileentity.TileEntity; - -/** - * The basis for multiblock components. - */ -public interface ITileStructure { - - /** - * @return String unique to the type of structure controlled by this structure logic. Should map to {@link IStructureLogic} - */ - String getTypeUID(); - - /** - * Should map to {@link IStructureLogic} - */ - void validateStructure(); - - /** - * Called when the structure resets. - */ - void onStructureReset(); - - /** - * @return TileEntity that is the master in this structure, null if no structure exists. - */ - ITileStructure getCentralTE(); - - /** - * Called to set the master TileEntity. Implementing TileEntity should keep track of the master's coordinates, not refer to the TE object itself. - * - * @param tile - */ - void setCentralTE(TileEntity tile); - - /** - * @return IInventory representing the inventory accessed from this block. - */ - @Deprecated - IInventory getInventory(); - - /** - * @return ISidedInventory representing the inventory accessed from this block. - */ - ISidedInventory getStructureInventory(); - - /** - * Only called on Forestry's own blocks. - */ - void makeMaster(); - - /** - * @return true if this TE is the master in a structure, false otherwise. - */ - boolean isMaster(); - - /** - * @return true if the TE is master or has a master. - */ - boolean isIntegratedIntoStructure(); - -} diff --git a/api/ForestryAPI/forestry/api/core/IToolPipette.java b/api/ForestryAPI/forestry/api/core/IToolPipette.java deleted file mode 100644 index 9ef992f..0000000 --- a/api/ForestryAPI/forestry/api/core/IToolPipette.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011-2014 SirSengir. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v3 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl-3.0.txt - * - * Various Contributors including, but not limited to: - * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -/** - * Taken from BuildCraft 5.0.x - */ -public interface IToolPipette { - - /** - * @param pipette - * ItemStack of the pipette. - * @return Capacity of the pipette. - */ - int getCapacity(ItemStack pipette); - - /** - * @param pipette - * @return true if the pipette can pipette. - */ - boolean canPipette(ItemStack pipette); - - /** - * Fills the pipette with the given liquid stack. - * - * @param pipette - * @param liquid - * @param doFill - * @return Amount of liquid used in filling the pipette. - */ - int fill(ItemStack pipette, FluidStack liquid, boolean doFill); - - /** - * Drains liquid from the pipette - * - * @param pipette - * @param maxDrain - * @param doDrain - * @return Fluid stack representing the liquid and amount drained from the pipette. - */ - FluidStack drain(ItemStack pipette, int maxDrain, boolean doDrain); -} diff --git a/api/ForestryAPI/forestry/api/core/IToolScoop.java b/api/ForestryAPI/forestry/api/core/IToolScoop.java deleted file mode 100755 index 583b6c7..0000000 --- a/api/ForestryAPI/forestry/api/core/IToolScoop.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -/** - * Marks a tool as a scoop. - */ -public interface IToolScoop { - -} diff --git a/api/ForestryAPI/forestry/api/core/Tabs.java b/api/ForestryAPI/forestry/api/core/Tabs.java deleted file mode 100755 index 4ce8583..0000000 --- a/api/ForestryAPI/forestry/api/core/Tabs.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.creativetab.CreativeTabs; - -/** - * References to the specialised tabs added by Forestry to creative inventory. - */ -public class Tabs { - - public static CreativeTabs tabApiculture; - public static CreativeTabs tabArboriculture; - public static CreativeTabs tabLepidopterology; - -} diff --git a/api/ForestryAPI/forestry/api/core/package-info.java b/api/ForestryAPI/forestry/api/core/package-info.java deleted file mode 100755 index 7eeab76..0000000 --- a/api/ForestryAPI/forestry/api/core/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.6.1", owner="Forestry", provides="ForestryAPI|core") -package forestry.api.core; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/farming/Farmables.java b/api/ForestryAPI/forestry/api/farming/Farmables.java deleted file mode 100755 index bc4c159..0000000 --- a/api/ForestryAPI/forestry/api/farming/Farmables.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; -import java.util.HashMap; - -public class Farmables { - /** - * Can be used to add IFarmables to some of the vanilla farm logics. - * - * Identifiers: farmArboreal farmWheat farmGourd farmInfernal farmPoales farmSucculentes farmVegetables farmShroom - */ - public static HashMap> farmables = new HashMap>(); - - public static IFarmInterface farmInterface; -} diff --git a/api/ForestryAPI/forestry/api/farming/ICrop.java b/api/ForestryAPI/forestry/api/farming/ICrop.java deleted file mode 100755 index 2257547..0000000 --- a/api/ForestryAPI/forestry/api/farming/ICrop.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; - -public interface ICrop { - - /** - * Harvests this crop. Performs the necessary manipulations to set the crop into a "harvested" state. - * - * @return Products harvested. - */ - Collection harvest(); - -} diff --git a/api/ForestryAPI/forestry/api/farming/IFarmComponent.java b/api/ForestryAPI/forestry/api/farming/IFarmComponent.java deleted file mode 100755 index 3387f7a..0000000 --- a/api/ForestryAPI/forestry/api/farming/IFarmComponent.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import forestry.api.core.ITileStructure; - -public interface IFarmComponent extends ITileStructure { - - boolean hasFunction(); - - void registerListener(IFarmListener listener); - - void removeListener(IFarmListener listener); -} diff --git a/api/ForestryAPI/forestry/api/farming/IFarmHousing.java b/api/ForestryAPI/forestry/api/farming/IFarmHousing.java deleted file mode 100755 index acdd982..0000000 --- a/api/ForestryAPI/forestry/api/farming/IFarmHousing.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -public interface IFarmHousing { - - int[] getCoords(); - - int[] getArea(); - - int[] getOffset(); - - World getWorld(); - - /** - * Will run the work cycle on a master TE. Will do nothing on any other farm component. - * - * @return true if any work was done, false otherwise. - */ - boolean doWork(); - - boolean hasLiquid(FluidStack liquid); - - void removeLiquid(FluidStack liquid); - - boolean hasResources(ItemStack[] resources); - - void removeResources(ItemStack[] resources); - - /** - * Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem. Will remove the appropriate germling from the farm's inventory. It's up to the - * logic to only call this on a valid location. - * - * @param farmable - * @param world - * @param x - * @param y - * @param z - * @return true if planting was successful, false otherwise. - */ - boolean plantGermling(IFarmable farmable, World world, int x, int y, int z); - - /* INTERACTION WITH HATCHES */ - boolean acceptsAsGermling(ItemStack itemstack); - - boolean acceptsAsResource(ItemStack itemstack); - - boolean acceptsAsFertilizer(ItemStack itemstack); - - /* LOGIC */ - /** - * Set a farm logic for the given direction. UP/DOWN/UNKNOWN are invalid! - * - * @param direction - * @param logic - */ - void setFarmLogic(ForgeDirection direction, IFarmLogic logic); - - /** - * Reset the farm logic for the given direction to default. UP/DOWN/UNKNOWN are invalid! - * - * @param direction - */ - void resetFarmLogic(ForgeDirection direction); -} diff --git a/api/ForestryAPI/forestry/api/farming/IFarmInterface.java b/api/ForestryAPI/forestry/api/farming/IFarmInterface.java deleted file mode 100755 index 0896874..0000000 --- a/api/ForestryAPI/forestry/api/farming/IFarmInterface.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import forestry.api.core.IStructureLogic; - -public interface IFarmInterface { - - /** - * Creates {@link IStructureLogic} for use in farm components. - * - * @param structure - * {@link IFarmComponent} to create the logic for. - * @return {@link IStructureLogic} for use in farm components - */ - IStructureLogic createFarmStructureLogic(IFarmComponent structure); -} diff --git a/api/ForestryAPI/forestry/api/farming/IFarmListener.java b/api/ForestryAPI/forestry/api/farming/IFarmListener.java deleted file mode 100755 index 461525f..0000000 --- a/api/ForestryAPI/forestry/api/farming/IFarmListener.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IFarmListener { - - /** - * Called before a crop is harvested. - * - * @param crop - * ICrop about to be harvested. - * @return true to cancel further processing of this crop. - */ - boolean beforeCropHarvest(ICrop crop); - - /** - * Called after a crop has been harvested, but before harvested items are stowed in the farms inventory. - * - * @param harvested - * Collection of harvested stacks. May be manipulated. Ensure removal of stacks with 0 or less items! - * @param crop - * Harvested {@link ICrop} - */ - void afterCropHarvest(Collection harvested, ICrop crop); - - /** - * Called after the stack of collected items has been returned by the farm logic, but before it is added to the farm's pending queue. - * - * @param collected - * Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less items! - * @param logic - */ - void hasCollected(Collection collected, IFarmLogic logic); - - /** - * Called after farmland has successfully been cultivated by a farm logic. - * - * @param logic - * @param x - * @param y - * @param z - * @param direction - * @param extent - */ - void hasCultivated(IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent); - - /** - * Called after the stack of harvested crops has been returned by the farm logic, but before it is added to the farm's pending queue. - * - * @param harvested - * @param logic - * @param x - * @param y - * @param z - * @param direction - * @param extent - */ - void hasScheduledHarvest(Collection harvested, IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent); - - /** - * Can be used to cancel farm task on a per side/{@link IFarmLogic} basis. - * - * @param logic - * @param direction - * @return true to skip any work action on the given logic and direction for this work cycle. - */ - boolean cancelTask(IFarmLogic logic, ForgeDirection direction); -} diff --git a/api/ForestryAPI/forestry/api/farming/IFarmLogic.java b/api/ForestryAPI/forestry/api/farming/IFarmLogic.java deleted file mode 100755 index 1c2482c..0000000 --- a/api/ForestryAPI/forestry/api/farming/IFarmLogic.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IFarmLogic { - - int getFertilizerConsumption(); - - int getWaterConsumption(float hydrationModifier); - - boolean isAcceptedResource(ItemStack itemstack); - - boolean isAcceptedGermling(ItemStack itemstack); - - Collection collect(); - - boolean cultivate(int x, int y, int z, ForgeDirection direction, int extent); - - Collection harvest(int x, int y, int z, ForgeDirection direction, int extent); - - IFarmLogic setManual(boolean manual); - - @SideOnly(Side.CLIENT) - IIcon getIcon(); - - ResourceLocation getSpriteSheet(); - - String getName(); -} diff --git a/api/ForestryAPI/forestry/api/farming/IFarmable.java b/api/ForestryAPI/forestry/api/farming/IFarmable.java deleted file mode 100755 index 440ae59..0000000 --- a/api/ForestryAPI/forestry/api/farming/IFarmable.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * IGermling describes a crop or other harvestable object and can be used to inspect item stacks and blocks for matches. - */ -public interface IFarmable { - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop. - */ - boolean isSaplingAt(World world, int x, int y, int z); - - /** - * @param world - * @param x - * @param y - * @param z - * @return {@link ICrop} if the block at the given location is a harvestable and mature crop, null otherwise. - */ - ICrop getCropAt(World world, int x, int y, int z); - - /** - * @param itemstack - * @return true if the item is a valid germling (plantable sapling, seed, etc.) for this type. - */ - boolean isGermling(ItemStack itemstack); - - /** - * @param itemstack - * @return true if the item is something that can drop from this type without actually being harvested as a crop. (Apples or sapling from decaying leaves.) - */ - boolean isWindfall(ItemStack itemstack); - - /** - * Plants a sapling by manipulating the world. The {@link IFarmLogic} should have verified the given location as valid. Called by the {@link IFarmHousing} - * which handles resources. - * - * @param germling - * @param world - * @param x - * @param y - * @param z - * @return true on success, false otherwise. - */ - boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, int x, int y, int z); - -} diff --git a/api/ForestryAPI/forestry/api/farming/package-info.java b/api/ForestryAPI/forestry/api/farming/package-info.java deleted file mode 100755 index 4460886..0000000 --- a/api/ForestryAPI/forestry/api/farming/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|farming") -package forestry.api.farming; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/food/BeverageManager.java b/api/ForestryAPI/forestry/api/food/BeverageManager.java deleted file mode 100755 index 2b0143a..0000000 --- a/api/ForestryAPI/forestry/api/food/BeverageManager.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -public class BeverageManager { - public static IBeverageEffect[] effectList = new IBeverageEffect[128]; - - public static IInfuserManager infuserManager; - public static IIngredientManager ingredientManager; -} diff --git a/api/ForestryAPI/forestry/api/food/IBeverageEffect.java b/api/ForestryAPI/forestry/api/food/IBeverageEffect.java deleted file mode 100755 index 6a78741..0000000 --- a/api/ForestryAPI/forestry/api/food/IBeverageEffect.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -public interface IBeverageEffect { - int getId(); - - void doEffect(World world, EntityPlayer player); - - String getDescription(); -} diff --git a/api/ForestryAPI/forestry/api/food/IInfuserManager.java b/api/ForestryAPI/forestry/api/food/IInfuserManager.java deleted file mode 100755 index d778ffa..0000000 --- a/api/ForestryAPI/forestry/api/food/IInfuserManager.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -import net.minecraft.item.ItemStack; - -public interface IInfuserManager { - - void addMixture(int meta, ItemStack ingredient, IBeverageEffect effect); - - void addMixture(int meta, ItemStack[] ingredients, IBeverageEffect effect); - - ItemStack getSeasoned(ItemStack base, ItemStack[] ingredients); - - boolean hasMixtures(ItemStack[] ingredients); - - boolean isIngredient(ItemStack itemstack); - - ItemStack[] getRequired(ItemStack[] ingredients); - -} diff --git a/api/ForestryAPI/forestry/api/food/IIngredientManager.java b/api/ForestryAPI/forestry/api/food/IIngredientManager.java deleted file mode 100755 index fab0e01..0000000 --- a/api/ForestryAPI/forestry/api/food/IIngredientManager.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -import net.minecraft.item.ItemStack; - -public interface IIngredientManager { - - String getDescription(ItemStack itemstack); - - void addIngredient(ItemStack ingredient, String description); - -} diff --git a/api/ForestryAPI/forestry/api/food/package-info.java b/api/ForestryAPI/forestry/api/food/package-info.java deleted file mode 100755 index 372c301..0000000 --- a/api/ForestryAPI/forestry/api/food/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|food") -package forestry.api.food; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/fuels/EngineBronzeFuel.java b/api/ForestryAPI/forestry/api/fuels/EngineBronzeFuel.java deleted file mode 100755 index cbab0ca..0000000 --- a/api/ForestryAPI/forestry/api/fuels/EngineBronzeFuel.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraftforge.fluids.Fluid; - -public class EngineBronzeFuel { - /** - * Item that is valid fuel for a biogas engine. - */ - public final Fluid liquid; - /** - * Power produced by this fuel per work cycle of the engine. - */ - public final int powerPerCycle; - /** - * How many work cycles a single "stack" of this type lasts. - */ - public final int burnDuration; - /** - * By how much the normal heat dissipation rate of 1 is multiplied when using this fuel type. - */ - public final int dissipationMultiplier; - - public EngineBronzeFuel(Fluid liquid, int powerPerCycle, int burnDuration, int dissipationMultiplier) { - this.liquid = liquid; - this.powerPerCycle = powerPerCycle; - this.burnDuration = burnDuration; - this.dissipationMultiplier = dissipationMultiplier; - } -} diff --git a/api/ForestryAPI/forestry/api/fuels/EngineCopperFuel.java b/api/ForestryAPI/forestry/api/fuels/EngineCopperFuel.java deleted file mode 100755 index af568dd..0000000 --- a/api/ForestryAPI/forestry/api/fuels/EngineCopperFuel.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class EngineCopperFuel { - - /** - * Item that is valid fuel for a peat-fired engine. - */ - public final ItemStack fuel; - /** - * Power produced by this fuel per work cycle. - */ - public final int powerPerCycle; - /** - * Amount of work cycles this item lasts before being consumed. - */ - public final int burnDuration; - - public EngineCopperFuel(ItemStack fuel, int powerPerCycle, int burnDuration) { - this.fuel = fuel; - this.powerPerCycle = powerPerCycle; - this.burnDuration = burnDuration; - } - -} diff --git a/api/ForestryAPI/forestry/api/fuels/FermenterFuel.java b/api/ForestryAPI/forestry/api/fuels/FermenterFuel.java deleted file mode 100755 index 32989a8..0000000 --- a/api/ForestryAPI/forestry/api/fuels/FermenterFuel.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class FermenterFuel { - /** - * Item that is a valid fuel for the fermenter (i.e. fertilizer). - */ - public final ItemStack item; - /** - * How much is fermeted per work cycle, i.e. how much biomass is produced per cycle. - */ - public final int fermentPerCycle; - /** - * Amount of work cycles a single item of this fuel lasts before expiring. - */ - public final int burnDuration; - - public FermenterFuel(ItemStack item, int fermentPerCycle, int burnDuration) { - this.item = item; - this.fermentPerCycle = fermentPerCycle; - this.burnDuration = burnDuration; - } -} diff --git a/api/ForestryAPI/forestry/api/fuels/FuelManager.java b/api/ForestryAPI/forestry/api/fuels/FuelManager.java deleted file mode 100755 index f53d6fb..0000000 --- a/api/ForestryAPI/forestry/api/fuels/FuelManager.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; - -import java.util.HashMap; - - -public class FuelManager { - /** - * Add new fuels for the fermenter here (i.e. fertilizer). - */ - public static HashMap fermenterFuel; - /** - * Add new resources for the moistener here (i.e. wheat) - */ - public static HashMap moistenerResource; - /** - * Add new substrates for the rainmaker here - */ - public static HashMap rainSubstrate; - /** - * Add new fuels for EngineBronze (= biogas engine) here - */ - public static HashMap bronzeEngineFuel; - /** - * Add new fuels for EngineCopper (= peat-fired engine) here - */ - public static HashMap copperEngineFuel; - /** - * Add new fuels for Generator here - */ - public static HashMap generatorFuel; - -} diff --git a/api/ForestryAPI/forestry/api/fuels/GeneratorFuel.java b/api/ForestryAPI/forestry/api/fuels/GeneratorFuel.java deleted file mode 100755 index 16e2ee4..0000000 --- a/api/ForestryAPI/forestry/api/fuels/GeneratorFuel.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraftforge.fluids.FluidStack; - -public class GeneratorFuel { - - /** - * LiquidStack representing the fuel type and amount consumed per triggered cycle. - */ - public final FluidStack fuelConsumed; - /** - * EU emitted per tick while this fuel is being consumed in the generator (i.e. biofuel = 32, biomass = 8). - */ - public final int eu; - /** - * Rate at which the fuel is consumed. 1 - Every tick 2 - Every second tick 3 - Every third tick etc. - */ - public final int rate; - - public GeneratorFuel(FluidStack fuelConsumed, int eu, int rate) { - this.fuelConsumed = fuelConsumed; - this.eu = eu; - this.rate = rate; - } - -} diff --git a/api/ForestryAPI/forestry/api/fuels/MoistenerFuel.java b/api/ForestryAPI/forestry/api/fuels/MoistenerFuel.java deleted file mode 100755 index 4c4c7a0..0000000 --- a/api/ForestryAPI/forestry/api/fuels/MoistenerFuel.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class MoistenerFuel { - /** - * The item to use - */ - public final ItemStack item; - /** - * The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch) - */ - public final ItemStack product; - /** - * How much this item contributes to the final product of the moistener (i.e. mycelium) - */ - public final int moistenerValue; - /** - * What stage this product represents. Resources with lower stage value will be consumed first. - */ - public final int stage; - - public MoistenerFuel(ItemStack item, ItemStack product, int stage, int moistenerValue) { - this.item = item; - this.product = product; - this.stage = stage; - this.moistenerValue = moistenerValue; - } -} diff --git a/api/ForestryAPI/forestry/api/fuels/RainSubstrate.java b/api/ForestryAPI/forestry/api/fuels/RainSubstrate.java deleted file mode 100755 index ab0deb5..0000000 --- a/api/ForestryAPI/forestry/api/fuels/RainSubstrate.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class RainSubstrate { - /** - * Rain substrate capable of activating the rainmaker. - */ - public ItemStack item; - /** - * Duration of the rain shower triggered by this substrate in Minecraft ticks. - */ - public int duration; - /** - * Speed of activation sequence triggered. - */ - public float speed; - - public boolean reverse; - - public RainSubstrate(ItemStack item, int duration, float speed) { - this(item, duration, speed, false); - } - - public RainSubstrate(ItemStack item, float speed) { - this(item, 0, speed, true); - } - - public RainSubstrate(ItemStack item, int duration, float speed, boolean reverse) { - this.item = item; - this.duration = duration; - this.speed = speed; - this.reverse = reverse; - } -} diff --git a/api/ForestryAPI/forestry/api/fuels/package-info.java b/api/ForestryAPI/forestry/api/fuels/package-info.java deleted file mode 100755 index 748fa22..0000000 --- a/api/ForestryAPI/forestry/api/fuels/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.0.1", owner="ForestryAPI|core", provides="ForestryAPI|fuels") -package forestry.api.fuels; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/genetics/AlleleManager.java b/api/ForestryAPI/forestry/api/genetics/AlleleManager.java deleted file mode 100755 index 8906f3c..0000000 --- a/api/ForestryAPI/forestry/api/genetics/AlleleManager.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.HashMap; - -import net.minecraft.item.ItemStack; - -/** - * Holds a static reference to the {@link IAlleleRegistry}. - */ -public class AlleleManager { - /** - * Main access point for all things related to genetics. See {@link IAlleleRegistry} for details. - */ - public static IAlleleRegistry alleleRegistry; - /** - * Translates plain leaf blocks into genetic data. Used by bees and butterflies to convert and pollinate foreign leaf blocks. - */ - public static HashMap ersatzSpecimen = new HashMap(); - /** - * Translates plain saplings into genetic data. Used by the treealyzer and the farm to convert foreign saplings. - */ - public static HashMap ersatzSaplings = new HashMap(); - /** - * Queryable instance of an {@link IClimateHelper} for easier implementation. - */ - public static IClimateHelper climateHelper; -} diff --git a/api/ForestryAPI/forestry/api/genetics/EnumTolerance.java b/api/ForestryAPI/forestry/api/genetics/EnumTolerance.java deleted file mode 100755 index 6ff0085..0000000 --- a/api/ForestryAPI/forestry/api/genetics/EnumTolerance.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -public enum EnumTolerance { - NONE, - - BOTH_1, BOTH_2, BOTH_3, BOTH_4, BOTH_5, - - UP_1, UP_2, UP_3, UP_4, UP_5, - - DOWN_1, DOWN_2, DOWN_3, DOWN_4, DOWN_5 -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAllele.java b/api/ForestryAPI/forestry/api/genetics/IAllele.java deleted file mode 100755 index 5274741..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAllele.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * An {@link IIndividual}'s {@link IGenome} is composed of {@link IChromosome}s consisting each of a primary and secondary {@link IAllele}. - * - * {@link IAllele}s hold all information regarding an {@link IIndividual}'s traits, from species to size, temperature tolerances, etc. - * - * Should be extended for different types of alleles. ISpeciesAllele, IBiomeAllele, etc. - * - * @author SirSengir - */ -public interface IAllele { - - /** - * @return A unique string identifier for this allele. - */ - String getUID(); - - /** - * @return true if the allele is dominant, false otherwise. - */ - boolean isDominant(); - - /** - * @return Localized short, human-readable identifier used in tooltips and beealyzer. - */ - String getName(); - - /** - * @return The unlocalized identifier - */ - String getUnlocalizedName(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleArea.java b/api/ForestryAPI/forestry/api/genetics/IAlleleArea.java deleted file mode 100755 index 7277ff0..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleArea.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleArea extends IAllele { - - int[] getValue(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleBoolean.java b/api/ForestryAPI/forestry/api/genetics/IAlleleBoolean.java deleted file mode 100755 index 887da3b..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleBoolean.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleBoolean extends IAllele { - - boolean getValue(); - - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleEffect.java b/api/ForestryAPI/forestry/api/genetics/IAlleleEffect.java deleted file mode 100755 index 7b94e6b..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleEffect.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Basic effect allele. - */ -public interface IAlleleEffect extends IAllele { - /** - * @return true if this effect can combine with the effect on other allele (i.e. run before or after). combination can only occur if both effects are - * combinable. - */ - boolean isCombinable(); - - /** - * Returns the passed data storage if it is valid for this effect or a new one if the passed storage object was invalid for this effect. - * - * @param storedData - * @return {@link IEffectData} for the next cycle. - */ - IEffectData validateStorage(IEffectData storedData); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleFloat.java b/api/ForestryAPI/forestry/api/genetics/IAlleleFloat.java deleted file mode 100755 index 6ca2877..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleFloat.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleFloat extends IAllele { - - float getValue(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleFlowers.java b/api/ForestryAPI/forestry/api/genetics/IAlleleFlowers.java deleted file mode 100755 index 0368ca4..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleFlowers.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - - -public interface IAlleleFlowers extends IAllele { - - /** - * @return FlowerProvider - */ - IFlowerProvider getProvider(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleHandler.java b/api/ForestryAPI/forestry/api/genetics/IAlleleHandler.java deleted file mode 100755 index 3d052af..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleHandler.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * @author Alex Binnie - * - * Handler for events that occur in IAlleleRegistry, such as registering alleles, branches etc. Useful for handling plugin specific behavior (i.e. - * creating a list of all bee species etc.) - * - */ -public interface IAlleleHandler { - - /** - * Called when an allele is registered with {@link IAlleleRegistry}. - * - * @param allele - * Allele which was registered. - */ - public void onRegisterAllele(IAllele allele); - - /** - * Called when a classification is registered with {@link IAlleleRegistry}. - * - * @param classification - * Classification which was registered. - */ - public void onRegisterClassification(IClassification classification); - - /** - * Called when a fruit family is registered with {@link IAlleleRegistry}. - * - * @param family - * Fruit family which was registered. - */ - public void onRegisterFruitFamily(IFruitFamily family); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleInteger.java b/api/ForestryAPI/forestry/api/genetics/IAlleleInteger.java deleted file mode 100755 index 6991efe..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleInteger.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing integer values. - */ -public interface IAlleleInteger extends IAllele { - - int getValue(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAllelePlantType.java b/api/ForestryAPI/forestry/api/genetics/IAllelePlantType.java deleted file mode 100755 index 211237f..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAllelePlantType.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.EnumSet; - -import net.minecraftforge.common.EnumPlantType; - -public interface IAllelePlantType extends IAllele { - - public EnumSet getPlantTypes(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleRegistry.java b/api/ForestryAPI/forestry/api/genetics/IAlleleRegistry.java deleted file mode 100755 index 9b0907b..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleRegistry.java +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.Collection; -import java.util.Map; - -import net.minecraft.item.ItemStack; - -import com.mojang.authlib.GameProfile; - -import forestry.api.genetics.IClassification.EnumClassLevel; - -/** - * Manages {@link ISpeciesRoot}, {@link IAllele}s, {@link IFruitFamily}s, {@link IClassification}, the blacklist and allows creation of research notes. - * - * @author SirSengir - */ -public interface IAlleleRegistry { - - /* SPECIES ROOT CLASSES */ - /** - * Register a {@link ISpeciesRoot}. - * @param root {@link ISpeciesRoot} to register. - */ - void registerSpeciesRoot(ISpeciesRoot root); - - /** - * @return Map of all registered {@link ISpeciesRoot}. - */ - Map getSpeciesRoot(); - - /** - * Retrieve the {@link ISpeciesRoot} with the given uid. - * @param uid Unique id for the species class, i.e. "rootBees", "rootTrees", "rootButterflies". - * @return {@link ISpeciesRoot} if it exists, null otherwise. - */ - ISpeciesRoot getSpeciesRoot(String uid); - - /** - * Retrieve a matching {@link ISpeciesRoot} for the given itemstack. - * @param stack An itemstack possibly containing NBT data which can be converted by a species root. - * @return {@link ISpeciesRoot} if found, null otherwise. - */ - ISpeciesRoot getSpeciesRoot(ItemStack stack); - - /** - * Retrieve a matching {@link ISpeciesRoot} for the given {@link IIndividual}-class. - * @param clz Class extending {@link IIndividual}. - * @return {@link ISpeciesRoot} if found, null otherwise. - */ - ISpeciesRoot getSpeciesRoot(Class clz); - - /* INDIVIDUAL */ - /** - * Tests the itemstack for genetic information. - * - * @param stack - * @return true if the itemstack is an individual. - */ - boolean isIndividual(ItemStack stack); - - /** - * Retrieve genetic information from an itemstack. - * - * @param stack - * Stack to retrieve genetic information for. - * @return IIndividual containing genetic information, null if none could be extracted. - */ - IIndividual getIndividual(ItemStack stack); - - /* ALLELES */ - - /** - * @return HashMap of all currently registered alleles. - */ - Map getRegisteredAlleles(); - - /** - * Registers an allele. - * - * @param allele - * IAllele to register. - */ - void registerAllele(IAllele allele); - - /** - * @return HashMap of all registered deprecated alleles and their corresponding replacements - */ - Map getDeprecatedAlleleReplacements(); - - /** - * Registers an old allele UID and the new IAllele to replace instances of it with. - * - * @param deprecatedAlleleUID - * the old allele's UID - * @param replacement - * the IAllele that the deprecated Allele will be replaced with. - */ - void registerDeprecatedAlleleReplacement(String deprecatedAlleleUID, IAllele replacement); - - /** - * Gets an allele - * - * @param uid - * String based unique identifier of the allele to retrieve. - * @return IAllele if found or a replacement is found in the Deprecated Allele map, null otherwise. - */ - IAllele getAllele(String uid); - - /* CLASSIFICATIONS */ - /** - * @return HashMap of all currently registered classifications. - */ - Map getRegisteredClassifications(); - - /** - * Registers a classification. - * - * @param classification - * IClassification to register. - */ - void registerClassification(IClassification classification); - - /** - * Creates and returns a classification. - * - * @param level - * EnumClassLevel of the classification to create. - * @param uid - * String based unique identifier. Implementation will throw an exception if the key is already taken. - * @param scientific - * Binomial for the given classification. - * @return Created {@link IClassification} for easier chaining. - */ - IClassification createAndRegisterClassification(EnumClassLevel level, String uid, String scientific); - - /** - * Gets a classification. - * - * @param uid - * String based unique identifier of the classification to retrieve. - * @return {@link IClassification} if found, null otherwise. - */ - IClassification getClassification(String uid); - - /* FRUIT FAMILIES */ - /** - * Get all registered fruit families. - * - * @return A map of registered fruit families and their UIDs. - */ - Map getRegisteredFruitFamilies(); - - /** - * Registers a new fruit family. - * - * @param family - */ - void registerFruitFamily(IFruitFamily family); - - /** - * Retrieves a fruit family identified by uid. - * - * @param uid - * @return {IFruitFamily} if found, false otherwise. - */ - IFruitFamily getFruitFamily(String uid); - - /* ALLELE HANDLERS */ - /** - * Registers a new IAlleleHandler - * - * @param handler - * IAlleleHandler to register. - */ - void registerAlleleHandler(IAlleleHandler handler); - - /* BLACKLIST */ - /** - * Blacklist an allele identified by its UID from mutation. - * - * @param uid - * UID of the allele to blacklist. - */ - void blacklistAllele(String uid); - - /** - * @return Current blacklisted alleles. - */ - Collection getAlleleBlacklist(); - - /** - * @param uid - * UID of the species to vet. - * @return true if the allele is blacklisted. - */ - boolean isBlacklisted(String uid); - - /* RESEARCH */ - /** - * @param researcher Username of the player who researched this note. - * @param species {@link IAlleleSpecies} to encode on the research note. - * @return An itemstack containing a research note with the given species encoded onto it. - */ - ItemStack getSpeciesNoteStack(GameProfile researcher, IAlleleSpecies species); - - /** - * @param researcher Username of the player who researched this note. - * @param mutation {@link IMutation} to encode on the research note. - * @return An itemstack containing a research note with the given mutation encoded onto it. - */ - ItemStack getMutationNoteStack(GameProfile researcher, IMutation mutation); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleSpecies.java b/api/ForestryAPI/forestry/api/genetics/IAlleleSpecies.java deleted file mode 100755 index 995fdf0..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleSpecies.java +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import com.mojang.authlib.GameProfile; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; -import forestry.api.core.IIconProvider; - -/** - * Basic species allele. - */ -public interface IAlleleSpecies extends IAllele { - - /** - * @return the {@link ISpeciesRoot} associated with this species. - */ - ISpeciesRoot getRoot(); - - /** - * @return Localized short description of this species. (May be null.) - */ - String getDescription(); - - /** - * Binomial name of the species sans genus ("Apis"). Returning "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun - * names or return null. - * - * @return flavour text (may be null) - */ - String getBinomial(); - - /** - * Authority for the binomial name, e.g. "Sengir" on species of base Forestry. - * - * @return flavour text (may be null) - */ - String getAuthority(); - - /** - * @return Branch this species is associated with. - */ - IClassification getBranch(); - - /* RESEARCH */ - /** - * Complexity determines the difficulty researching a species. The values of primary and secondary are - * added together (and rounded) to determine the amount of pairs needed for successful research. - * @return Values between 3 - 11 are useful. - */ - int getComplexity(); - - /** - * @param itemstack - * @return A float signifying the chance for the passed itemstack to yield a research success. - */ - float getResearchSuitability(ItemStack itemstack); - - /** - * @param world - * @param gameProfile - * @param individual - * @param bountyLevel - * @return Array of itemstacks representing the bounty for this research success. - */ - ItemStack[] getResearchBounty(World world, GameProfile gameProfile, IIndividual individual, int bountyLevel); - - /* CLIMATE */ - /** - * @return Preferred temperature - */ - EnumTemperature getTemperature(); - - /** - * @return Preferred humidity - */ - EnumHumidity getHumidity(); - - /* MISC */ - /** - * @return true if the species icon should have a glowing effect. - */ - boolean hasEffect(); - - /** - * @return true if the species should not be displayed in NEI or creative inventory. - */ - boolean isSecret(); - - /** - * @return true to have the species count against the species total. - */ - boolean isCounted(); - - /* APPEARANCE */ - /** - * @param renderPass Render pass to get the colour for. - * @return Colour to use for the render pass. - */ - int getIconColour(int renderPass); - - @SideOnly(Side.CLIENT) - IIconProvider getIconProvider(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IAlleleTolerance.java b/api/ForestryAPI/forestry/api/genetics/IAlleleTolerance.java deleted file mode 100755 index f5ba9e6..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IAlleleTolerance.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleTolerance extends IAllele { - - EnumTolerance getValue(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IBreedingTracker.java b/api/ForestryAPI/forestry/api/genetics/IBreedingTracker.java deleted file mode 100755 index e361448..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IBreedingTracker.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; - -import forestry.api.apiculture.IBeekeepingMode; - -/** - * Keeps track of who bred and/or discovered which species in a world. - * - * @author SirSengir - */ -public interface IBreedingTracker { - - /** - * @return Name of the current {@link IBeekeepingMode}. - */ - String getModeName(); - - /** - * Set the current {@link IBeekeepingMode}. - */ - void setModeName(String name); - - /** - * @return Amount of species discovered. - */ - int getSpeciesBred(); - - /** - * Register the birth of an individual. Will mark it as discovered. - * - * @param individual - */ - void registerBirth(IIndividual individual); - - /** - * Register the pickup of an individual. - * - * @param individual - */ - void registerPickup(IIndividual individual); - - /** - * Marks a species as discovered. Should only be called from registerIndividual normally. - * - * @param species - */ - void registerSpecies(IAlleleSpecies species); - - /** - * Register a successful mutation. Will mark it as discovered. - * - * @param mutation - */ - void registerMutation(IMutation mutation); - - /** - * Queries the tracker for discovered species. - * - * @param mutation - * Mutation to query for. - * @return true if the mutation has been discovered. - */ - boolean isDiscovered(IMutation mutation); - - /** - * Queries the tracker for discovered species. - * - * @param species - * Species to check. - * @return true if the species has been bred. - */ - boolean isDiscovered(IAlleleSpecies species); - - /** - * Synchronizes the tracker to the client side. Should be called before opening any gui needing that information. - * - * @param player - */ - void synchToPlayer(EntityPlayer player); - - /* LOADING & SAVING */ - void decodeFromNBT(NBTTagCompound nbttagcompound); - - void encodeToNBT(NBTTagCompound nbttagcompound); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IChromosome.java b/api/ForestryAPI/forestry/api/genetics/IChromosome.java deleted file mode 100755 index d501efb..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IChromosome.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import forestry.api.core.INBTTagable; - -/** - * Implementations other than Forestry's default one are not supported! - * - * @author SirSengir - */ -public interface IChromosome extends INBTTagable { - - IAllele getPrimaryAllele(); - - IAllele getSecondaryAllele(); - - IAllele getInactiveAllele(); - - IAllele getActiveAllele(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IChromosomeType.java b/api/ForestryAPI/forestry/api/genetics/IChromosomeType.java deleted file mode 100755 index a3b1f8e..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IChromosomeType.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/* - * Interface to be implemented by the enums representing the various chromosomes - */ -public interface IChromosomeType { - - /* - * Get class which all alleles on this chromosome must interface - */ - Class getAlleleClass(); - - String getName(); - - ISpeciesRoot getSpeciesRoot(); - - int ordinal(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IClassification.java b/api/ForestryAPI/forestry/api/genetics/IClassification.java deleted file mode 100755 index f365b91..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IClassification.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Biological classifications from domain down to genus. - * - * Used by the *alyzers to display hierarchies. - */ -public interface IClassification { - - public enum EnumClassLevel { - - DOMAIN(0x777fff, true), KINGDOM(0x77c3ff), PHYLUM(0x77ffb6, true), DIVISION(0x77ffb6, true), CLASS(0x7bff77), ORDER(0xbeff77), FAMILY(0xfffd77), - SUBFAMILY(0xfffd77), TRIBE(0xfffd77), GENUS(0xffba77); - - private int colour; - private boolean isDroppable; - - private EnumClassLevel(int colour) { - this(colour, false); - } - - private EnumClassLevel(int colour, boolean isDroppable) { - this.colour = colour; - this.isDroppable = isDroppable; - } - - /** - * @return Colour to use for displaying this classification. - */ - public int getColour() { - return colour; - } - - /** - * @return Indicates whether display of this classification level can be ommitted in case of space constraints. - */ - public boolean isDroppable() { - return isDroppable; - } - } - - /** - * @return Level inside the full hierarchy this particular classification is located at. - */ - EnumClassLevel getLevel(); - - /** - * @return Unique String identifier. - */ - String getUID(); - - /** - * @return Localized branch name for user display. - */ - String getName(); - - /** - * A branch approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis" - * - * @return flavour text (may be null) - */ - String getScientific(); - - /** - * @return Localized description of this branch. (May be null.) - */ - String getDescription(); - - /** - * @return Member groups of this one. - */ - IClassification[] getMemberGroups(); - - /** - * Adds subgroups to this group. - */ - void addMemberGroup(IClassification group); - - /** - * @return Member species of this group. - */ - IAlleleSpecies[] getMemberSpecies(); - - /** - * Used by the allele registry to populate internal collection of branch members on the fly. - * - * @param species - */ - void addMemberSpecies(IAlleleSpecies species); - - /** - * @return Parent classification, null if this is root. - */ - IClassification getParent(); - - /** - * Only used internally by the AlleleRegistry if this classification has been added to another one. - * - * @param parent - */ - void setParent(IClassification parent); -} diff --git a/api/ForestryAPI/forestry/api/genetics/IClimateHelper.java b/api/ForestryAPI/forestry/api/genetics/IClimateHelper.java deleted file mode 100644 index 4814604..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IClimateHelper.java +++ /dev/null @@ -1,53 +0,0 @@ -package forestry.api.genetics; - -import java.util.Collection; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; - -public interface IClimateHelper { - /** - * Determines whether the given temperature and humidity are within the given constraints. - * @param temperature The temperature to test. - * @param humidity The humidity to test. - * @param baseTemp Base temperature for the test. - * @param tolTemp Temperature tolerance to apply. - * @param baseHumid Base humidity for the test. - * @param tolHumid Humidity tolerance to apply. - * @return true if both temperature and humidity fit the given constraints. - */ - boolean isWithinLimits(EnumTemperature temperature, EnumHumidity humidity, - EnumTemperature baseTemp, EnumTolerance tolTemp, - EnumHumidity baseHumid, EnumTolerance tolHumid); - - boolean isWithinLimits(EnumTemperature temperature, EnumTemperature baseTemp, EnumTolerance tolTemp); - boolean isWithinLimits(EnumHumidity humidity, EnumHumidity baseHumid, EnumTolerance tolHumid); - - /** - * Gets a collection of humidities which fit the given parameters. - * @param prefered Base humidity from which to measure. - * @param tolerance Tolerance to apply to the base humidity. - * @return A collection of humidities which fall within the given parameters. - */ - Collection getToleratedHumidity(EnumHumidity prefered, EnumTolerance tolerance); - /** - * Gets a collection of temperatures which fit the given parameters. - * @param prefered Base temperature from which to measure. - * @param tolerance Tolerance to apply to the base temperatures. - * @return A collection of temperatures which fall within the given parameters. - */ - Collection getToleratedTemperature(EnumTemperature prefered, EnumTolerance tolerance); - - /** - * Gets a localized, human readable string for the given temperature. - * @param temperature Temperature to generate the string for. - * @return A localized, human readable string for the given temperature. - */ - String toDisplay(EnumTemperature temperature); - /** - * Gets a localized, human readable string for the given humidity. - * @param humidity Humidity to generate the string for. - * @return A localized, human readable string for the given humidity. - */ - String toDisplay(EnumHumidity humidity); -} \ No newline at end of file diff --git a/api/ForestryAPI/forestry/api/genetics/IEffectData.java b/api/ForestryAPI/forestry/api/genetics/IEffectData.java deleted file mode 100755 index 909ab78..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IEffectData.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import forestry.api.core.INBTTagable; - -/** - * Container to hold some temporary data for bee, tree and butterfly effects. - * - * @author SirSengir - */ -public interface IEffectData extends INBTTagable { - void setInteger(int index, int val); - - void setFloat(int index, float val); - - void setBoolean(int index, boolean val); - - int getInteger(int index); - - float getFloat(int index); - - boolean getBoolean(int index); -} diff --git a/api/ForestryAPI/forestry/api/genetics/IFlower.java b/api/ForestryAPI/forestry/api/genetics/IFlower.java deleted file mode 100644 index b5e3e4f..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IFlower.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.block.Block; - -public interface IFlower extends Comparable { - - Block getBlock(); - int getMeta(); - - double getWeight(); - void setWeight(double weight); - - boolean isPlantable(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IFlowerGrowthRule.java b/api/ForestryAPI/forestry/api/genetics/IFlowerGrowthRule.java deleted file mode 100644 index 5523739..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IFlowerGrowthRule.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.world.World; - -/** - * Basic condition for flower growing - */ -public interface IFlowerGrowthRule { - boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z); -} diff --git a/api/ForestryAPI/forestry/api/genetics/IFlowerProvider.java b/api/ForestryAPI/forestry/api/genetics/IFlowerProvider.java deleted file mode 100755 index 9849da0..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IFlowerProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IFlowerProvider { - /** - * @return True if the block at the passed coordinates is a valid flower for the species. - */ - boolean isAcceptedFlower(World world, IIndividual individual, int x, int y, int z); - - boolean isAcceptedPollinatable(World world, IPollinatable pollinatable); - - /** - * @return True if a flower was planted. - */ - boolean growFlower(World world, IIndividual individual, int x, int y, int z); - - /** - * @return Short, human-readable identifier used in the beealyzer. - */ - String getDescription(); - - /** - * Allows the flower provider to affect the produce at the given location. - * - * @return Array of itemstacks being the (modified or unmodified) produce. - */ - ItemStack[] affectProducts(World world, IIndividual individual, int x, int y, int z, ItemStack[] products); - - /** - * @return List of valid flowers for the flower provider. The first in the array is for use as an icon. - * Returns an empty list if the flower provider does not have any valid flowers. - */ - List getFlowers(); -} diff --git a/api/ForestryAPI/forestry/api/genetics/IFlowerRegistry.java b/api/ForestryAPI/forestry/api/genetics/IFlowerRegistry.java deleted file mode 100644 index b4c30fb..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IFlowerRegistry.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.world.World; - -public interface IFlowerRegistry { - - List getAcceptableFlowers(String flowerType); - - boolean growFlower(String flowerType, World world, IIndividual individual, int x, int y, int z); - - boolean isAcceptedFlower(String flowerType, World world, IIndividual individual, int x, int y, int z); - - /** - * Registers a non-plantable flower, but bees accept them. - * - * @param flowerTypes See {@link forestry.api.apiculture.FlowerManager}.FlowerTypeXXX - */ - void registerAcceptableFlower(Block flowerBlock, int flowerMeta, String... flowerTypes); - - void registerGrowthRule(IFlowerGrowthRule rule, String... flowerTypes); - - /** - * Registers a plantable flower. - * The distribution is based on its own weight and the total number of plants for this flowerType. - * - * @param weight Weight for the Flower (Vanilla = 1.0, Modded flowers < 1.0) - * @param flowerTypes See {@link forestry.api.apiculture.FlowerManager}.FlowerTypeXXX - */ - void registerPlantableFlower(Block flowerBlock, int flowerMeta, double weight, String... flowerTypes); - - IFlower getRandomPlantableFlower(String flowerType, Random rand); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IFruitBearer.java b/api/ForestryAPI/forestry/api/genetics/IFruitBearer.java deleted file mode 100755 index 5316f9e..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IFruitBearer.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; - -/** - * Can be implemented by tile entities which can bear fruit. - * - * @author SirSengir - */ -public interface IFruitBearer { - - /** - * @return true if the actual tile can bear fruits. - */ - boolean hasFruit(); - - /** - * @return Family of the potential fruits on this tile. - */ - IFruitFamily getFruitFamily(); - - /** - * Picks the fruits of this tile, resetting it to unripe fruits. - * - * @param tool - * Tool used in picking the fruits. May be null. - * @return Picked fruits. - */ - Collection pickFruit(ItemStack tool); - - /** - * @return float indicating the ripeness of the fruit with >= 1.0f indicating full ripeness. - */ - float getRipeness(); - - /** - * Increases the ripeness of the fruit. - * - * @param add - * Float to add to the ripeness. Will truncate to valid values. - */ - void addRipeness(float add); -} diff --git a/api/ForestryAPI/forestry/api/genetics/IFruitFamily.java b/api/ForestryAPI/forestry/api/genetics/IFruitFamily.java deleted file mode 100755 index d48a4d8..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IFruitFamily.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -public interface IFruitFamily { - - /** - * @return Unique String identifier. - */ - String getUID(); - - /** - * @return Localized family name for user display. - */ - String getName(); - - /** - * A scientific-y name for this fruit family - * - * @return flavour text (may be null) - */ - String getScientific(); - - /** - * @return Localized description of this fruit family. (May be null.) - */ - String getDescription(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IGenome.java b/api/ForestryAPI/forestry/api/genetics/IGenome.java deleted file mode 100755 index 0126164..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IGenome.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import forestry.api.core.INBTTagable; - -/** - * Holds the {@link IChromosome}s which comprise the traits of a given individual. - * - * Only the default implementation is supported. - */ -public interface IGenome extends INBTTagable { - - IAlleleSpecies getPrimary(); - - IAlleleSpecies getSecondary(); - - IChromosome[] getChromosomes(); - - /** - * @deprecated since Forestry 3.3. Use IChromosomeType version - */ - @Deprecated - IAllele getActiveAllele(int chromosome); - IAllele getActiveAllele(IChromosomeType chromosomeType); - - /** - * @deprecated since Forestry 3.3. Use IChromosomeType version - */ - @Deprecated - IAllele getInactiveAllele(int chromosome); - IAllele getInactiveAllele(IChromosomeType chromosomeType); - - boolean isGeneticEqual(IGenome other); - - ISpeciesRoot getSpeciesRoot(); -} diff --git a/api/ForestryAPI/forestry/api/genetics/IHousing.java b/api/ForestryAPI/forestry/api/genetics/IHousing.java deleted file mode 100755 index 0d83ee3..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IHousing.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import com.mojang.authlib.GameProfile; -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; -import forestry.api.core.IErrorState; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; - -/** - * Any housing, hatchery or nest which is a fixed location in the world. - */ -public interface IHousing { - - /** - * @return String containing the login of this housing's owner. - */ - GameProfile getOwnerName(); - - World getWorld(); - - int getXCoord(); - - int getYCoord(); - - int getZCoord(); - - /** - * @deprecated since 3.2. Use getBiome(). - */ - @Deprecated - int getBiomeId(); - BiomeGenBase getBiome(); - - EnumTemperature getTemperature(); - - EnumHumidity getHumidity(); - - /** - * @deprecated since Forestry 3.2.0. Use EnumErrorCode version instead. - */ - @Deprecated - void setErrorState(int state); - void setErrorState(IErrorState state); - - /** - * @deprecated since Forestry 3.2.0. Use getErrorState instead. - */ - @Deprecated - int getErrorOrdinal(); - IErrorState getErrorState(); - - /** - * Adds products to the housing's inventory. - * - * @param product - * ItemStack with the product to add. - * @param all - * if true, success requires that all products are added - * @return Boolean indicating success or failure. - */ - boolean addProduct(ItemStack product, boolean all); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IIndividual.java b/api/ForestryAPI/forestry/api/genetics/IIndividual.java deleted file mode 100755 index dc94a5d..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IIndividual.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.List; - -import forestry.api.core.INBTTagable; - -/** - * An actual individual with genetic information. - * - * Only the default implementation is supported. - */ -public interface IIndividual extends INBTTagable { - - String getIdent(); - - String getDisplayName(); - - void addTooltip(List list); - - /** - * Call to mark the IIndividual as analyzed. - * @return true if the IIndividual has not been analyzed previously. - */ - boolean analyze(); - - boolean isAnalyzed(); - - boolean hasEffect(); - - boolean isSecret(); - - IGenome getGenome(); - - /** - * Check whether the genetic makeup of two IIndividuals is identical. Ignores additional data like generations, irregular mating, etc.. - * @param other - * @return true if the given other IIndividual has the amount of chromosomes and their alleles are identical. - */ - boolean isGeneticEqual(IIndividual other); - - /** - * @return A deep copy of this individual. - */ - IIndividual copy(); - - /** - * @param chromosomeOrdinal Ordinal of the chromosome to check. - * @return true if both primary and secondary allele on the given chromosome match. - * @deprecated since Forestry 3.3. Use the IChromosomeType version. - */ - @Deprecated - boolean isPureBred(int chromosomeOrdinal); - boolean isPureBred(IChromosomeType chromosomeType); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IIndividualLiving.java b/api/ForestryAPI/forestry/api/genetics/IIndividualLiving.java deleted file mode 100755 index 67ce0a9..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IIndividualLiving.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.world.World; - -public interface IIndividualLiving extends IIndividual { - - /** - * @return Genetic information of the mate, null if unmated. - */ - IGenome getMate(); - - /** - * @return Current health of the individual. - */ - int getHealth(); - - /** - * @return Maximum health of the individual. - */ - int getMaxHealth(); - - /** - * Age the individual. - * @param world - * @param ageModifier - */ - void age(World world, float ageModifier); - - /** - * Mate with the given individual. - * @param individual the {@link IIndividual} to mate this one with. - */ - void mate(IIndividual individual); - - /** - * @return true if the individual is among the living. - */ - boolean isAlive(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/ILegacyHandler.java b/api/ForestryAPI/forestry/api/genetics/ILegacyHandler.java deleted file mode 100755 index 24938e4..0000000 --- a/api/ForestryAPI/forestry/api/genetics/ILegacyHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * AlleleManager.alleleRegistry can be cast to this type. - */ -public interface ILegacyHandler { - void registerLegacyMapping(int id, String uid); - - IAllele getFromLegacyMap(int id); -} diff --git a/api/ForestryAPI/forestry/api/genetics/IMutation.java b/api/ForestryAPI/forestry/api/genetics/IMutation.java deleted file mode 100755 index 8c15ca5..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IMutation.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.Collection; - -/** - * Individuals can be seeded either as hive drops or as mutation results. - * - * {@link IAlleleRegistry} manages these. - * - * @author SirSengir - */ -public interface IMutation { - - /** - * @return {@link ISpeciesRoot} this mutation is associated with. - */ - ISpeciesRoot getRoot(); - - /** - * @return first of the alleles implementing IAlleleSpecies required for this mutation. - */ - IAllele getAllele0(); - - /** - * @return second of the alleles implementing IAlleleSpecies required for this mutation. - */ - IAllele getAllele1(); - - /** - * @return Array of {@link IAllele} representing the full default genome of the mutated side. - * - * Make sure to return a proper array for the species class. Returning an allele of the wrong type will cause cast errors on runtime. - */ - IAllele[] getTemplate(); - - /** - * @return Unmodified base chance for mutation to fire. - */ - float getBaseChance(); - - /** - * @return Collection of localized, human-readable strings describing special mutation conditions, if any. - */ - Collection getSpecialConditions(); - - /** - * @param allele - * @return true if the passed allele is one of the alleles participating in this mutation. - */ - boolean isPartner(IAllele allele); - - /** - * @param allele - * @return the other allele which was not passed as argument. - */ - IAllele getPartner(IAllele allele); - - /** - * @return true if the mutation should not be displayed in the beealyzer. - */ - boolean isSecret(); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/IPollinatable.java b/api/ForestryAPI/forestry/api/genetics/IPollinatable.java deleted file mode 100755 index 5b0694d..0000000 --- a/api/ForestryAPI/forestry/api/genetics/IPollinatable.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.EnumSet; - -import net.minecraftforge.common.EnumPlantType; - -/** - * Can be implemented by tile entities, if they wish to be pollinatable. - * - * @author SirSengir - */ -public interface IPollinatable { - - /** - * @return plant types this pollinatable is classified as. (Can be used by bees to determine whether to interact or not. - */ - EnumSet getPlantType(); - - /** - * @return IIndividual containing the genetic information of this IPollinatable - */ - IIndividual getPollen(); - - /** - * Checks whether this {@link IPollinatable} can mate with the given pollen. - * - * Must be the one to check genetic equivalency. - * - * @param pollen - * IIndividual representing the pollen. - * @return true if mating is possible, false otherwise. - */ - boolean canMateWith(IIndividual pollen); - - /** - * Pollinates this entity. - * - * @param pollen - * IIndividual representing the pollen. - */ - void mateWith(IIndividual pollen); - -} diff --git a/api/ForestryAPI/forestry/api/genetics/ISpeciesRoot.java b/api/ForestryAPI/forestry/api/genetics/ISpeciesRoot.java deleted file mode 100755 index 556c866..0000000 --- a/api/ForestryAPI/forestry/api/genetics/ISpeciesRoot.java +++ /dev/null @@ -1,170 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; -import java.util.Random; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -/** - * Describes a class of species (i.e. bees, trees, butterflies), provides helper functions and access to common functionality. - */ -public interface ISpeciesRoot { - - /** - * @return A unique identifier for the species class. Should consist of "root" + a common name for the species class in camel-case, i.e. "rootBees", "rootTrees", "rootButterflies". - */ - String getUID(); - - /** - * @return Class of the sub-interface inheriting from {@link IIndividual}. - */ - Class getMemberClass(); - - /** - * @return Integer denoting the number of (counted) species of this type in the world. - */ - int getSpeciesCount(); - - /** - * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class. - * @param stack itemstack to check. - * @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise. - */ - boolean isMember(ItemStack stack); - - /** - * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class and matches the given type. - * @param stack itemstack to check. - * @param type Integer denoting the type needed to match. (i.e. butterfly vs. butterfly serum; bee queens, princesses, drones; etc.) - * @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise. - */ - boolean isMember(ItemStack stack, int type); - - /** - * Used to check whether the given {@link IIndividual} is member of this class. - * @param individual {@link IIndividual} to check. - * @return true if the individual is member of this class, false otherwise. - */ - boolean isMember(IIndividual individual); - - IIndividual getMember(ItemStack stack); - - IIndividual getMember(NBTTagCompound compound); - - ItemStack getMemberStack(IIndividual individual, int type); - - /* BREEDING TRACKER */ - IBreedingTracker getBreedingTracker(World world, GameProfile player); - - /* GENOME MANIPULATION */ - IIndividual templateAsIndividual(IAllele[] template); - - IIndividual templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - IChromosome[] templateAsChromosomes(IAllele[] template); - - IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive); - - IGenome templateAsGenome(IAllele[] template); - - IGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /* TEMPLATES */ - /** - * Registers a bee template using the UID of the first allele as identifier. - * - * @param template - */ - void registerTemplate(IAllele[] template); - - /** - * Registers a bee template using the passed identifier. - * - * @param template - */ - void registerTemplate(String identifier, IAllele[] template); - - /** - * Retrieves a registered template using the passed identifier. - * - * @param identifier - * @return Array of {@link IAllele} representing a genome. - */ - IAllele[] getTemplate(String identifier); - - /** - * @return Default individual template for use when stuff breaks. - */ - IAllele[] getDefaultTemplate(); - - /** - * @param rand Random to use. - * @return A random template from the pool of registered species templates. - */ - IAllele[] getRandomTemplate(Random rand); - - Map getGenomeTemplates(); - ArrayList getIndividualTemplates(); - - /* MUTATIONS */ - /** - * Use to register mutations. - * - * @param mutation - */ - void registerMutation(IMutation mutation); - - /** - * @return All registered mutations. - */ - Collection getMutations(boolean shuffle); - - /** - * @param other Allele to match mutations against. - * @return All registered mutations the given allele is part of. - */ - Collection getCombinations(IAllele other); - - /** - * @param result {@link IAllele} to search for. - * @return All registered mutations the given {@link IAllele} is the result of. - * @deprecated since Forestry 3.3. use IChromosomeType version - */ - @Deprecated - Collection getPaths(IAllele result, int chromosomeOrdinal); - Collection getPaths(IAllele result, IChromosomeType chromosomeType); - - /* RESEARCH */ - /** - * @return List of generic catalysts which should be accepted for research by species of this class. - */ - Map getResearchCatalysts(); - - /** - * Sets an item stack as a valid (generic) research catalyst for this class. - * @param itemstack ItemStack to set as suitable. - * @param suitability Float between 0 and 1 to indicate suitability. - */ - void setResearchSuitability(ItemStack itemstack, float suitability); - - /** - * @return Array of {@link IChromosomeType} which are in this species genome - */ - IChromosomeType[] getKaryotype(); - - /** - * @return {@link IChromosomeType} which is the "key" for this species class, usually the species chromosome. - */ - IChromosomeType getKaryotypeKey(); -} diff --git a/api/ForestryAPI/forestry/api/genetics/package-info.java b/api/ForestryAPI/forestry/api/genetics/package-info.java deleted file mode 100755 index 26b5270..0000000 --- a/api/ForestryAPI/forestry/api/genetics/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.7.0", owner="ForestryAPI|core", provides="ForestryAPI|genetics") -package forestry.api.genetics; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/lepidopterology/EnumButterflyChromosome.java b/api/ForestryAPI/forestry/api/lepidopterology/EnumButterflyChromosome.java deleted file mode 100755 index 9f89f7f..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/EnumButterflyChromosome.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IAlleleArea; -import forestry.api.genetics.IAlleleBoolean; -import forestry.api.genetics.IAlleleFloat; -import forestry.api.genetics.IAlleleFlowers; -import forestry.api.genetics.IAlleleInteger; -import forestry.api.genetics.IAlleleTolerance; -import forestry.api.genetics.IChromosomeType; -import forestry.api.genetics.ISpeciesRoot; - -public enum EnumButterflyChromosome implements IChromosomeType { - /** - * Species of the bee. Alleles here must implement {@link IAlleleButterflySpecies}. - */ - SPECIES(IAlleleButterflySpecies.class), - /** - * Physical size. - */ - SIZE(IAlleleFloat.class), - /** - * Flight speed. - */ - SPEED(IAlleleFloat.class), - /** - * How long the butterfly can last without access to matching pollinatables. - */ - LIFESPAN(IAlleleInteger.class), - /** - * Species with a higher metabolism have a higher appetite and may cause more damage to their environment. - */ - METABOLISM(IAlleleInteger.class), - /** - * Determines likelyhood of caterpillars and length of caterpillar/pupation phase. Also: Number of max caterpillars after mating? - */ - FERTILITY(IAlleleInteger.class), - /** - * Not sure yet. - */ - TEMPERATURE_TOLERANCE(IAlleleTolerance.class), - /** - * Not sure yet. - */ - HUMIDITY_TOLERANCE(IAlleleTolerance.class), - /** - * Only nocturnal butterflys/moths will fly at night. Allows daylight activity for naturally nocturnal species. - */ - NOCTURNAL(IAlleleBoolean.class), - /** - * Only tolerant flyers will fly in the rain. - */ - TOLERANT_FLYER(IAlleleBoolean.class), - /** - * Fire resistance. - */ - FIRE_RESIST(IAlleleBoolean.class), - /** - * Required flowers/leaves. - */ - FLOWER_PROVIDER(IAlleleFlowers.class), - /** - * Extra effect to surroundings. (?) - */ - EFFECT(IAlleleButterflyEffect.class), - /** - * Not used yet - */ - TERRITORY(IAlleleArea.class), - ; - - Class clss; - - EnumButterflyChromosome(Class clss) { - this.clss = clss; - } - - @Override - public Class getAlleleClass() { - return clss; - } - - @Override - public String getName() { - return this.toString().toLowerCase(); - } - - @Override - public ISpeciesRoot getSpeciesRoot() { - return AlleleManager.alleleRegistry.getSpeciesRoot("rootButterflies"); - } -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/EnumFlutterType.java b/api/ForestryAPI/forestry/api/lepidopterology/EnumFlutterType.java deleted file mode 100755 index f197d7b..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/EnumFlutterType.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -public enum EnumFlutterType { - BUTTERFLY, - SERUM, - CATERPILLAR, - NONE; - - public static final EnumFlutterType[] VALUES = values(); -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IAlleleButterflyEffect.java b/api/ForestryAPI/forestry/api/lepidopterology/IAlleleButterflyEffect.java deleted file mode 100755 index 6457dbe..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IAlleleButterflyEffect.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IAlleleEffect; -import forestry.api.genetics.IEffectData; - -public interface IAlleleButterflyEffect extends IAlleleEffect { - - /** - * Used by butterflies to trigger effects in the world. - * @param butterfly {@link IEntityButterfly} - * @param storedData - * @return {@link forestry.api.genetics.IEffectData} for the next cycle. - */ - IEffectData doEffect(IEntityButterfly butterfly, IEffectData storedData); - -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IAlleleButterflySpecies.java b/api/ForestryAPI/forestry/api/lepidopterology/IAlleleButterflySpecies.java deleted file mode 100755 index c153611..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IAlleleButterflySpecies.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import java.util.EnumSet; -import java.util.Map; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.common.BiomeDictionary; - -import forestry.api.genetics.IAlleleSpecies; - -public interface IAlleleButterflySpecies extends IAlleleSpecies { - - /** - * @return the IBeeRoot - */ - IButterflyRoot getRoot(); - - /** - * @return Path of the texture to use for entity rendering. - */ - String getEntityTexture(); - - /** - * Allows butterflies to restrict random spawns beyond the restrictions set by getTemperature() and getHumidity(). - * - * @return EnumSet of biome tags this butterfly species can be spawned in. - */ - EnumSet getSpawnBiomes(); - - /** - * @return true if a prospective spawn biome must not match a biome tag outside of getSpawnBiomes. - */ - boolean strictSpawnMatch(); - - /** - * @return Float between 0 and 1 representing the rarity of the species, will affect spawn rate. - */ - float getRarity(); - - /** - * @return Float representing the distance below which this butterfly will take flight if it detects a player which is not sneaking. - */ - float getFlightDistance(); - - /** - * @return true if this species is only active at night. - */ - boolean isNocturnal(); - - Map getButterflyLoot(); - - Map getCaterpillarLoot(); -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IButterfly.java b/api/ForestryAPI/forestry/api/lepidopterology/IButterfly.java deleted file mode 100755 index c301324..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IButterfly.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import forestry.api.genetics.IIndividualLiving; - -public interface IButterfly extends IIndividualLiving { - - IButterflyGenome getGenome(); - - /** - * @return Genetic information of the mate, null if unmated. - */ - IButterflyGenome getMate(); - - /** - * @return Physical size of the butterfly. - */ - float getSize(); - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the butterfly can naturally spawn at the given location at this time. (Used to auto-spawn butterflies from tree leaves.) - */ - boolean canSpawn(World world, double x, double y, double z); - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the butterfly can take flight at the given location at this time. (Used to auto-spawn butterflies from dropped items.) - */ - boolean canTakeFlight(World world, double x, double y, double z); - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the environment (temperature, humidity) is valid for the butterfly at the given location. - */ - boolean isAcceptedEnvironment(World world, double x, double y, double z); - - IButterfly spawnCaterpillar(IButterflyNursery nursery); - - /** - * @param entity - * @param playerKill Whether or not the butterfly was killed by a player. - * @param lootLevel Loot level according to the weapon used to kill the butterfly. - * @return Array of itemstacks to drop on death of the given entity. - */ - ItemStack[] getLootDrop(IEntityButterfly entity, boolean playerKill, int lootLevel); - - /** - * @param nursery - * @param playerKill Whether or not the nursery was broken by a player. - * @param lootLevel Fortune level. - * @return Array of itemstacks to drop on breaking of the nursery. - */ - ItemStack[] getCaterpillarDrop(IButterflyNursery nursery, boolean playerKill, int lootLevel); - - /** - * Create an exact copy of this butterfly. - */ - IButterfly copy(); - -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyGenome.java b/api/ForestryAPI/forestry/api/lepidopterology/IButterflyGenome.java deleted file mode 100755 index 9381660..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyGenome.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.EnumTolerance; -import forestry.api.genetics.IFlowerProvider; -import forestry.api.genetics.IGenome; - -public interface IButterflyGenome extends IGenome { - - IAlleleButterflySpecies getPrimary(); - - IAlleleButterflySpecies getSecondary(); - - float getSize(); - - int getLifespan(); - - int getMetabolism(); - - int getFertility(); - - float getSpeed(); - - EnumTolerance getToleranceTemp(); - - EnumTolerance getToleranceHumid(); - - boolean getNocturnal(); - - boolean getTolerantFlyer(); - - boolean getFireResist(); - - IFlowerProvider getFlowerProvider(); - - IAlleleButterflyEffect getEffect(); - -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyMutation.java b/api/ForestryAPI/forestry/api/lepidopterology/IButterflyMutation.java deleted file mode 100755 index 027e96e..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyMutation.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IGenome; -import forestry.api.genetics.IMutation; - -public interface IButterflyMutation extends IMutation { - float getChance(IButterflyNursery housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyNursery.java b/api/ForestryAPI/forestry/api/lepidopterology/IButterflyNursery.java deleted file mode 100755 index 56e42f2..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyNursery.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IHousing; -import forestry.api.genetics.IIndividual; - -public interface IButterflyNursery extends IHousing { - - IButterfly getCaterpillar(); - - IIndividual getNanny(); - - void setCaterpillar(IButterfly butterfly); - - boolean canNurse(IButterfly butterfly); - -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyRoot.java b/api/ForestryAPI/forestry/api/lepidopterology/IButterflyRoot.java deleted file mode 100755 index 7028df1..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IButterflyRoot.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.entity.EntityLiving; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.ISpeciesRoot; - -public interface IButterflyRoot extends ISpeciesRoot { - - @Override - boolean isMember(ItemStack stack); - - @Override - IButterfly getMember(ItemStack stack); - - @Override - IButterfly getMember(NBTTagCompound compound); - - @Override - ItemStack getMemberStack(IIndividual butterfly, int type); - - /* GENOME CONVERSION */ - @Override - IButterfly templateAsIndividual(IAllele[] template); - - @Override - IButterfly templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - @Override - IButterflyGenome templateAsGenome(IAllele[] template); - - @Override - IButterflyGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /* BUTTERFLY SPECIFIC */ - ILepidopteristTracker getBreedingTracker(World world, GameProfile player); - - /** - * Spawns the given butterfly in the world. - * @param butterfly - * @return butterfly entity on success, null otherwise. - */ - EntityLiving spawnButterflyInWorld(World world, IButterfly butterfly, double x, double y, double z); - - /** - * @return true if passed item is mated. - */ - boolean isMated(ItemStack stack); - - /* TEMPLATES */ - @Override - ArrayList getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection getMutations(boolean shuffle); - - EnumFlutterType getType(ItemStack stack); - -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/IEntityButterfly.java b/api/ForestryAPI/forestry/api/lepidopterology/IEntityButterfly.java deleted file mode 100755 index 963c721..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/IEntityButterfly.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.passive.IAnimals; - -import forestry.api.genetics.IIndividual; - -public interface IEntityButterfly extends IAnimals { - - void changeExhaustion(int change); - - int getExhaustion(); - - IButterfly getButterfly(); - - /** - * @return The entity as an EntityCreature to save casting. - */ - EntityCreature getEntity(); - - IIndividual getPollen(); - - void setPollen(IIndividual pollen); -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/ILepidopteristTracker.java b/api/ForestryAPI/forestry/api/lepidopterology/ILepidopteristTracker.java deleted file mode 100755 index 7992697..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/ILepidopteristTracker.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IBreedingTracker; - -public interface ILepidopteristTracker extends IBreedingTracker { - - void registerCatch(IButterfly butterfly); - -} diff --git a/api/ForestryAPI/forestry/api/lepidopterology/package-info.java b/api/ForestryAPI/forestry/api/lepidopterology/package-info.java deleted file mode 100755 index 070b432..0000000 --- a/api/ForestryAPI/forestry/api/lepidopterology/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1", owner="ForestryAPI|core", provides="ForestryAPI|lepidopterology") -package forestry.api.lepidopterology; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/mail/EnumAddressee.java b/api/ForestryAPI/forestry/api/mail/EnumAddressee.java deleted file mode 100644 index 28c7384..0000000 --- a/api/ForestryAPI/forestry/api/mail/EnumAddressee.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.Locale; - -public enum EnumAddressee { - PLAYER, TRADER; - - public static EnumAddressee fromString(String ident) { - ident = ident.toLowerCase(Locale.ENGLISH); - for(EnumAddressee addr : values()) { - if(addr.toString().equals(ident)) - return addr; - } - - return null; - } - - public String toString() { - return super.toString().toLowerCase(Locale.ENGLISH); - } -} diff --git a/api/ForestryAPI/forestry/api/mail/EnumPostage.java b/api/ForestryAPI/forestry/api/mail/EnumPostage.java deleted file mode 100755 index 772114f..0000000 --- a/api/ForestryAPI/forestry/api/mail/EnumPostage.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -public enum EnumPostage { - P_0(0), P_1(1), P_2(2), P_5(5), P_10(10), P_20(20), P_50(50), P_100(100), P_200(200); - - private final int value; - - private EnumPostage(int value) { - this.value = value; - } - - public int getValue() { - return this.value; - } -} diff --git a/api/ForestryAPI/forestry/api/mail/ILetter.java b/api/ForestryAPI/forestry/api/mail/ILetter.java deleted file mode 100755 index 42df8ac..0000000 --- a/api/ForestryAPI/forestry/api/mail/ILetter.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.List; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -import forestry.api.core.INBTTagable; - -public interface ILetter extends IInventory, INBTTagable { - - ItemStack[] getPostage(); - - void setProcessed(boolean flag); - - boolean isProcessed(); - - boolean isMailable(); - - void setSender(IMailAddress address); - - IMailAddress getSender(); - - boolean hasRecipient(); - - void setRecipient(IMailAddress address); - - IMailAddress[] getRecipients(); - - String getRecipientString(); - - void setText(String text); - - String getText(); - - void addTooltip(List list); - - boolean isPostPaid(); - - int requiredPostage(); - - void invalidatePostage(); - - ItemStack[] getAttachments(); - - void addAttachment(ItemStack itemstack); - - void addAttachments(ItemStack[] itemstacks); - - int countAttachments(); - - void addStamps(ItemStack stamps); - -} diff --git a/api/ForestryAPI/forestry/api/mail/ILetterHandler.java b/api/ForestryAPI/forestry/api/mail/ILetterHandler.java deleted file mode 100755 index 576a0d7..0000000 --- a/api/ForestryAPI/forestry/api/mail/ILetterHandler.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface ILetterHandler { - IPostalState handleLetter(World world, IMailAddress recipient, ItemStack letterStack, boolean doLodge); -} diff --git a/api/ForestryAPI/forestry/api/mail/IMailAddress.java b/api/ForestryAPI/forestry/api/mail/IMailAddress.java deleted file mode 100644 index 8441b09..0000000 --- a/api/ForestryAPI/forestry/api/mail/IMailAddress.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import com.mojang.authlib.GameProfile; - -import forestry.api.core.INBTTagable; - -public interface IMailAddress extends INBTTagable { - - EnumAddressee getType(); - String getName(); - - boolean isValid(); - - boolean isPlayer(); - boolean isTrader(); - - GameProfile getPlayerProfile(); -} diff --git a/api/ForestryAPI/forestry/api/mail/IPostOffice.java b/api/ForestryAPI/forestry/api/mail/IPostOffice.java deleted file mode 100755 index a8a14ea..0000000 --- a/api/ForestryAPI/forestry/api/mail/IPostOffice.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IPostOffice { - - void collectPostage(ItemStack[] stamps); - - IPostalState lodgeLetter(World world, ItemStack itemstack, boolean doLodge); - - ItemStack getAnyStamp(int max); - - ItemStack getAnyStamp(EnumPostage postage, int max); - - ItemStack getAnyStamp(EnumPostage[] postages, int max); - - void registerTradeStation(ITradeStation trade); - - void deregisterTradeStation(ITradeStation trade); - - Map getActiveTradeStations(World world); -} diff --git a/api/ForestryAPI/forestry/api/mail/IPostRegistry.java b/api/ForestryAPI/forestry/api/mail/IPostRegistry.java deleted file mode 100755 index f20352d..0000000 --- a/api/ForestryAPI/forestry/api/mail/IPostRegistry.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -public interface IPostRegistry { - - /* POST OFFICE */ - IPostOffice getPostOffice(World world); - - /* MAIL ADDRESSES */ - IMailAddress getMailAddress(GameProfile gameProfile); - IMailAddress getMailAddress(String traderName); - - /* LETTERS */ - boolean isLetter(ItemStack itemstack); - - ILetter createLetter(IMailAddress sender, IMailAddress recipient); - - ILetter getLetter(ItemStack itemstack); - - ItemStack createLetterStack(ILetter letter); - - /* CARRIERS */ - /** - * Registers a new {@link IPostalCarrier}. See {@link IPostalCarrier} for details. - * @param carrier {@link IPostalCarrier} to register. - */ - void registerCarrier(IPostalCarrier carrier); - - IPostalCarrier getCarrier(EnumAddressee uid); - - Map getRegisteredCarriers(); - - /* TRADE STATIONS */ - void deleteTradeStation(World world, IMailAddress address); - - ITradeStation getOrCreateTradeStation(World world, GameProfile owner, IMailAddress address); - - ITradeStation getTradeStation(World world, IMailAddress address); - - boolean isAvailableTradeAddress(World world, IMailAddress address); - - boolean isValidTradeAddress(World world, IMailAddress address); - - /* PO BOXES */ - boolean isValidPOBox(World world, IMailAddress address); - -} diff --git a/api/ForestryAPI/forestry/api/mail/IPostalCarrier.java b/api/ForestryAPI/forestry/api/mail/IPostalCarrier.java deleted file mode 100755 index 28db78a..0000000 --- a/api/ForestryAPI/forestry/api/mail/IPostalCarrier.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Postal Carriers are systems which can be hooked into Forestry's mail system to handle mail delivery. - * - * The two available carriers in vanilla Forestry are - * "player" - Delivers mail to individual players. - * "trader" - Handles mail addressed to trade stations. - */ -public interface IPostalCarrier { - - /** - * @return An EnumAddressee identifying the type of carrier - */ - EnumAddressee getType(); - - /** - * @return A human-readable name for this carrier. - */ - String getName(); - - @SideOnly(Side.CLIENT) - IIcon getIcon(); - - /** - * Handle delivery of a letter addressed to this carrier. - * @param world The world the {@link IPostOffice} handles. - * @param office {link @IPostOffice} which received this letter and handed it to the carrier. - * @param recipient An identifier for the recipient as typed by the player into the address field. - * @param letterstack ItemStack representing the letter. See {@link IPostRegistry} for helper functions to validate and extract it. - * @param doDeliver Whether or not the letter is supposed to actually be delivered or if delivery is only to be simulated. - * @return {link IPostalState} holding information on success or failure for delivery. - */ - IPostalState deliverLetter(World world, IPostOffice office, IMailAddress recipient, ItemStack letterstack, boolean doDeliver); - -} diff --git a/api/ForestryAPI/forestry/api/mail/IPostalState.java b/api/ForestryAPI/forestry/api/mail/IPostalState.java deleted file mode 100755 index bc84362..0000000 --- a/api/ForestryAPI/forestry/api/mail/IPostalState.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -public interface IPostalState { - boolean isOk(); - - String getIdentifier(); - - int ordinal(); -} diff --git a/api/ForestryAPI/forestry/api/mail/IStamps.java b/api/ForestryAPI/forestry/api/mail/IStamps.java deleted file mode 100755 index 4332a81..0000000 --- a/api/ForestryAPI/forestry/api/mail/IStamps.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.item.ItemStack; - -public interface IStamps { - - EnumPostage getPostage(ItemStack itemstack); - -} diff --git a/api/ForestryAPI/forestry/api/mail/ITradeStation.java b/api/ForestryAPI/forestry/api/mail/ITradeStation.java deleted file mode 100755 index 78a498a..0000000 --- a/api/ForestryAPI/forestry/api/mail/ITradeStation.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.inventory.IInventory; - -public interface ITradeStation extends ILetterHandler, IInventory { - - IMailAddress getAddress(); - - boolean isValid(); - - void invalidate(); - - void setVirtual(boolean isVirtual); - - boolean isVirtual(); - - TradeStationInfo getTradeInfo(); - -} diff --git a/api/ForestryAPI/forestry/api/mail/PostManager.java b/api/ForestryAPI/forestry/api/mail/PostManager.java deleted file mode 100755 index c3f0e45..0000000 --- a/api/ForestryAPI/forestry/api/mail/PostManager.java +++ /dev/null @@ -1,11 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - - -public class PostManager { - public static IPostRegistry postRegistry; -} diff --git a/api/ForestryAPI/forestry/api/mail/TradeStationInfo.java b/api/ForestryAPI/forestry/api/mail/TradeStationInfo.java deleted file mode 100755 index 14424be..0000000 --- a/api/ForestryAPI/forestry/api/mail/TradeStationInfo.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.lang.IllegalArgumentException; -import net.minecraft.item.ItemStack; -import com.mojang.authlib.GameProfile; - -public class TradeStationInfo { - public final IMailAddress address; - public final GameProfile owner; - public final ItemStack tradegood; - public final ItemStack[] required; - public final IPostalState state; - - public TradeStationInfo(IMailAddress address, GameProfile owner, ItemStack tradegood, ItemStack[] required, IPostalState state) { - if (!address.isTrader()) { - throw new IllegalArgumentException("TradeStation address must be a trader"); - } - this.address = address; - this.owner = owner; - this.tradegood = tradegood; - this.required = required; - this.state = state; - } -} diff --git a/api/ForestryAPI/forestry/api/mail/package-info.java b/api/ForestryAPI/forestry/api/mail/package-info.java deleted file mode 100755 index a105072..0000000 --- a/api/ForestryAPI/forestry/api/mail/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="3.0.0", owner="ForestryAPI|core", provides="ForestryAPI|mail") -package forestry.api.mail; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/recipes/ICarpenterManager.java b/api/ForestryAPI/forestry/api/recipes/ICarpenterManager.java deleted file mode 100755 index 9205624..0000000 --- a/api/ForestryAPI/forestry/api/recipes/ICarpenterManager.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.ShapedRecipes; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the carpenter. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * Only shaped recipes can be added currently. - * - * @author SirSengir - */ -public interface ICarpenterManager extends ICraftingProvider { - /** - * Add a shaped recipe to the carpenter. - * - * @param box - * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. - */ - public void addRecipe(ItemStack box, ItemStack product, Object... materials); - - /** - * Add a shaped recipe to the carpenter. - * - * @param packagingTime - * Number of work cycles required to craft the recipe once. - * @param box - * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. - */ - public void addRecipe(int packagingTime, ItemStack box, ItemStack product, Object... materials); - - /** - * Add a shaped recipe to the carpenter. - * - * @param packagingTime - * Number of work cycles required to craft the recipe once. - * @param liquid - * Liquid required in carpenter's tank. - * @param box - * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. - */ - public void addRecipe(int packagingTime, FluidStack liquid, ItemStack box, ItemStack product, Object... materials); - - /** @deprecated since Forestry 3.4, use the ICrateRegistry */ - @Deprecated - public void addCrating(String toCrate, ItemStack unpack, ItemStack crated); - /** @deprecated since Forestry 3.4, use the ICrateRegistry */ - @Deprecated - public void addCrating(ItemStack itemStack); - /** @deprecated since Forestry 3.4, use the ICrateRegistry */ - @Deprecated - public void addCratingWithOreDict(ItemStack itemStack); -} diff --git a/api/ForestryAPI/forestry/api/recipes/ICentrifugeManager.java b/api/ForestryAPI/forestry/api/recipes/ICentrifugeManager.java deleted file mode 100755 index 910bd32..0000000 --- a/api/ForestryAPI/forestry/api/recipes/ICentrifugeManager.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import java.util.HashMap; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the centrifuge. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface ICentrifugeManager extends ICraftingProvider { - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param products - * HashMap specifying the possible products and the chances of them resulting from centrifugation. - */ - public void addRecipe(int timePerItem, ItemStack resource, HashMap products); - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param produce - * Array of ItemStacks that can be the result of this recipe. - * @param chances - * Array of integers corresponding and matching to produce providing the chance (0-100) for the ItemStack at the given index to be - * produced. - */ - public void addRecipe(int timePerItem, ItemStack resource, ItemStack[] produce, int[] chances); - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param primary - * Primary product produced by centrifugating one item. Yield 100 %. - * @param secondary - * Secondary product that may be produced when centrifugating the given item. May be null. - * @param chance - * Chance (1 - 100) for centrifugation to yield the secondary product. - */ - public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary, ItemStack secondary, int chance); - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param primary - * Primary product produced by centrifugating one item. Yield 100 %. - */ - public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary); - -} diff --git a/api/ForestryAPI/forestry/api/recipes/ICraftingProvider.java b/api/ForestryAPI/forestry/api/recipes/ICraftingProvider.java deleted file mode 100755 index 502dffb..0000000 --- a/api/ForestryAPI/forestry/api/recipes/ICraftingProvider.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import java.util.Map; - -public interface ICraftingProvider { - /** - * Access to the full list of recipes contained in the crafting provider. - * - * @return List of the given format where the first array represents inputs and the second outputs. Objects can be either ItemStack or LiquidStack. - */ - public Map getRecipes(); -} diff --git a/api/ForestryAPI/forestry/api/recipes/IFabricatorManager.java b/api/ForestryAPI/forestry/api/recipes/IFabricatorManager.java deleted file mode 100755 index a01f0da..0000000 --- a/api/ForestryAPI/forestry/api/recipes/IFabricatorManager.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -public interface IFabricatorManager extends ICraftingProvider { - - void addRecipe(ItemStack plan, FluidStack molten, ItemStack result, Object[] pattern); - - void addSmelting(ItemStack resource, FluidStack molten, int meltingPoint); - -} diff --git a/api/ForestryAPI/forestry/api/recipes/IFermenterManager.java b/api/ForestryAPI/forestry/api/recipes/IFermenterManager.java deleted file mode 100755 index 92c903b..0000000 --- a/api/ForestryAPI/forestry/api/recipes/IFermenterManager.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the fermenter. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() - * cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be - * null even if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface IFermenterManager extends ICraftingProvider { - - /** - * Add a recipe to the fermenter - * - * @param resource ItemStack representing the resource. - * @param fermentationValue Value of the given resource, i.e. how much needs - * to be fermented for the output to be deposited into the product tank. - * @param modifier Modifies the amount of liquid output per work cycle. - * (water = 1.0f, honey = 1.5f) - * @param output LiquidStack representing output liquid. Amount is - * determined by fermentationValue*modifier. - * @param liquid LiquidStack representing resource liquid and amount. - * @throws NullPointerException if resource, output or liquid is null - */ - public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output, FluidStack liquid); - - /** - * Add a recipe to the fermenter. Defaults to water as input liquid. - * - * @param resource ItemStack representing the resource. - * @param modifier Modifies the amount of liquid output per work cycle. - * (water = 1.0f, honey = 1.5f) - * @param fermentationValue Value of the given resource, i.e. how much needs - * to be fermented for the output to be deposited into the product tank. - * @param output LiquidStack representing output liquid. Amount is - * determined by fermentationValue*modifier. - * @throws NullPointerException if resource, output or liquid is null - */ - public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output); -} diff --git a/api/ForestryAPI/forestry/api/recipes/IGenericCrate.java b/api/ForestryAPI/forestry/api/recipes/IGenericCrate.java deleted file mode 100755 index 62c77f8..0000000 --- a/api/ForestryAPI/forestry/api/recipes/IGenericCrate.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -/** @deprecated since Forestry 3.4. Use ICrateRegistry */ -@Deprecated -public interface IGenericCrate { - - void setContained(ItemStack crate, ItemStack contained); - - ItemStack getContained(ItemStack crate); - -} diff --git a/api/ForestryAPI/forestry/api/recipes/IMoistenerManager.java b/api/ForestryAPI/forestry/api/recipes/IMoistenerManager.java deleted file mode 100755 index 711264b..0000000 --- a/api/ForestryAPI/forestry/api/recipes/IMoistenerManager.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the moistener. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface IMoistenerManager extends ICraftingProvider { - - /** - * Add a recipe to the moistener - * - * @param resource - * Item required in resource stack. Will be reduced by one per produced item. - * @param product - * Item to produce per resource processed. - * @param timePerItem - * Moistener runs at 1 - 4 time ticks per ingame tick depending on light level. For mycelium this value is currently 5000. - */ - public void addRecipe(ItemStack resource, ItemStack product, int timePerItem); -} diff --git a/api/ForestryAPI/forestry/api/recipes/ISqueezerManager.java b/api/ForestryAPI/forestry/api/recipes/ISqueezerManager.java deleted file mode 100755 index 0a63b73..0000000 --- a/api/ForestryAPI/forestry/api/recipes/ISqueezerManager.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the suqeezer. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface ISqueezerManager extends ICraftingProvider { - - /** - * Add a recipe to the squeezer. - * - * @param timePerItem - * Number of work cycles required to squeeze one set of resources. - * @param resources - * Array of item stacks representing the required resources for one process. Stack size will be taken into account. - * @param liquid - * {@link FluidStack} representing the output of this recipe. - * @param remnants - * Item stack representing the possible remnants from this recipe. - * @param chance - * Chance remnants will be produced by a single recipe cycle. - */ - public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid, ItemStack remnants, int chance); - - /** - * Add a recipe to the squeezer. - * - * @param timePerItem - * Number of work cycles required to squeeze one set of resources. - * @param resources - * Array of item stacks representing the required resources for one process. Stack size will be taken into account. - * @param liquid - * {@link FluidStack} representing the output of this recipe. - */ - public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid); -} diff --git a/api/ForestryAPI/forestry/api/recipes/IStillManager.java b/api/ForestryAPI/forestry/api/recipes/IStillManager.java deleted file mode 100755 index 47fd421..0000000 --- a/api/ForestryAPI/forestry/api/recipes/IStillManager.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the still. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * Note that this is untested with anything other than biomass->biofuel conversion. - * - * @author SirSengir - */ -public interface IStillManager extends ICraftingProvider { - /** - * Add a recipe to the still - * - * @param cyclesPerUnit - * Amount of work cycles required to run through the conversion once. - * @param input - * ItemStack representing the input liquid. - * @param output - * ItemStack representing the output liquid - */ - public void addRecipe(int cyclesPerUnit, FluidStack input, FluidStack output); -} diff --git a/api/ForestryAPI/forestry/api/recipes/IVariableFermentable.java b/api/ForestryAPI/forestry/api/recipes/IVariableFermentable.java deleted file mode 100755 index f0997f5..0000000 --- a/api/ForestryAPI/forestry/api/recipes/IVariableFermentable.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -/** - * Fermenter checks any valid fermentation item for an implementation of this interface. - * This does not supersede adding a proper recipe to the fermenter! - */ -public interface IVariableFermentable { - - /** - * @param itemstack - * @return Float representing the modification to be applied to the matching recipe's biomass output. - */ - float getFermentationModifier(ItemStack itemstack); -} diff --git a/api/ForestryAPI/forestry/api/recipes/RecipeManagers.java b/api/ForestryAPI/forestry/api/recipes/RecipeManagers.java deleted file mode 100755 index 403bd5b..0000000 --- a/api/ForestryAPI/forestry/api/recipes/RecipeManagers.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import java.util.Collection; - -/** - * Contains all available recipe managers for Forestry machines and items. - * - * @author SirSengir - */ -public class RecipeManagers { - - public static Collection craftingProviders; - - /** - * Allows you to add recipes to the carpenter. See {@link ICarpenterManager} for details. - */ - public static ICarpenterManager carpenterManager; - /** - * Allows you to add recipes to the centrifuge. See {@link ICentrifugeManager} for details. - */ - public static ICentrifugeManager centrifugeManager; - /** - * Allows you to add recipes to the fermenter. See {@link IFermenterManager} for details. - */ - public static IFermenterManager fermenterManager; - /** - * Allows you to add recipes to the moistener. See {@link IMoistenerManager} for details. - */ - public static IMoistenerManager moistenerManager; - /** - * Allows you to add recipes to the squeezer. See {@link ISqueezerManager} for details. - */ - public static ISqueezerManager squeezerManager; - /** - * Allows you to add recipes to the still. See {@link IStillManager} for details. - */ - public static IStillManager stillManager; - - public static IFabricatorManager fabricatorManager; -} diff --git a/api/ForestryAPI/forestry/api/recipes/package-info.java b/api/ForestryAPI/forestry/api/recipes/package-info.java deleted file mode 100755 index cc1016a..0000000 --- a/api/ForestryAPI/forestry/api/recipes/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.1.0", owner="ForestryAPI|core", provides="ForestryAPI|recipes") -package forestry.api.recipes; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/storage/BackpackEvent.java b/api/ForestryAPI/forestry/api/storage/BackpackEvent.java deleted file mode 100755 index 3742778..0000000 --- a/api/ForestryAPI/forestry/api/storage/BackpackEvent.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; - -import cpw.mods.fml.common.eventhandler.Event; - - -public abstract class BackpackEvent extends Event { - - public final EntityPlayer player; - public final IBackpackDefinition backpackDefinition; - public final IInventory backpackInventory; - - public BackpackEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory) { - this.player = player; - this.backpackDefinition = backpackDefinition; - this.backpackInventory = backpackInventory; - } -} diff --git a/api/ForestryAPI/forestry/api/storage/BackpackManager.java b/api/ForestryAPI/forestry/api/storage/BackpackManager.java deleted file mode 100755 index 8805904..0000000 --- a/api/ForestryAPI/forestry/api/storage/BackpackManager.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import java.util.ArrayList; -import java.util.HashMap; - -import net.minecraft.item.ItemStack; - -public class BackpackManager { - /** - * 0 - Miner's Backpack 1 - Digger's Backpack 2 - Forester's Backpack 3 - Hunter's Backpack 4 - Adventurer's Backpack - * - * Use IMC messages to achieve the same effect! - */ - public static ArrayList[] backpackItems; - - public static IBackpackInterface backpackInterface; - - /** - * Only use this if you know what you are doing. Prefer backpackInterface. - */ - public static HashMap definitions = new HashMap(); -} diff --git a/api/ForestryAPI/forestry/api/storage/BackpackResupplyEvent.java b/api/ForestryAPI/forestry/api/storage/BackpackResupplyEvent.java deleted file mode 100755 index e6e5e11..0000000 --- a/api/ForestryAPI/forestry/api/storage/BackpackResupplyEvent.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; - -import cpw.mods.fml.common.eventhandler.Cancelable; - -/** - * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to resupply to a player inventory. Processing will stop - * if the event is canceled. - */ -@Cancelable -public class BackpackResupplyEvent extends BackpackEvent { - - public BackpackResupplyEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory) { - super(player, backpackDefinition, backpackInventory); - } - -} diff --git a/api/ForestryAPI/forestry/api/storage/BackpackStowEvent.java b/api/ForestryAPI/forestry/api/storage/BackpackStowEvent.java deleted file mode 100755 index 3afbf7a..0000000 --- a/api/ForestryAPI/forestry/api/storage/BackpackStowEvent.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -import cpw.mods.fml.common.eventhandler.Cancelable; - -/** - * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to store an item. Processing will stop if the stacksize - * of stackToStow drops to 0 or less or the event is canceled. - */ -@Cancelable -public class BackpackStowEvent extends BackpackEvent { - - public final ItemStack stackToStow; - - public BackpackStowEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory, ItemStack stackToStow) { - super(player, backpackDefinition, backpackInventory); - this.stackToStow = stackToStow; - } -} diff --git a/api/ForestryAPI/forestry/api/storage/EnumBackpackType.java b/api/ForestryAPI/forestry/api/storage/EnumBackpackType.java deleted file mode 100755 index 48ad7ee..0000000 --- a/api/ForestryAPI/forestry/api/storage/EnumBackpackType.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -public enum EnumBackpackType { - APIARIST, T1, T2 -} diff --git a/api/ForestryAPI/forestry/api/storage/IBackpackDefinition.java b/api/ForestryAPI/forestry/api/storage/IBackpackDefinition.java deleted file mode 100755 index 5a61160..0000000 --- a/api/ForestryAPI/forestry/api/storage/IBackpackDefinition.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public interface IBackpackDefinition { - - /** - * @return A unique string identifier - */ - String getKey(); - - /** - * @return Human-readable name of the backpack. - */ - String getName(ItemStack backpack); - - /** - * @deprecated since Forestry 3.0. Use getName(ItemStack backpack). - */ - @Deprecated - String getName(); - - /** - * @return Primary colour for the backpack icon. - */ - int getPrimaryColour(); - - /** - * @return Secondary colour for backpack icon. - */ - int getSecondaryColour(); - - /** - * Adds an item as valid for this backpack. - * - * @param validItem - */ - void addValidItem(ItemStack validItem); - void addValidItems(List validItems); - - /** - * Returns true if the itemstack is a valid item for this backpack type. - * @deprecated since Forestry 3.4. Use isValidItem(ItemStack itemstack). - */ - @Deprecated - boolean isValidItem(EntityPlayer player, ItemStack itemstack); - - /** - * Returns true if the itemstack is a valid item for this backpack type. - */ - boolean isValidItem(ItemStack itemstack); - -} diff --git a/api/ForestryAPI/forestry/api/storage/IBackpackInterface.java b/api/ForestryAPI/forestry/api/storage/IBackpackInterface.java deleted file mode 100755 index 27a2eba..0000000 --- a/api/ForestryAPI/forestry/api/storage/IBackpackInterface.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.item.Item; - -public interface IBackpackInterface { - - /** - * Adds a backpack with the given definition and type, returning the item. - * - * @param definition - * Definition of backpack behaviour. - * @param type - * Type of backpack. (T1 or T2 (= Woven) - * @return Created backpack item. - */ - Item addBackpack(IBackpackDefinition definition, EnumBackpackType type); -} diff --git a/api/ForestryAPI/forestry/api/storage/ICrateRegistry.java b/api/ForestryAPI/forestry/api/storage/ICrateRegistry.java deleted file mode 100644 index 998937b..0000000 --- a/api/ForestryAPI/forestry/api/storage/ICrateRegistry.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public interface ICrateRegistry { - - /** - * Makes a new crate, registers it with the game registry with uid, - * and creates crating and uncrating recipes for the Carpenter. - * The icon is rendered automatically from the contained item. - * - * Can only be called during the Init stage. - */ - void registerCrate(Item item, String uid); - void registerCrate(Block block, String uid); - void registerCrate(ItemStack stack, String uid); - - /** - * Same as the above, but uses the ore dictionary for the Carpenter crating recipe. - */ - void registerCrateUsingOreDict(Item item, String uid); - void registerCrateUsingOreDict(Block block, String uid); - void registerCrateUsingOreDict(ItemStack stack, String uid); - -} diff --git a/api/ForestryAPI/forestry/api/storage/StorageManager.java b/api/ForestryAPI/forestry/api/storage/StorageManager.java deleted file mode 100644 index de0a514..0000000 --- a/api/ForestryAPI/forestry/api/storage/StorageManager.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -public class StorageManager { - - public static ICrateRegistry crateRegistry; - -} diff --git a/api/ForestryAPI/forestry/api/storage/package-info.java b/api/ForestryAPI/forestry/api/storage/package-info.java deleted file mode 100755 index 0474527..0000000 --- a/api/ForestryAPI/forestry/api/storage/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.3.0", owner="ForestryAPI|core", provides="ForestryAPI|storage") -package forestry.api.storage; -import cpw.mods.fml.common.API; diff --git a/api/ForestryAPI/forestry/api/world/ITreeGenData.java b/api/ForestryAPI/forestry/api/world/ITreeGenData.java deleted file mode 100755 index bf59c5e..0000000 --- a/api/ForestryAPI/forestry/api/world/ITreeGenData.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.world; - -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.arboriculture.ITreeGenome; - -public interface ITreeGenData { - - int getGirth(World world, int x, int y, int z); - - float getHeightModifier(); - - boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight); - - void setLeaves(World world, GameProfile owner, int x, int y, int z); - void setLeavesDecorative(World world, GameProfile owner, int x, int y, int z); - - boolean allowsFruitBlocks(); - - boolean trySpawnFruitBlock(World world, int x, int y, int z); - - ITreeGenome getGenome(); -} diff --git a/api/ForestryAPI/forestry/api/world/IWorldGenInterface.java b/api/ForestryAPI/forestry/api/world/IWorldGenInterface.java deleted file mode 100755 index b7b5555..0000000 --- a/api/ForestryAPI/forestry/api/world/IWorldGenInterface.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.world; - -import net.minecraft.world.gen.feature.WorldGenerator; - -public interface IWorldGenInterface { - - /** - * Retrieves generators for trees identified by a given string. - * - * Returned generator classes take an {@link ITreeGenData} in the constructor. - * - * @param ident - * Unique identifier for tree type. Forestry's convention is 'treeSpecies', i.e. 'treeBaobab', 'treeSequoia'. - * @return All generators matching the given ident. - */ - Class[] getTreeGenerators(String ident); -} diff --git a/api/ForestryAPI/forestry/api/world/WorldGenManager.java b/api/ForestryAPI/forestry/api/world/WorldGenManager.java deleted file mode 100755 index a2a5b4f..0000000 --- a/api/ForestryAPI/forestry/api/world/WorldGenManager.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.world; - -public class WorldGenManager { - public static IWorldGenInterface worldgenInterface; -} diff --git a/api/ForestryAPI/forestry/api/world/package-info.java b/api/ForestryAPI/forestry/api/world/package-info.java deleted file mode 100755 index c7e60f4..0000000 --- a/api/ForestryAPI/forestry/api/world/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|world") -package forestry.api.world; -import cpw.mods.fml.common.API; diff --git a/build.gradle b/build.gradle index e7983f4..86b3aea 100644 --- a/build.gradle +++ b/build.gradle @@ -23,11 +23,10 @@ apply plugin: 'maven' group = "com.scottkillen.mod" archivesBaseName = "AncientTrees" -ext.apiForestry = "./api/ForestryAPI" ext.apiKore = "./api/KoreSample/src/main/java" minecraft { - version = project.mcversion + "-" + project.forgeversion + version = project.version_mc + "-" + project.version_forge runDir = "run" replace '${mod_version}', project.version @@ -35,15 +34,20 @@ minecraft { repositories { mavenLocal() - maven { - url = 'http://maven.scottkillen.com/' - } + maven { url = 'http://maven.scottkillen.com/' } + // maven { url = 'http://coloredlightscore.us.to/maven/chisel-2-dev/' } + maven { url = 'http://maven.ic2.player.to/' } +} + +dependencies { + // compile "com.cricketcraft.chisel:Chisel2:${project.ext.version_chisel}:api" + compile files('libs/Chisel2-2.4.0.38-api.jar') + compile "net.sengir.forestry:forestry_${project.version_mc}:${project.ext.version_forestry}:dev" } sourceSets { api { java { - srcDir project.apiForestry srcDir project.apiKore } } @@ -53,18 +57,20 @@ processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.version - inputs.property "forgeversion", project.ext.forgeversion - inputs.property "koreversion", project.ext.koreversion + inputs.property "version_mc", project.minecraft.version + inputs.property "version_forge", project.ext.version_forge + inputs.property "version_kore", project.ext.version_kore + inputs.property "version_chisel", project.ext.version_chisel + inputs.property "version_forestry", project.ext.version_forestry // replace stuff in the files we want. from(sourceSets.main.resources.srcDirs) { include '**/*.info' include '**/version.properties' - expand 'mod_version': project.version, 'minecraft_version': project.minecraft.version, 'forge_version': project - .ext.forgeversion, 'kore_version': project.ext.koreversion, 'sd_version': project.ext - .version_storagedrawers + expand 'mod_version': project.version, 'minecraft_version': project.minecraft.version, + 'forge_version': project.ext.version_forge, 'kore_version': project.ext.version_kore, + 'chisel_version': project.ext.version_chisel, 'sd_version': project.ext.version_storagedrawers } // copy everything else, that we didn't do before @@ -75,7 +81,7 @@ processResources } jar { - includeEmptyDirs = false + includeEmptyDirs = false } task sourcesJar(type: Jar, dependsOn: classes) { @@ -83,9 +89,9 @@ task sourcesJar(type: Jar, dependsOn: classes) { include '**/*.info' include '**/version.properties' - expand 'mod_version': project.version, 'minecraft_version': project.minecraft.version, 'forge_version': project - .ext.forgeversion, 'kore_version': project.ext.koreversion, 'sd_version': project.ext - .version_storagedrawers + expand 'mod_version': project.version, 'minecraft_version': project.minecraft.version, + 'forge_version': project.ext.version_forge, 'kore_version': project.ext.version_kore, + 'chisel_version': project.ext.version_chisel, 'sd_version': project.ext.version_storagedrawers } from(sourceSets.main.allSource) { @@ -108,9 +114,9 @@ task deobfJar(type: Jar) { include '**/*.info' include '**/version.properties' - expand 'mod_version': project.version, 'minecraft_version': project.minecraft.version, 'forge_version': project - .ext.forgeversion, 'kore_version': project.ext.koreversion, 'sd_version': project.ext - .version_storagedrawers + expand 'mod_version': project.version, 'minecraft_version': project.minecraft.version, + 'forge_version': project.ext.version_forge, 'kore_version': project.ext.version_kore, + 'chisel_version': project.ext.version_chisel, 'sd_version': project.ext.version_storagedrawers } from(sourceSets.main.output) { diff --git a/src/api/java/com/cricketcraft/chisel/api/ICarvable.java b/src/api/java/com/cricketcraft/chisel/api/ICarvable.java deleted file mode 100644 index d15737a..0000000 --- a/src/api/java/com/cricketcraft/chisel/api/ICarvable.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.cricketcraft.chisel.api; - -public interface ICarvable -{} diff --git a/src/api/java/com/cricketcraft/chisel/api/carving/ICarvingRegistry.java b/src/api/java/com/cricketcraft/chisel/api/carving/ICarvingRegistry.java deleted file mode 100644 index 8abf9b4..0000000 --- a/src/api/java/com/cricketcraft/chisel/api/carving/ICarvingRegistry.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.cricketcraft.chisel.api.carving; - -import net.minecraft.block.Block; - -public interface ICarvingRegistry { - void addVariation(String groupName, Block block, int metadata, int order); - - void registerOre(String groupName, String oreName); - - void setVariationSound(String name, String s); -} \ No newline at end of file diff --git a/src/api/java/com/cricketcraft/chisel/block/BlockCarvable.java b/src/api/java/com/cricketcraft/chisel/block/BlockCarvable.java deleted file mode 100644 index 490fa4d..0000000 --- a/src/api/java/com/cricketcraft/chisel/block/BlockCarvable.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.cricketcraft.chisel.block; - -import com.cricketcraft.chisel.api.ICarvable; -import com.cricketcraft.chisel.carving.CarvableHelper; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockCarvable extends Block implements ICarvable -{ - public CarvableHelper carverHelper; - - public BlockCarvable(Material material) - { - super(material); - } -} diff --git a/src/api/java/com/cricketcraft/chisel/carving/CarvableHelper.java b/src/api/java/com/cricketcraft/chisel/carving/CarvableHelper.java deleted file mode 100644 index 03cf34a..0000000 --- a/src/api/java/com/cricketcraft/chisel/carving/CarvableHelper.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.cricketcraft.chisel.carving; - -import net.minecraft.block.Block; - -public class CarvableHelper -{ - public void setChiselBlockName(String name) { } - - public void addVariation(String description, int metadata, String texture) { } - - public void registerAll(Block block, String name) {} -} diff --git a/src/api/java/com/cricketcraft/chisel/carving/Carving.java b/src/api/java/com/cricketcraft/chisel/carving/Carving.java deleted file mode 100644 index 5dea916..0000000 --- a/src/api/java/com/cricketcraft/chisel/carving/Carving.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.cricketcraft.chisel.carving; - -import com.cricketcraft.chisel.api.carving.ICarvingRegistry; -import net.minecraft.block.Block; - -public class Carving implements ICarvingRegistry -{ - public static final ICarvingRegistry chisel = new Carving(); - - @Override - public void addVariation(String groupName, Block block, int metadata, int order) { } - - @Override - public void registerOre(String groupName, String oreName) { } - - @Override - public void setVariationSound(String name, String s) { } -} diff --git a/src/api/java/com/cricketcraft/chisel/init/ChiselTabs.java b/src/api/java/com/cricketcraft/chisel/init/ChiselTabs.java deleted file mode 100644 index 972576f..0000000 --- a/src/api/java/com/cricketcraft/chisel/init/ChiselTabs.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.cricketcraft.chisel.init; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; - -public class ChiselTabs -{ - private static class CustomCreativeTab extends CreativeTabs - { - public CustomCreativeTab(String lable) - { - super(lable); - } - - @Override - public Item getTabIconItem() - { - return null; - } - } - - public static final CustomCreativeTab tabWoodChiselBlocks = new CustomCreativeTab("tabWoodChiselBlocks"); -} diff --git a/src/api/java/com/cricketcraft/ctmlib/ISubmapManager.java b/src/api/java/com/cricketcraft/ctmlib/ISubmapManager.java new file mode 100644 index 0000000..e6f5b87 --- /dev/null +++ b/src/api/java/com/cricketcraft/ctmlib/ISubmapManager.java @@ -0,0 +1,29 @@ +package com.cricketcraft.ctmlib; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; + +public interface ISubmapManager +{ + IIcon getIcon(int paramInt1, int paramInt2); + + IIcon getIcon(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3, int paramInt4); + + @SideOnly(Side.CLIENT) + void registerIcons(String paramString, Block paramBlock, IIconRegister paramIIconRegister); + + @SideOnly(Side.CLIENT) + RenderBlocks createRenderContext(RenderBlocks paramRenderBlocks, Block paramBlock, IBlockAccess paramIBlockAccess); + + @SideOnly(Side.CLIENT) + void preRenderSide(RenderBlocks paramRenderBlocks, IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3, ForgeDirection paramForgeDirection); + + @SideOnly(Side.CLIENT) + void postRenderSide(RenderBlocks paramRenderBlocks, IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3, ForgeDirection paramForgeDirection); +} diff --git a/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselMod.java b/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselMod.java index 68b1881..0e33f21 100644 --- a/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselMod.java +++ b/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselMod.java @@ -1,19 +1,22 @@ package com.scottkillen.mod.dendrology.compat.chisel; -import com.cricketcraft.chisel.block.BlockCarvable; -import com.cricketcraft.chisel.carving.Carving; -import com.cricketcraft.chisel.init.ChiselTabs; -import com.google.common.collect.ImmutableList; +import com.cricketcraft.chisel.api.carving.CarvableHelper; +import com.cricketcraft.chisel.api.carving.CarvingUtils; +import com.cricketcraft.chisel.api.carving.ICarvingRegistry; import com.scottkillen.mod.dendrology.TheMod; import com.scottkillen.mod.dendrology.config.Settings; import com.scottkillen.mod.dendrology.content.overworld.OverworldTreeSpecies; import com.scottkillen.mod.koresample.compat.Integrator; +import com.scottkillen.mod.koresample.tree.block.WoodBlock; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.LoaderState.ModState; import cpw.mods.fml.common.Optional.Method; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.util.StatCollector; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +import static net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE; public final class ChiselMod extends Integrator { @@ -26,58 +29,56 @@ private static void preInit() loadBlocks(); } - @SuppressWarnings("MethodWithMultipleLoops") + private static void assignAttributes(ChiselWoodBlock chiselWoodBlock) + { + OreDictionary.registerOre("plankWood", new ItemStack(chiselWoodBlock, 1, WILDCARD_VALUE)); + chiselWoodBlock.setCreativeTab(getChiselCreativeTab()); + Blocks.fire.setFireInfo(chiselWoodBlock, 5, 20); + } + + @Method(modid = MOD_ID) + private static void finalizeVariationGroup(WoodBlock woodBlock, int subBlockIndex, String variationGroupName) + { + final ICarvingRegistry chisel = CarvingUtils.getChiselRegistry(); + chisel.addVariation(variationGroupName, woodBlock, subBlockIndex, 0); + chisel.setVariationSound(variationGroupName, MOD_ID + ":chisel.wood"); + } + + private static CreativeTabs getChiselCreativeTab() + { + for (final CreativeTabs tab : CreativeTabs.creativeTabArray) + if ("tabWoodChiselBlocks".equals(tab.getTabLabel())) return tab; + + return TheMod.INSTANCE.creativeTab(); + } + @Method(modid = MOD_ID) private static void loadBlocks() { - final ImmutableList variation = ImmutableList - .of("clean", "Short", "fancy", "panel", "double", "crate", "cratefancy", "large", "vertical", "uneven", - "parquet", "blinds", "scaffold", "chaotic", "verticalchaotic"); - final ImmutableList metadata = ImmutableList.of(1, 2, 6, 8, 9, 10, 11, 13, 3, 4, 5, 7, 12, 14, 15); - final ImmutableList texture = ImmutableList - .of("clean", "short", "fancy", "panel-nails", "double", "crate", "crate-fancy", "large", "vertical", - "vertical-uneven", "parquet", "blinds", "crateex", "chaotic-hor", "chaotic"); - - int count = 0; for (final OverworldTreeSpecies species : OverworldTreeSpecies.values()) { - final String name = String.format("%s%s", species.speciesName(), "_planks"); - - final BlockCarvable carvablePlanks = newCarvablePlank(); - carvablePlanks.setCreativeTab(ChiselTabs.tabWoodChiselBlocks).setHardness(2.0F).setResistance(5.0F) - .setStepSound(Block.soundTypeWood); final String speciesName = species.speciesName(); - carvablePlanks.carverHelper.setChiselBlockName(planksChiselBlockName(speciesName)); - for (int i = 0; i < variation.size(); i++) - { - carvablePlanks.carverHelper - .addVariation(planksChiselVariationName(speciesName, variation.get(i)), metadata.get(i), - "planks-" + speciesName + '/' + texture.get(i)); - } - carvablePlanks.carverHelper.registerAll(carvablePlanks, name); - Carving.chisel.addVariation(name, species.woodBlock(), count, 0); - carvablePlanks.setHarvestLevel("axe", 0); - Carving.chisel.registerOre(name, "wood"); - Carving.chisel.setVariationSound(name, MOD_ID + ":chisel.wood"); - count++; + final String variationGroupName = String.format("%s%s", speciesName, "_planks"); + final ChiselWoodBlock chiselWoodBlock = newChiselWoodBlock(speciesName); + + registerVariations(variationGroupName, chiselWoodBlock); + finalizeVariationGroup(species.woodBlock(), species.woodSubBlockIndex(), variationGroupName); + assignAttributes(chiselWoodBlock); } } - @Method(modid = MOD_ID) - private static String planksChiselBlockName(String speciesName) - { - return StatCollector.translateToLocal(String.format("tile.%s:wood.%s.name", TheMod.MOD_ID, speciesName)); - } + private static ChiselWoodBlock newChiselWoodBlock(String speciesName) {return new ChiselWoodBlock(speciesName);} @Method(modid = MOD_ID) - private static String planksChiselVariationName(String speciesName, String variation) + private static void registerVariations(String variationGroupName, ChiselWoodBlock chiselWoodBlock) { - return StatCollector - .translateToLocal(String.format("chisel.%s:planks.%s.%s.name", TheMod.MOD_ID, speciesName, variation)); - } + final CarvableHelper carvableHelper = new CarvableHelper(chiselWoodBlock); - @Method(modid = MOD_ID) - private static BlockCarvable newCarvablePlank() { return new BlockCarvable(Material.wood); } + for (int i = 0; i < 15; i++) + carvableHelper.addVariation(chiselWoodBlock.getVariationName(i), i, chiselWoodBlock); + + carvableHelper.registerAll(chiselWoodBlock, variationGroupName); + } @Override public void doIntegration(ModState modState) diff --git a/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselWoodBlock.java b/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselWoodBlock.java new file mode 100644 index 0000000..dc4f694 --- /dev/null +++ b/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselWoodBlock.java @@ -0,0 +1,69 @@ +package com.scottkillen.mod.dendrology.compat.chisel; + +import com.google.common.collect.ImmutableList; +import com.scottkillen.mod.dendrology.TheMod; +import com.scottkillen.mod.koresample.common.util.multiblock.SubBlockManager; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; +import java.util.List; + +public final class ChiselWoodBlock extends Block +{ + private static final ImmutableList VARIATIONS = ImmutableList + .of("clean", "short", "vertical", "uneven", "parquet", "fancy", "blinds", "panel", "double", "crate", + "cratefancy", "scaffold", "large", "chaotic", "verticalchaotic"); + + private final SubBlockManager subBlocks; + private final String speciesName; + + public ChiselWoodBlock(String speciesName) + { + super(Material.wood); + subBlocks = new ChiselWoodSubBlockManager(speciesName); + setHardness(2.0f); + setResistance(5.0f); + setStepSound(soundTypeWood); + setHarvestLevel("axe", 0); + this.speciesName = speciesName; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) + { + return subBlocks.getIcon(side, metadata); + } + + @Override + public int damageDropped(int i) + { + return i; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) + { + subBlocks.registerIcons(register); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tabs, List list) + { + subBlocks.getSubBlocks(item, tabs, list); + } + + public String getVariationName(int i) + { + return StatCollector.translateToLocal( + String.format("chisel.%s:planks.%s.%s.name", TheMod.MOD_ID, speciesName, VARIATIONS.get(i))); + } +} diff --git a/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselWoodSubBlockManager.java b/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselWoodSubBlockManager.java new file mode 100644 index 0000000..1c853e5 --- /dev/null +++ b/src/main/java/com/scottkillen/mod/dendrology/compat/chisel/ChiselWoodSubBlockManager.java @@ -0,0 +1,62 @@ +package com.scottkillen.mod.dendrology.compat.chisel; + +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import com.scottkillen.mod.koresample.common.util.multiblock.SubBlockManager; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import java.util.List; + +public final class ChiselWoodSubBlockManager implements SubBlockManager +{ + private final String speciesName; + private final List icons = Lists.newArrayListWithCapacity(16); + private static final ImmutableList TEXTURES = ImmutableList + .of("clean", "short", "vertical", "vertical-uneven", "parquet", "fancy", "blinds", "panel-nails", + "double-side", "crate", "crate-fancy", "crateex", "large", "chaotic-hor", "chaotic", "double-top"); + + public ChiselWoodSubBlockManager(String speciesName) + { + this.speciesName = speciesName; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + return meta != 9 || side != 0 && side != 1 ? icons.get(meta) : icons.get(15); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + icons.clear(); + + for (final String texture : TEXTURES) + icons.add(iconRegister.registerIcon(String.format("chisel:planks-%s/%s", speciesName, texture))); + } + + @SuppressWarnings("unchecked") + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs unused, List subBlocks) + { + final int numSubBlocks = TEXTURES.size() - 1; + for (int i = 0; i < numSubBlocks; i++) + //noinspection ObjectAllocationInLoop + subBlocks.add(new ItemStack(item, 1, i)); + } + + @Override + public String toString() + { + return Objects.toStringHelper(this).add("speciesName", speciesName).add("icons", icons).toString(); + } +} diff --git a/src/main/resources/CHANGELOG.md b/src/main/resources/CHANGELOG.md index 6cd431e..6869780 100644 --- a/src/main/resources/CHANGELOG.md +++ b/src/main/resources/CHANGELOG.md @@ -1,5 +1,8 @@ # Ancient Trees Changelog +## 1.6.0 +- Update Chisel integration to use new Chisel API + ## 1.5.1 - Fixed crash when Storage Drawers integration is enabled and Refined Relocation is present. @@ -8,7 +11,7 @@ - Switches in configuration file to toggle integration with other mods. ## 1.4.0 -- Saplings can now be planted, fertilized and harvested in MineFactory Reloaded machines. (Though you should +- Saplings can now be planted, fertilized and harvested in MineFactory reloaded machines. (Though you should be careful with larger trees!) - Saplings are now found wrapped in ancient packages inside chests. (This is to allow us more rarity than the vanilla chest loot system. diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 22001fa..d0fbc95 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -26,6 +26,7 @@ "koresample@[${kore_version},${minecraft_version}-2.0.0)", "Forestry", "minechem", + "chisel@[${chisel_version},)", "StorageDrawers@[${sd_version},)" ], "dependants": [ diff --git a/version/build.gradle b/version/build.gradle index dff5799..71b5f3f 100644 --- a/version/build.gradle +++ b/version/build.gradle @@ -1,44 +1,46 @@ -rootProject.version = "$mcversion-$version_major.$version_series.$version_revision" -rootProject.ext.mcversion = mcversion -rootProject.ext.forgeversion = forgeversion -rootProject.ext.koreversion = "$mcversion-$koreversion" +rootProject.version = "$version_mc-$version_major.$version_series.$version_revision" +rootProject.ext.version_mc = version_mc +rootProject.ext.version_forge = version_forge +rootProject.ext.version_kore = "$version_mc-$version_kore" +rootProject.ext.version_chisel = version_chisel +rootProject.ext.version_forestry = version_forestry rootProject.ext.version_storagedrawers = version_storagedrawers task echoVersion << { - printNextVersion() + printNextVersion() } def saveVersion() { - ant.propertyfile( - file: "gradle.properties") { - entry( key:"version_major", type:"int", value: version_major) - entry( key:"version_series", type:"int", value: version_series) - entry( key:"version_revision", type:"int", value: version_revision) - } - rootProject.version = "$mcversion-$version_major.$version_series.$version_revision" - printNextVersion() + ant.propertyfile( + file: "gradle.properties") { + entry( key:"version_major", type:"int", value: version_major) + entry( key:"version_series", type:"int", value: version_series) + entry( key:"version_revision", type:"int", value: version_revision) + } + rootProject.version = "$version_mc-$version_major.$version_series.$version_revision" + printNextVersion() } def printNextVersion(){ - println '*************************************************************' - println 'The next build will be version: ' + rootProject.version - println '*************************************************************' + println '*************************************************************' + println 'The next build will be version: ' + rootProject.version + println '*************************************************************' } task bumpMajor << { - project.version_major = Integer.parseInt(project.version_major) + 1 - project.version_series = "0" - project.version_revision = "0" - saveVersion() + project.version_major = Integer.parseInt(project.version_major) + 1 + project.version_series = "0" + project.version_revision = "0" + saveVersion() } task bumpSeries << { - project.version_series = Integer.parseInt(project.version_series) + 1 - project.version_revision = "0" - saveVersion() + project.version_series = Integer.parseInt(project.version_series) + 1 + project.version_revision = "0" + saveVersion() } task bumpRevision << { - project.version_revision = Integer.parseInt(project.version_revision) + 1 - saveVersion() + project.version_revision = Integer.parseInt(project.version_revision) + 1 + saveVersion() } diff --git a/version/gradle.properties b/version/gradle.properties index fad2941..5a6a4e1 100644 --- a/version/gradle.properties +++ b/version/gradle.properties @@ -1,9 +1,11 @@ -#Sun, 14 Jun 2015 17:07:04 -0400 -mcversion=1.7.10 -forgeversion=10.13.2.1291 -koreversion=1.3.0 -version_major=1 -version_series=5 -version_revision=1 - +#Fri, 26 Jun 2015 17:03:32 -0400 +version_mc=1.7.10 +version_forge=10.13.2.1291 +version_kore=1.3.0 +version_chisel=2.4.0.38 +version_forestry=3.5.6.15 version_storagedrawers=1.7.10-1.5.6 + +version_major=1 +version_series=6 +version_revision=0