diff --git a/src/main/java/forestry/api/apiculture/BeeManager.java b/src/main/java/forestry/api/apiculture/BeeManager.java index 443a454cd..b03a8d764 100644 --- a/src/main/java/forestry/api/apiculture/BeeManager.java +++ b/src/main/java/forestry/api/apiculture/BeeManager.java @@ -13,7 +13,6 @@ import java.util.Map; import net.minecraft.item.ItemStack; /** - * * Some miscellaneous lists and settings for bees. * * @author SirSengir diff --git a/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java b/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java index 7a6721b54..89f415e8d 100644 --- a/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java +++ b/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java @@ -75,9 +75,9 @@ public enum EnumBeeChromosome implements IChromosomeType { * Determines the bee's effect. */ EFFECT(IAlleleBeeEffect.class); - + private final Class alleleClass; - + EnumBeeChromosome(Class alleleClass) { this.alleleClass = alleleClass; } diff --git a/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java b/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java index 3cf05408e..c3215e925 100644 --- a/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java +++ b/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java @@ -9,13 +9,13 @@ 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. (server) * - * @param genome Genome of the bee queen causing this effect + * @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. + * @param housing {@link IBeeHousing} the bee currently resides in. * @return storedData, may have been manipulated. */ IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing); @@ -23,11 +23,11 @@ public interface IAlleleBeeEffect extends IAlleleEffect { /** * Is called to produce visual bee effects. (client) * - * @param genome Genome of the bee queen causing this effect + * @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. + * @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/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java b/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java index 307a33c84..63141b67f 100644 --- a/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java +++ b/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java @@ -7,14 +7,13 @@ package forestry.api.apiculture; import java.util.Map; +import forestry.api.core.IModelManager; +import forestry.api.genetics.IAlleleSpecies; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.core.IModelManager; -import forestry.api.genetics.IAlleleSpecies; public interface IAlleleBeeSpecies extends IAlleleSpecies { @@ -41,13 +40,14 @@ public interface IAlleleBeeSpecies extends IAlleleSpecies { /** * Only jubilant bees produce specialities. + * * @return true if the bee is jubilant, false otherwise. */ boolean isJubilant(IBeeGenome genome, IBeeHousing housing); @SideOnly(Side.CLIENT) ModelResourceLocation getModel(EnumBeeType type); - + @SideOnly(Side.CLIENT) void registerModels(Item item, IModelManager manager); } diff --git a/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesBuilder.java b/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesBuilder.java index 5ba5c5a2e..31607ef0a 100644 --- a/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesBuilder.java +++ b/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesBuilder.java @@ -5,9 +5,8 @@ ******************************************************************************/ package forestry.api.apiculture; -import net.minecraft.item.ItemStack; - import forestry.api.genetics.IAlleleSpeciesBuilder; +import net.minecraft.item.ItemStack; public interface IAlleleBeeSpeciesBuilder extends IAlleleSpeciesBuilder { @@ -38,9 +37,13 @@ public interface IAlleleBeeSpeciesBuilder extends IAlleleSpeciesBuilder { */ IAlleleBeeSpeciesBuilder setNocturnal(); - /** Use this if you have custom icons for bees. */ + /** + * Use this if you have custom icons for bees. + */ IAlleleBeeSpeciesBuilder setCustomBeeModelProvider(IBeeModelProvider beeIconProvider); - /** Use this if you have custom icon colours for bees (other than the default static primary + secondary colours). */ + /** + * Use this if you have custom icon colours for bees (other than the default static primary + secondary colours). + */ IAlleleBeeSpeciesBuilder setCustomBeeSpriteColourProvider(IBeeSpriteColourProvider beeIconColourProvider); } diff --git a/src/main/java/forestry/api/apiculture/IApiaristTracker.java b/src/main/java/forestry/api/apiculture/IApiaristTracker.java index 942c45db3..48b2d9e1d 100644 --- a/src/main/java/forestry/api/apiculture/IApiaristTracker.java +++ b/src/main/java/forestry/api/apiculture/IApiaristTracker.java @@ -18,8 +18,7 @@ public interface IApiaristTracker extends IBreedingTracker { /** * Register the birth of a queen. Will mark species as discovered. * - * @param queen - * Created queen. + * @param queen Created queen. */ void registerQueen(IIndividual queen); @@ -31,8 +30,7 @@ public interface IApiaristTracker extends IBreedingTracker { /** * Register the birth of a princess. Will mark species as discovered. * - * @param princess - * Created princess. + * @param princess Created princess. */ void registerPrincess(IIndividual princess); @@ -44,8 +42,7 @@ public interface IApiaristTracker extends IBreedingTracker { /** * Register the birth of a drone. Will mark species as discovered. * - * @param drone - * Created drone. + * @param drone Created drone. */ void registerDrone(IIndividual drone); diff --git a/src/main/java/forestry/api/apiculture/IArmorApiarist.java b/src/main/java/forestry/api/apiculture/IArmorApiarist.java index 9a33499be..535f619fc 100644 --- a/src/main/java/forestry/api/apiculture/IArmorApiarist.java +++ b/src/main/java/forestry/api/apiculture/IArmorApiarist.java @@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack; /** * When implemented as a capability by armor items, protects the wearer from negative bee effects. + * * @see ApicultureCapabilities#ARMOR_APIARIST */ public interface IArmorApiarist { diff --git a/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java b/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java index ff04fa65c..c4e2ea2be 100644 --- a/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java +++ b/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java @@ -17,9 +17,10 @@ public interface IArmorApiaristHelper { /** * Called when the apiarist's armor acts as protection against an attack. - * @param stack ItemStack to check - * @param entity Entity being attacked - * @param cause Optional cause of attack, such as a bee effect identifier + * + * @param stack ItemStack to check + * @param entity Entity being attacked + * @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 item is valid Apiarist Armor and should protect the player from that attack * @since Forestry 4.2 @@ -28,11 +29,12 @@ public interface IArmorApiaristHelper { /** * Called when the apiarist's armor acts as protection against an attack. - * @param entity Entity being attacked - * @param cause Optional cause of attack, such as a bee effect identifier + * + * @param entity Entity being attacked + * @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 The number of valid Apiarist Armor pieces the player is wearing that are actually protecting. - * 4 means full protection, but it can go higher if they are holding items like the smoker. + * 4 means full protection, but it can go higher if they are holding items like the smoker. * @since Forestry 4.2 */ int wearsItems(EntityLivingBase entity, String cause, boolean doProtect); diff --git a/src/main/java/forestry/api/apiculture/IBeeFactory.java b/src/main/java/forestry/api/apiculture/IBeeFactory.java index 0a8cde0b0..71a099167 100644 --- a/src/main/java/forestry/api/apiculture/IBeeFactory.java +++ b/src/main/java/forestry/api/apiculture/IBeeFactory.java @@ -14,15 +14,15 @@ public interface IBeeFactory { * Automatically registered with AlleleManager.alleleRegistry.registerAllele() * See IAlleleBeeSpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species. * - * @param uid Unique Identifier for this species - * @param dominant Whether this species is genetically dominant (false means it is recessive) - * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. - * @param unlocalizedName Unlocalized name for this species + * @param uid Unique Identifier for this species + * @param dominant Whether this species is genetically dominant (false means it is recessive) + * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. + * @param unlocalizedName Unlocalized name for this species * @param unlocalizedDescription Unlocalized description for this species - * @param branch Classification of this species - * @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. - * @param primaryColor The outline color of this species - * @param secondaryColor The body color of this species + * @param branch Classification of this species + * @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. + * @param primaryColor The outline color of this species + * @param secondaryColor The body color of this species * @return a new bee species allele. */ IAlleleBeeSpeciesBuilder createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor); @@ -31,7 +31,7 @@ public interface IBeeFactory { * Creates a new bee branch. * Must be registered with AlleleManager.alleleRegistry.getClassification("family.apidae").addMemberGroup(); * - * @param uid Unique Identifier for this branch + * @param uid Unique Identifier for this branch * @param scientific approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis" * @return a new bee branch */ diff --git a/src/main/java/forestry/api/apiculture/IBeeGenome.java b/src/main/java/forestry/api/apiculture/IBeeGenome.java index 05a0dc97f..e41579464 100644 --- a/src/main/java/forestry/api/apiculture/IBeeGenome.java +++ b/src/main/java/forestry/api/apiculture/IBeeGenome.java @@ -5,23 +5,21 @@ ******************************************************************************/ package forestry.api.apiculture; -import net.minecraft.util.math.Vec3i; - import forestry.api.genetics.EnumTolerance; import forestry.api.genetics.IFlowerProvider; import forestry.api.genetics.IGenome; +import net.minecraft.util.math.Vec3i; /** * Only the default implementation is supported. * * @author SirSengir - * */ public interface IBeeGenome extends IGenome { @Override IAlleleBeeSpecies getPrimary(); - + @Override IAlleleBeeSpecies getSecondary(); diff --git a/src/main/java/forestry/api/apiculture/IBeeHousing.java b/src/main/java/forestry/api/apiculture/IBeeHousing.java index fc3bc6a1c..64f17daea 100644 --- a/src/main/java/forestry/api/apiculture/IBeeHousing.java +++ b/src/main/java/forestry/api/apiculture/IBeeHousing.java @@ -19,6 +19,7 @@ public interface IBeeHousing extends IHousing, IErrorLogicSource, IClimateProvid /** * Used by {@link IBeeRoot#createBeeHousingModifier(IBeeHousing)} * to combine bee modifiers from several sources that can change over time. + * * @return IBeeModifiers from the housing, frames, etc. */ Iterable getBeeModifiers(); @@ -26,6 +27,7 @@ public interface IBeeHousing extends IHousing, IErrorLogicSource, IClimateProvid /** * Used by {@link IBeeRoot#createBeeHousingListener(IBeeHousing)} * to combine bee listeners from several sources that can change over time. + * * @return IBeeListeners from the housing, multiblock parts, etc. */ Iterable getBeeListeners(); @@ -37,15 +39,15 @@ public interface IBeeHousing extends IHousing, IErrorLogicSource, IClimateProvid int getBlockLightValue(); boolean canBlockSeeTheSky(); - + boolean isRaining(); @Nullable GameProfile getOwner(); /** - * @since Forestry 4.2 * @return exact coordinates where bee particle FX should spawn from + * @since Forestry 4.2 */ Vec3d getBeeFXCoordinates(); } diff --git a/src/main/java/forestry/api/apiculture/IBeeHousingInventory.java b/src/main/java/forestry/api/apiculture/IBeeHousingInventory.java index 38362992b..5af411542 100644 --- a/src/main/java/forestry/api/apiculture/IBeeHousingInventory.java +++ b/src/main/java/forestry/api/apiculture/IBeeHousingInventory.java @@ -21,7 +21,7 @@ public interface IBeeHousingInventory { * 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 + * @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/src/main/java/forestry/api/apiculture/IBeeListener.java b/src/main/java/forestry/api/apiculture/IBeeListener.java index eaab40af2..32025d1f8 100644 --- a/src/main/java/forestry/api/apiculture/IBeeListener.java +++ b/src/main/java/forestry/api/apiculture/IBeeListener.java @@ -11,6 +11,7 @@ public interface IBeeListener { /** * Called when the bees wear out the housing's equipment. + * * @param amount Integer indicating the amount worn out. */ void wearOutEquipment(int amount); @@ -22,6 +23,7 @@ public interface IBeeListener { /** * Called when the bees have retrieved some pollen. + * * @return true if this bee listener handled the pollen. */ boolean onPollenRetrieved(IIndividual pollen); diff --git a/src/main/java/forestry/api/apiculture/IBeeModelProvider.java b/src/main/java/forestry/api/apiculture/IBeeModelProvider.java index 48ae440c7..188842b82 100644 --- a/src/main/java/forestry/api/apiculture/IBeeModelProvider.java +++ b/src/main/java/forestry/api/apiculture/IBeeModelProvider.java @@ -5,14 +5,12 @@ ******************************************************************************/ package forestry.api.apiculture; +import forestry.api.core.IModelManager; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.core.IModelManager; - public interface IBeeModelProvider { @SideOnly(Side.CLIENT) void registerModels(Item item, IModelManager manager); diff --git a/src/main/java/forestry/api/apiculture/IBeeModifier.java b/src/main/java/forestry/api/apiculture/IBeeModifier.java index 134f441d2..8f5fe283a 100644 --- a/src/main/java/forestry/api/apiculture/IBeeModifier.java +++ b/src/main/java/forestry/api/apiculture/IBeeModifier.java @@ -7,29 +7,29 @@ package forestry.api.apiculture; public interface IBeeModifier { /** - * @param genome Genome of the bee this modifier is called for. + * @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 Genome of the bee mate this modifier is called for. + * @param genome Genome of the bee this modifier is called for. + * @param mate Genome of the bee mate this modifier is called for. * @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 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 genome Genome of the bee this modifier is called for. * @param currentModifier Current modifier. * @return Float modifying the production speed of queens. */ diff --git a/src/main/java/forestry/api/apiculture/IBeeMutation.java b/src/main/java/forestry/api/apiculture/IBeeMutation.java index f0bec0fd3..afb9f14c9 100644 --- a/src/main/java/forestry/api/apiculture/IBeeMutation.java +++ b/src/main/java/forestry/api/apiculture/IBeeMutation.java @@ -8,10 +8,10 @@ package forestry.api.apiculture; import forestry.api.genetics.IMutation; public interface IBeeMutation extends IMutation { - + @Override IBeeRoot getRoot(); - + /** * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously! */ diff --git a/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java b/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java index d5508d31f..67b5b30a1 100644 --- a/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java +++ b/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java @@ -15,8 +15,8 @@ public interface IBeeMutationFactory { * * @param parentBee0 A parent bee for this mutation * @param parentBee1 A parent bee for this mutation - * @param result The resulting alleles for this mutation - * @param chance The chance that breeding the two parent bees will result in this mutation + * @param result The resulting alleles for this mutation + * @param chance The chance that breeding the two parent bees will result in this mutation * @return a new bee mutation. */ IBeeMutationBuilder createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance); diff --git a/src/main/java/forestry/api/apiculture/IHiveDrop.java b/src/main/java/forestry/api/apiculture/IHiveDrop.java index 8dc56d09c..20ee85461 100644 --- a/src/main/java/forestry/api/apiculture/IHiveDrop.java +++ b/src/main/java/forestry/api/apiculture/IHiveDrop.java @@ -13,7 +13,7 @@ import net.minecraft.world.IBlockAccess; /** * Bees can be seeded either as hive drops or as mutation results. - * + *

* Add IHiveDrops with HiveManager.get___Hive.addDrop * * @author SirSengir @@ -28,7 +28,7 @@ public interface IHiveDrop { * Chance to drop a bee or extra items. Default drops have 0.80 (= 80 %). * * @param world Minecraft world this is called for. - * @param pos Coordinates of the broken hive. + * @param pos Coordinates of the broken hive. * @return Chance for drop as a float of 0.0 - 1.0. */ double getChance(IBlockAccess world, BlockPos pos, int fortune); @@ -37,7 +37,7 @@ public interface IHiveDrop { * Chance for the princess to be ignoble. Default is around 0.4 to 0.7 (40% - 70%). * * @param world Minecraft world this is called for. - * @param pos Coordinates of the broken hive. + * @param pos Coordinates of the broken hive. * @return Chance for ignoble as a float of 0.0 - 1.0. */ double getIgnobleChance(IBlockAccess world, BlockPos pos, int fortune); diff --git a/src/main/java/forestry/api/apiculture/IHiveFrame.java b/src/main/java/forestry/api/apiculture/IHiveFrame.java index b9919b4ae..676804ac3 100644 --- a/src/main/java/forestry/api/apiculture/IHiveFrame.java +++ b/src/main/java/forestry/api/apiculture/IHiveFrame.java @@ -15,9 +15,9 @@ public interface IHiveFrame { * 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. + * @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, or null if it has been broken. */ @Nullable diff --git a/src/main/java/forestry/api/apiculture/IJubilanceFactory.java b/src/main/java/forestry/api/apiculture/IJubilanceFactory.java index 1710fd4c6..dedd56c48 100644 --- a/src/main/java/forestry/api/apiculture/IJubilanceFactory.java +++ b/src/main/java/forestry/api/apiculture/IJubilanceFactory.java @@ -8,9 +8,13 @@ package forestry.api.apiculture; import net.minecraft.block.state.IBlockState; public interface IJubilanceFactory { - /** The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. */ + /** + * The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. + */ IJubilanceProvider getDefault(); - /** The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive. */ + /** + * The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive. + */ IJubilanceProvider getRequiresResource(IBlockState... acceptedBlockStates); } diff --git a/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java b/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java index d86694608..76ce1badd 100644 --- a/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java +++ b/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java @@ -7,14 +7,13 @@ package forestry.api.apiculture.hives; import java.util.Random; +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; - public interface IHiveDescription { /** diff --git a/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java b/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java index b4741a2a7..faa8a2fb5 100644 --- a/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java +++ b/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java @@ -5,10 +5,9 @@ ******************************************************************************/ package forestry.api.arboriculture; -import net.minecraft.util.text.translation.I18n; - import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IFruitFamily; +import net.minecraft.util.text.translation.I18n; public enum EnumFruitFamily implements IFruitFamily { PRUNES("prunes", "Prunus domestica"), diff --git a/src/main/java/forestry/api/arboriculture/EnumGermlingType.java b/src/main/java/forestry/api/arboriculture/EnumGermlingType.java index 7485657e5..2e082625a 100644 --- a/src/main/java/forestry/api/arboriculture/EnumGermlingType.java +++ b/src/main/java/forestry/api/arboriculture/EnumGermlingType.java @@ -11,7 +11,7 @@ public enum EnumGermlingType implements ISpeciesType { SAPLING("sapling"), POLLEN("pollen"); public static final EnumGermlingType[] VALUES = values(); - + private final String name; EnumGermlingType(String name) { diff --git a/src/main/java/forestry/api/arboriculture/EnumPileType.java b/src/main/java/forestry/api/arboriculture/EnumPileType.java index 30353ff1a..5226e143e 100644 --- a/src/main/java/forestry/api/arboriculture/EnumPileType.java +++ b/src/main/java/forestry/api/arboriculture/EnumPileType.java @@ -5,10 +5,10 @@ ******************************************************************************/ package forestry.api.arboriculture; -public enum EnumPileType{ +public enum EnumPileType { WOOD, DIRT, ASH; - + public static final EnumPileType[] VALUES = values(); } diff --git a/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java b/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java index 61c075409..61969dae0 100644 --- a/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java +++ b/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java @@ -51,15 +51,15 @@ public enum EnumTreeChromosome implements IChromosomeType { * 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),; - + private final Class alleleClass; - + EnumTreeChromosome(Class alleleClass) { this.alleleClass = alleleClass; } diff --git a/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java b/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java index ff7608c8f..992333ea3 100644 --- a/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java +++ b/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java @@ -5,11 +5,10 @@ ******************************************************************************/ package forestry.api.arboriculture; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.genetics.IAlleleEffect; import forestry.api.genetics.IEffectData; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; /** * Simple allele encapsulating a leaf effect. (Not implemented) diff --git a/src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java b/src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java index 74a52b991..6dd956b64 100644 --- a/src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java +++ b/src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java @@ -7,23 +7,21 @@ package forestry.api.arboriculture; import java.util.Collection; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; - -import net.minecraftforge.common.EnumPlantType; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.api.core.IModelManager; import forestry.api.genetics.IAlleleProperty; import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IFruitFamily; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public interface IAlleleTreeSpecies extends IAlleleSpecies, IAlleleProperty { - + @Override ITreeRoot getRoot(); - + /** * @return Native plant type of this species. */ @@ -38,24 +36,24 @@ public interface IAlleleTreeSpecies extends IAlleleSpecies, IAlleleProperty * If you implement your own, be sure to register the icons. * Icon registration is not done here because these icons are heavily reused. */ diff --git a/src/main/java/forestry/api/arboriculture/IToolGrafter.java b/src/main/java/forestry/api/arboriculture/IToolGrafter.java index d2d03eeda..e147b5231 100644 --- a/src/main/java/forestry/api/arboriculture/IToolGrafter.java +++ b/src/main/java/forestry/api/arboriculture/IToolGrafter.java @@ -16,7 +16,7 @@ public interface IToolGrafter { * * @param stack ItemStack containing the grafter. * @param world Minecraft world the player and the target block inhabit. - * @param pos Coordinate of the broken leaf block. + * @param pos 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, BlockPos pos); diff --git a/src/main/java/forestry/api/arboriculture/ITreeFactory.java b/src/main/java/forestry/api/arboriculture/ITreeFactory.java index 1012b0141..934491e45 100644 --- a/src/main/java/forestry/api/arboriculture/ITreeFactory.java +++ b/src/main/java/forestry/api/arboriculture/ITreeFactory.java @@ -16,22 +16,24 @@ public interface ITreeFactory { * Automatically registered with AlleleManager.alleleRegistry.registerAllele() * See IAlleleTreeSpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species. * - * @param uid Unique Identifier for this species - * @param unlocalizedName Unlocalized name for this species - * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. + * @param uid Unique Identifier for this species + * @param unlocalizedName Unlocalized name for this species + * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. * @param unlocalizedDescription Unlocalized description for this species - * @param dominant Whether this species is genetically dominant (false means it is recessive) - * @param branch Classification of this species - * @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. - * @param modID The modID from the mod of the species - * @param leafSpriteProvider The leaf sprite provider for this species - * @param germlingModelProvider The germling model provider for this species - * @param woodProvider The wood texture provider. It is used to get wood textures for the charcoal pile. - * @param generator The tree generator + * @param dominant Whether this species is genetically dominant (false means it is recessive) + * @param branch Classification of this species + * @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. + * @param modID The modID from the mod of the species + * @param leafSpriteProvider The leaf sprite provider for this species + * @param germlingModelProvider The germling model provider for this species + * @param woodProvider The wood texture provider. It is used to get wood textures for the charcoal pile. + * @param generator The tree generator * @return a new tree species allele. */ IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String modID, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, @Nonnull IWoodProvider woodProvider, ITreeGenerator generator); - /** Get one of the built-in Forestry leaf types. Default type is deciduous. */ + /** + * Get one of the built-in Forestry leaf types. Default type is deciduous. + */ ILeafSpriteProvider getLeafIconProvider(EnumLeafType enumLeafType, Color color, Color colorPollinated); } diff --git a/src/main/java/forestry/api/arboriculture/ITreeGenerator.java b/src/main/java/forestry/api/arboriculture/ITreeGenerator.java index cc25fbe6b..e97e44ef8 100644 --- a/src/main/java/forestry/api/arboriculture/ITreeGenerator.java +++ b/src/main/java/forestry/api/arboriculture/ITreeGenerator.java @@ -7,15 +7,13 @@ package forestry.api.arboriculture; import javax.annotation.Nullable; +import com.mojang.authlib.GameProfile; +import forestry.api.world.ITreeGenData; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; -import com.mojang.authlib.GameProfile; - -import forestry.api.world.ITreeGenData; - /** * Implements the tree generation for a tree species. */ diff --git a/src/main/java/forestry/api/arboriculture/ITreeGenome.java b/src/main/java/forestry/api/arboriculture/ITreeGenome.java index e895f47d6..1ad26cb5b 100644 --- a/src/main/java/forestry/api/arboriculture/ITreeGenome.java +++ b/src/main/java/forestry/api/arboriculture/ITreeGenome.java @@ -14,7 +14,7 @@ public interface ITreeGenome extends IGenome { @Override IAlleleTreeSpecies getSecondary(); - + IFruitProvider getFruitProvider(); float getHeight(); @@ -23,7 +23,7 @@ public interface ITreeGenome extends IGenome { /** * @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 + * IFruitProvider */ float getYield(); diff --git a/src/main/java/forestry/api/arboriculture/ITreeModifier.java b/src/main/java/forestry/api/arboriculture/ITreeModifier.java index ba4bd21d5..4a4b724cd 100644 --- a/src/main/java/forestry/api/arboriculture/ITreeModifier.java +++ b/src/main/java/forestry/api/arboriculture/ITreeModifier.java @@ -8,28 +8,24 @@ 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. */ diff --git a/src/main/java/forestry/api/arboriculture/ITreeMutation.java b/src/main/java/forestry/api/arboriculture/ITreeMutation.java index a6950cd74..55e431e87 100644 --- a/src/main/java/forestry/api/arboriculture/ITreeMutation.java +++ b/src/main/java/forestry/api/arboriculture/ITreeMutation.java @@ -5,14 +5,13 @@ ******************************************************************************/ package forestry.api.arboriculture; +import forestry.api.genetics.IMutation; +import forestry.api.genetics.ISpeciesRoot; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.genetics.IMutation; -import forestry.api.genetics.ISpeciesRoot; - public interface ITreeMutation extends IMutation { - + /** * @return {@link ISpeciesRoot} this mutation is associated with. */ diff --git a/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java b/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java index 9673dee3e..221ddb95f 100644 --- a/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java +++ b/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java @@ -15,8 +15,8 @@ public interface ITreeMutationFactory { * * @param parentTree0 A parent tree for this mutation * @param parentTree1 A parent tree for this mutation - * @param result The resulting alleles for this mutation - * @param chance The chance that breeding the two parent trees will result in this mutation + * @param result The resulting alleles for this mutation + * @param chance The chance that breeding the two parent trees will result in this mutation * @return a new tree mutation. */ ITreeMutationBuilder createMutation(IAlleleTreeSpecies parentTree0, IAlleleTreeSpecies parentTree1, IAllele[] result, int chance); diff --git a/src/main/java/forestry/api/arboriculture/IWoodAccess.java b/src/main/java/forestry/api/arboriculture/IWoodAccess.java index 11a59ad9d..06abffac0 100644 --- a/src/main/java/forestry/api/arboriculture/IWoodAccess.java +++ b/src/main/java/forestry/api/arboriculture/IWoodAccess.java @@ -24,7 +24,7 @@ public interface IWoodAccess { ItemStack getStack(IWoodType woodType, WoodBlockKind kind, boolean fireproof); IBlockState getBlock(IWoodType woodType, WoodBlockKind kind, boolean fireproof); - + List getRegisteredWoodTypes(); } diff --git a/src/main/java/forestry/api/arboriculture/IWoodItemMeshDefinition.java b/src/main/java/forestry/api/arboriculture/IWoodItemMeshDefinition.java index 089a10a5a..8dedfa094 100644 --- a/src/main/java/forestry/api/arboriculture/IWoodItemMeshDefinition.java +++ b/src/main/java/forestry/api/arboriculture/IWoodItemMeshDefinition.java @@ -15,5 +15,5 @@ import net.minecraftforge.fml.relauncher.SideOnly; public interface IWoodItemMeshDefinition extends ItemMeshDefinition { ResourceLocation getDefaultModelLocation(ItemStack stack); - + } diff --git a/src/main/java/forestry/api/arboriculture/IWoodStateMapper.java b/src/main/java/forestry/api/arboriculture/IWoodStateMapper.java index 49621ddf1..f9271a61b 100644 --- a/src/main/java/forestry/api/arboriculture/IWoodStateMapper.java +++ b/src/main/java/forestry/api/arboriculture/IWoodStateMapper.java @@ -13,9 +13,9 @@ import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public interface IWoodStateMapper extends IStateMapper { - + ModelResourceLocation getModelLocation(IBlockState state); - + ModelResourceLocation getDefaultModelResourceLocation(IBlockState state); } diff --git a/src/main/java/forestry/api/arboriculture/IWoodType.java b/src/main/java/forestry/api/arboriculture/IWoodType.java index 25ef85c2e..4fc8bd3d3 100644 --- a/src/main/java/forestry/api/arboriculture/IWoodType.java +++ b/src/main/java/forestry/api/arboriculture/IWoodType.java @@ -12,16 +12,16 @@ public interface IWoodType extends IStringSerializable { float getHardness(); int getCarbonization(); - + float getCharcoalChance(int numberOfCharcoal); - + String getPlankTexture(); - + String getDoorLowerTexture(); - + String getDoorUpperTexture(); - + String getBarkTexture(); - + String getHeartTexture(); } diff --git a/src/main/java/forestry/api/circuits/ICircuitLayout.java b/src/main/java/forestry/api/circuits/ICircuitLayout.java index a4c3e358b..7476e319f 100644 --- a/src/main/java/forestry/api/circuits/ICircuitLayout.java +++ b/src/main/java/forestry/api/circuits/ICircuitLayout.java @@ -7,13 +7,19 @@ package forestry.api.circuits; public interface ICircuitLayout { - /** unique ID for this circuit layout */ + /** + * unique ID for this circuit layout + */ String getUID(); - /** localized name for this circuit layout */ + /** + * localized name for this circuit layout + */ String getName(); - /** localized string for how this circuit layout is used */ + /** + * localized string for how this circuit layout is used + */ String getUsage(); /** diff --git a/src/main/java/forestry/api/circuits/ICircuitSocketType.java b/src/main/java/forestry/api/circuits/ICircuitSocketType.java index 60250f712..6de4d3645 100644 --- a/src/main/java/forestry/api/circuits/ICircuitSocketType.java +++ b/src/main/java/forestry/api/circuits/ICircuitSocketType.java @@ -10,9 +10,13 @@ package forestry.api.circuits; * See CircuitSocketType for Forestry's uses. */ public interface ICircuitSocketType { - /** unique identifier for this socket type */ + /** + * unique identifier for this socket type + */ String getUid(); - /** comparison using uid */ + /** + * comparison using uid + */ boolean equals(ICircuitSocketType socketType); } diff --git a/src/main/java/forestry/api/climate/EnumClimatiserModes.java b/src/main/java/forestry/api/climate/EnumClimatiserModes.java index d7c6ec0f9..70c9b3137 100644 --- a/src/main/java/forestry/api/climate/EnumClimatiserModes.java +++ b/src/main/java/forestry/api/climate/EnumClimatiserModes.java @@ -3,5 +3,5 @@ package forestry.api.climate; public enum EnumClimatiserModes { POSITIVE, NEGATIVE, NONE - + } diff --git a/src/main/java/forestry/api/climate/EnumClimatiserTypes.java b/src/main/java/forestry/api/climate/EnumClimatiserTypes.java index 954949fe8..f79066ebd 100644 --- a/src/main/java/forestry/api/climate/EnumClimatiserTypes.java +++ b/src/main/java/forestry/api/climate/EnumClimatiserTypes.java @@ -3,5 +3,5 @@ package forestry.api.climate; public enum EnumClimatiserTypes { TEMPERATURE, HUMIDITY, NONE - + } diff --git a/src/main/java/forestry/api/climate/IClimateControl.java b/src/main/java/forestry/api/climate/IClimateControl.java index 5cc9b79a0..a49369bac 100644 --- a/src/main/java/forestry/api/climate/IClimateControl.java +++ b/src/main/java/forestry/api/climate/IClimateControl.java @@ -7,12 +7,12 @@ package forestry.api.climate; public interface IClimateControl { - float getControlTemperature(); + float getControlTemperature(); - float getControlHumidity(); - - void setControlTemperature(float temperature); + float getControlHumidity(); + + void setControlTemperature(float temperature); + + void setControlHumidity(float humidity); - void setControlHumidity(float humidity); - } diff --git a/src/main/java/forestry/api/climate/IClimateControlProvider.java b/src/main/java/forestry/api/climate/IClimateControlProvider.java index 72144cfa4..c6c4d4d12 100644 --- a/src/main/java/forestry/api/climate/IClimateControlProvider.java +++ b/src/main/java/forestry/api/climate/IClimateControlProvider.java @@ -10,5 +10,5 @@ import forestry.api.core.ILocatable; public interface IClimateControlProvider extends ILocatable { IClimateControl getClimateControl(); - + } diff --git a/src/main/java/forestry/api/climate/IClimatePosition.java b/src/main/java/forestry/api/climate/IClimatePosition.java index 2afd74766..6acb7e021 100644 --- a/src/main/java/forestry/api/climate/IClimatePosition.java +++ b/src/main/java/forestry/api/climate/IClimatePosition.java @@ -14,17 +14,17 @@ public interface IClimatePosition extends INbtReadable, INbtWritable { IClimateRegion getClimateRegion(); BlockPos getPos(); - + void setTemperature(float temperature); - + void addTemperature(float temperature); - + float getTemperature(); void setHumidity(float humidity); - + void addHumidity(float humidity); - + float getHumidity(); } diff --git a/src/main/java/forestry/api/climate/IClimateProvider.java b/src/main/java/forestry/api/climate/IClimateProvider.java index 061e3de65..027111f69 100644 --- a/src/main/java/forestry/api/climate/IClimateProvider.java +++ b/src/main/java/forestry/api/climate/IClimateProvider.java @@ -10,9 +10,9 @@ import forestry.api.core.EnumTemperature; import net.minecraft.world.biome.Biome; public interface IClimateProvider { - Biome getBiome(); + Biome getBiome(); - EnumTemperature getTemperature(); + EnumTemperature getTemperature(); - EnumHumidity getHumidity(); + EnumHumidity getHumidity(); } diff --git a/src/main/java/forestry/api/climate/IClimateSource.java b/src/main/java/forestry/api/climate/IClimateSource.java index a7a8f7ed7..99b23026b 100644 --- a/src/main/java/forestry/api/climate/IClimateSource.java +++ b/src/main/java/forestry/api/climate/IClimateSource.java @@ -14,7 +14,7 @@ public interface IClimateSource { /** * @param tickCount The current tick count. - * @param region The climate region, in that the source stands. + * @param region The climate region, in that the source stands. * @return Return true if the the climate has changed. */ boolean changeClimate(int tickCount, IClimateRegion region); diff --git a/src/main/java/forestry/api/climate/IClimateSourceProvider.java b/src/main/java/forestry/api/climate/IClimateSourceProvider.java index f4c9cc985..f62561beb 100644 --- a/src/main/java/forestry/api/climate/IClimateSourceProvider.java +++ b/src/main/java/forestry/api/climate/IClimateSourceProvider.java @@ -8,6 +8,6 @@ package forestry.api.climate; import forestry.api.core.ILocatable; public interface IClimateSourceProvider extends ILocatable { - + IClimateSource getClimateSource(); } diff --git a/src/main/java/forestry/api/climate/IClimatiserDefinition.java b/src/main/java/forestry/api/climate/IClimatiserDefinition.java index 4d0a76733..4709b6928 100644 --- a/src/main/java/forestry/api/climate/IClimatiserDefinition.java +++ b/src/main/java/forestry/api/climate/IClimatiserDefinition.java @@ -8,11 +8,11 @@ package forestry.api.climate; public interface IClimatiserDefinition { float getChange(); - + double getRange(); - + EnumClimatiserModes getMode(); - + EnumClimatiserTypes getType(); - + } diff --git a/src/main/java/forestry/api/core/BiomeHelper.java b/src/main/java/forestry/api/core/BiomeHelper.java index fa576d735..8a3002124 100644 --- a/src/main/java/forestry/api/core/BiomeHelper.java +++ b/src/main/java/forestry/api/core/BiomeHelper.java @@ -4,7 +4,6 @@ import java.util.HashMap; import java.util.Map; import net.minecraft.world.biome.Biome; - import net.minecraftforge.common.BiomeDictionary; public class BiomeHelper { @@ -14,6 +13,7 @@ public class BiomeHelper { /** * Determines if a given Biome is of HELLISH temperature, since it is treated separately from actual temperature values. * Uses the BiomeDictionary. + * * @param biomeGen Biome of the biome in question * @return true, if the Biome is a Nether-type biome; false otherwise. */ diff --git a/src/main/java/forestry/api/core/CamouflageManager.java b/src/main/java/forestry/api/core/CamouflageManager.java index b8e034714..87cdcbdc8 100644 --- a/src/main/java/forestry/api/core/CamouflageManager.java +++ b/src/main/java/forestry/api/core/CamouflageManager.java @@ -6,13 +6,13 @@ package forestry.api.core; public class CamouflageManager { - + public static ICamouflageAccess camouflageAccess; - + public static final String DEFAULT = "default"; - + public static final String GLASS = "glass"; - + public static final String DOOR = "door"; } diff --git a/src/main/java/forestry/api/core/EnumHumidity.java b/src/main/java/forestry/api/core/EnumHumidity.java index c234c6b62..f546bb59c 100644 --- a/src/main/java/forestry/api/core/EnumHumidity.java +++ b/src/main/java/forestry/api/core/EnumHumidity.java @@ -8,14 +8,16 @@ package forestry.api.core; import net.minecraft.world.biome.Biome; /** - * 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. + * 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"), - /** matches {@link Biome#isHighHumidity()} */ + /** + * matches {@link Biome#isHighHumidity()} + */ DAMP("Damp"); public final String name; diff --git a/src/main/java/forestry/api/core/EnumTemperature.java b/src/main/java/forestry/api/core/EnumTemperature.java index 8e48f5586..6dc68cc0f 100644 --- a/src/main/java/forestry/api/core/EnumTemperature.java +++ b/src/main/java/forestry/api/core/EnumTemperature.java @@ -9,14 +9,13 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.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. + * 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"), @@ -43,6 +42,7 @@ public enum EnumTemperature { * 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 */ diff --git a/src/main/java/forestry/api/core/ForestryAPI.java b/src/main/java/forestry/api/core/ForestryAPI.java index 2ba4f1f2a..8c26b65c5 100644 --- a/src/main/java/forestry/api/core/ForestryAPI.java +++ b/src/main/java/forestry/api/core/ForestryAPI.java @@ -13,21 +13,21 @@ import net.minecraftforge.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. + *

+ * .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 { @@ -41,13 +41,13 @@ public class ForestryAPI { */ @SideOnly(Side.CLIENT) public static ITextureManager textureManager; - + /** * A {@link IModelManager} needed for some things in the API. */ @SideOnly(Side.CLIENT) public static IModelManager modelManager; - + public static IClimateManager climateManager; /** diff --git a/src/main/java/forestry/api/core/ForestryEvent.java b/src/main/java/forestry/api/core/ForestryEvent.java index 9f98086d8..5c4d6900c 100644 --- a/src/main/java/forestry/api/core/ForestryEvent.java +++ b/src/main/java/forestry/api/core/ForestryEvent.java @@ -5,16 +5,13 @@ ******************************************************************************/ package forestry.api.core; -import net.minecraft.entity.player.EntityPlayer; - import com.mojang.authlib.GameProfile; - -import net.minecraftforge.fml.common.eventhandler.Event; - import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IBreedingTracker; import forestry.api.genetics.IMutation; import forestry.api.genetics.ISpeciesRoot; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.fml.common.eventhandler.Event; public abstract class ForestryEvent extends Event { diff --git a/src/main/java/forestry/api/core/ICamouflageHandler.java b/src/main/java/forestry/api/core/ICamouflageHandler.java index 0cebda50f..034c464c1 100644 --- a/src/main/java/forestry/api/core/ICamouflageHandler.java +++ b/src/main/java/forestry/api/core/ICamouflageHandler.java @@ -12,21 +12,22 @@ public interface ICamouflageHandler extends ILocatable { /** * @return The item of the block that is the camouflage of this handler for the type. */ - ItemStack getCamouflageBlock(String type); + ItemStack getCamouflageBlock(String type); - /** - * @return The default camouflage block item for the type. - */ - ItemStack getDefaultCamouflageBlock(String type); + /** + * @return The default camouflage block item for the type. + */ + ItemStack getDefaultCamouflageBlock(String type); - /** - * @return True if the handler can handle this type of camouflage. - */ - boolean canHandleType(String type); + /** + * @return True if the handler can handle this type of camouflage. + */ + boolean canHandleType(String type); - /** - * Set the camouflage block item for the type. - * @return True if the block has chanced. - */ - boolean setCamouflageBlock(String type, ItemStack camouflageBlock, boolean sendClientUpdate); + /** + * Set the camouflage block item for the type. + * + * @return True if the block has chanced. + */ + boolean setCamouflageBlock(String type, ItemStack camouflageBlock, boolean sendClientUpdate); } diff --git a/src/main/java/forestry/api/core/ICamouflagedTile.java b/src/main/java/forestry/api/core/ICamouflagedTile.java index c5dbb72b2..b7aacfa41 100644 --- a/src/main/java/forestry/api/core/ICamouflagedTile.java +++ b/src/main/java/forestry/api/core/ICamouflagedTile.java @@ -10,7 +10,7 @@ import net.minecraft.util.math.BlockPos; public interface ICamouflagedTile { String getCamouflageType(); - + BlockPos getCoordinates(); - + } diff --git a/src/main/java/forestry/api/core/IErrorLogic.java b/src/main/java/forestry/api/core/IErrorLogic.java index 45e180618..2a9f3a759 100644 --- a/src/main/java/forestry/api/core/IErrorLogic.java +++ b/src/main/java/forestry/api/core/IErrorLogic.java @@ -5,8 +5,6 @@ ******************************************************************************/ package forestry.api.core; -import java.io.IOException; - import net.minecraft.network.PacketBuffer; /** @@ -17,6 +15,7 @@ public interface IErrorLogic extends IErrorSource { /** * Sets the errorState when condition is true, and unsets it when condition is false. + * * @return condition */ boolean setCondition(boolean condition, IErrorState errorState); diff --git a/src/main/java/forestry/api/core/IErrorState.java b/src/main/java/forestry/api/core/IErrorState.java index 0442dd8e1..373bf63d8 100644 --- a/src/main/java/forestry/api/core/IErrorState.java +++ b/src/main/java/forestry/api/core/IErrorState.java @@ -10,13 +10,12 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; /** - * * @author CovertJaguar */ public interface IErrorState { - + short getID(); - + String getUniqueName(); String getUnlocalizedDescription(); diff --git a/src/main/java/forestry/api/core/IForestryConstants.java b/src/main/java/forestry/api/core/IForestryConstants.java index 4ae88b88b..be58b7b8e 100644 --- a/src/main/java/forestry/api/core/IForestryConstants.java +++ b/src/main/java/forestry/api/core/IForestryConstants.java @@ -6,7 +6,6 @@ package forestry.api.core; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.event.LootTableLoadEvent; public interface IForestryConstants { @@ -15,12 +14,12 @@ public interface IForestryConstants { * @return The villager ID for the Apiarist Villager. */ String getApicultureVillagerID(); - + /** * @return The villager ID for the Arborist Villager. */ String getArboricultureVillagerID(); - + /** * @return The {@link LootTableLoadEvent} key for adding items to the Forestry Villager chest. */ diff --git a/src/main/java/forestry/api/core/IGameMode.java b/src/main/java/forestry/api/core/IGameMode.java index 270751a5a..41c472c2f 100644 --- a/src/main/java/forestry/api/core/IGameMode.java +++ b/src/main/java/forestry/api/core/IGameMode.java @@ -17,7 +17,7 @@ public interface IGameMode { * @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. diff --git a/src/main/java/forestry/api/core/IItemModelRegister.java b/src/main/java/forestry/api/core/IItemModelRegister.java index 85897293c..57aa51a6c 100644 --- a/src/main/java/forestry/api/core/IItemModelRegister.java +++ b/src/main/java/forestry/api/core/IItemModelRegister.java @@ -6,7 +6,6 @@ package forestry.api.core; import net.minecraft.item.Item; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,5 +13,5 @@ public interface IItemModelRegister { @SideOnly(Side.CLIENT) void registerModel(Item item, IModelManager manager); - + } diff --git a/src/main/java/forestry/api/core/ILocatable.java b/src/main/java/forestry/api/core/ILocatable.java index 5bc76aa9c..dae1dfa12 100644 --- a/src/main/java/forestry/api/core/ILocatable.java +++ b/src/main/java/forestry/api/core/ILocatable.java @@ -16,6 +16,8 @@ import net.minecraft.world.World; public interface ILocatable { BlockPos getCoordinates(); - /** Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12 */ + /** + * Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12 + */ World getWorldObj(); } diff --git a/src/main/java/forestry/api/core/IModelBakerModel.java b/src/main/java/forestry/api/core/IModelBakerModel.java index 04aa47a06..00cd64966 100644 --- a/src/main/java/forestry/api/core/IModelBakerModel.java +++ b/src/main/java/forestry/api/core/IModelBakerModel.java @@ -11,7 +11,6 @@ import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.util.EnumFacing; import net.minecraftforge.client.model.IPerspectiveAwareModel; -import net.minecraftforge.common.model.IModelState; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/forestry/api/core/IModelManager.java b/src/main/java/forestry/api/core/IModelManager.java index ca82be150..3c4a898b6 100644 --- a/src/main/java/forestry/api/core/IModelManager.java +++ b/src/main/java/forestry/api/core/IModelManager.java @@ -13,19 +13,19 @@ import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public interface IModelManager { - + void registerItemModel(Item item, int meta, String modifier, String identifier); - + void registerItemModel(Item item, int meta, String identifier); - + void registerItemModel(Item item, int meta); - + ModelResourceLocation getModelLocation(Item item); - + ModelResourceLocation getModelLocation(String identifier); - + ModelResourceLocation getModelLocation(String modID, String identifier); - + void registerItemModel(Item item, ItemMeshDefinition definition); - + } diff --git a/src/main/java/forestry/api/core/ISpriteRegister.java b/src/main/java/forestry/api/core/ISpriteRegister.java index 6f09c58f6..e54d4dd66 100644 --- a/src/main/java/forestry/api/core/ISpriteRegister.java +++ b/src/main/java/forestry/api/core/ISpriteRegister.java @@ -12,5 +12,5 @@ public interface ISpriteRegister { @SideOnly(Side.CLIENT) void registerSprites(ITextureManager manager); - + } diff --git a/src/main/java/forestry/api/core/IStateMapperRegister.java b/src/main/java/forestry/api/core/IStateMapperRegister.java index da2564f00..2ba27074d 100644 --- a/src/main/java/forestry/api/core/IStateMapperRegister.java +++ b/src/main/java/forestry/api/core/IStateMapperRegister.java @@ -12,5 +12,5 @@ public interface IStateMapperRegister { @SideOnly(Side.CLIENT) void registerStateMapper(); - + } diff --git a/src/main/java/forestry/api/core/IToolScoop.java b/src/main/java/forestry/api/core/IToolScoop.java index 1db380a1d..c954826f7 100644 --- a/src/main/java/forestry/api/core/IToolScoop.java +++ b/src/main/java/forestry/api/core/IToolScoop.java @@ -6,7 +6,7 @@ package forestry.api.core; /** - * Marks a tool as a scoop. + * Marks a tool as a scoop. */ public interface IToolScoop { diff --git a/src/main/java/forestry/api/core/Tabs.java b/src/main/java/forestry/api/core/Tabs.java index dc5bbdb09..556a2ce3b 100644 --- a/src/main/java/forestry/api/core/Tabs.java +++ b/src/main/java/forestry/api/core/Tabs.java @@ -8,7 +8,7 @@ package forestry.api.core; import net.minecraft.creativetab.CreativeTabs; /** - * References to the specialised tabs added by Forestry to creative inventory. + * References to the specialised tabs added by Forestry to creative inventory. */ public class Tabs { diff --git a/src/main/java/forestry/api/farming/Farmables.java b/src/main/java/forestry/api/farming/Farmables.java index f949570ec..1b811c041 100644 --- a/src/main/java/forestry/api/farming/Farmables.java +++ b/src/main/java/forestry/api/farming/Farmables.java @@ -5,14 +5,13 @@ ******************************************************************************/ package forestry.api.farming; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -import net.minecraft.item.ItemStack; - import java.util.LinkedHashMap; import java.util.Map; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; +import net.minecraft.item.ItemStack; + public class Farmables { /** * Can be used to add IFarmables to some of the vanilla farm logics. @@ -20,7 +19,7 @@ public class Farmables { * Identifiers: farmArboreal farmWheat farmGourd farmInfernal farmPoales farmSucculentes farmVegetables farmShroom */ public static final Multimap farmables = HashMultimap.create(); - + public static final Map fertilizers = new LinkedHashMap<>(); } diff --git a/src/main/java/forestry/api/farming/IFarmHousing.java b/src/main/java/forestry/api/farming/IFarmHousing.java index 531785688..ba5708d9e 100644 --- a/src/main/java/forestry/api/farming/IFarmHousing.java +++ b/src/main/java/forestry/api/farming/IFarmHousing.java @@ -5,14 +5,12 @@ ******************************************************************************/ package forestry.api.farming; +import forestry.api.core.IErrorLogicSource; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3i; import net.minecraft.world.World; - import net.minecraftforge.fluids.FluidStack; -import forestry.api.core.IErrorLogicSource; - public interface IFarmHousing extends IErrorLogicSource { BlockPos getCoords(); diff --git a/src/main/java/forestry/api/farming/IFarmListener.java b/src/main/java/forestry/api/farming/IFarmListener.java index 01bdff53b..29b975132 100644 --- a/src/main/java/forestry/api/farming/IFarmListener.java +++ b/src/main/java/forestry/api/farming/IFarmListener.java @@ -25,7 +25,7 @@ public interface IFarmListener { * 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} + * @param crop Harvested {@link ICrop} */ void afterCropHarvest(Collection harvested, ICrop crop); diff --git a/src/main/java/forestry/api/farming/IFarmLogic.java b/src/main/java/forestry/api/farming/IFarmLogic.java index cf6729497..4ddfecb3d 100644 --- a/src/main/java/forestry/api/farming/IFarmLogic.java +++ b/src/main/java/forestry/api/farming/IFarmLogic.java @@ -12,7 +12,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -33,12 +32,12 @@ public interface IFarmLogic { Collection harvest(World world, BlockPos pos, FarmDirection direction, int extent); IFarmLogic setManual(boolean manual); - + @SideOnly(Side.CLIENT) ResourceLocation getTextureMap(); - + String getName(); - + /** * @return the itemStack that represents this farm logic. Used as an icon for the farm logic. */ diff --git a/src/main/java/forestry/api/fuels/FuelManager.java b/src/main/java/forestry/api/fuels/FuelManager.java index 16a039633..9c02f71e1 100644 --- a/src/main/java/forestry/api/fuels/FuelManager.java +++ b/src/main/java/forestry/api/fuels/FuelManager.java @@ -8,7 +8,6 @@ package forestry.api.fuels; import java.util.Map; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.Fluid; public class FuelManager { diff --git a/src/main/java/forestry/api/genetics/AlleleManager.java b/src/main/java/forestry/api/genetics/AlleleManager.java index 7fc3839a5..53ef0cbaa 100644 --- a/src/main/java/forestry/api/genetics/AlleleManager.java +++ b/src/main/java/forestry/api/genetics/AlleleManager.java @@ -12,7 +12,7 @@ import net.minecraft.block.Block; import net.minecraft.item.Item; /** - * Holds a static reference to the {@link IAlleleRegistry}. + * Holds a static reference to the {@link IAlleleRegistry}. */ public class AlleleManager { /** diff --git a/src/main/java/forestry/api/genetics/AlleleSpeciesRegisterEvent.java b/src/main/java/forestry/api/genetics/AlleleSpeciesRegisterEvent.java index 329e4865b..1362033d5 100644 --- a/src/main/java/forestry/api/genetics/AlleleSpeciesRegisterEvent.java +++ b/src/main/java/forestry/api/genetics/AlleleSpeciesRegisterEvent.java @@ -6,13 +6,13 @@ import net.minecraftforge.fml.common.eventhandler.Event; * Called after Forestry has registered all his species alleles of a individual. */ public class AlleleSpeciesRegisterEvent extends Event { - + private final ISpeciesRoot root; - + public AlleleSpeciesRegisterEvent(ISpeciesRoot root) { this.root = root; } - + public ISpeciesRoot getRoot() { return root; } diff --git a/src/main/java/forestry/api/genetics/IAllele.java b/src/main/java/forestry/api/genetics/IAllele.java index 5c79d0842..27c01ab32 100644 --- a/src/main/java/forestry/api/genetics/IAllele.java +++ b/src/main/java/forestry/api/genetics/IAllele.java @@ -7,9 +7,9 @@ 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 @@ -25,7 +25,7 @@ public interface IAllele { * @return true if the allele is dominant, false otherwise. */ boolean isDominant(); - + /** * @return Localized short, human-readable identifier used in tooltips and beealyzer. */ diff --git a/src/main/java/forestry/api/genetics/IAlleleEffect.java b/src/main/java/forestry/api/genetics/IAlleleEffect.java index dfe7749ae..aa5388b7e 100644 --- a/src/main/java/forestry/api/genetics/IAlleleEffect.java +++ b/src/main/java/forestry/api/genetics/IAlleleEffect.java @@ -5,15 +5,13 @@ ******************************************************************************/ package forestry.api.genetics; -import javax.annotation.Nullable; - /** - * Basic effect allele. + * 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. + * combinable. */ boolean isCombinable(); diff --git a/src/main/java/forestry/api/genetics/IAlleleFactory.java b/src/main/java/forestry/api/genetics/IAlleleFactory.java index 4a2c1aecc..ad23dfeea 100644 --- a/src/main/java/forestry/api/genetics/IAlleleFactory.java +++ b/src/main/java/forestry/api/genetics/IAlleleFactory.java @@ -4,71 +4,71 @@ import net.minecraft.util.math.Vec3i; /** * Creates new alleles with smart localization. - * - * + *

+ *

* UID is created like this: - * modId + '.' + category + WordUtils.capitalize(valueName); + * modId + '.' + category + WordUtils.capitalize(valueName); * For Example: - * modId:forestry, category:height, valueName:smallest => forestry.heightSmallest + * modId:forestry, category:height, valueName:smallest => forestry.heightSmallest * This is mainly for legacy compatibility and may change in future major versions. - * - * + *

+ *

* The default localization uses: * [modId].allele.[valueName] - * + *

* Languages that need category-specific names can override it by defining: * [modId].allele.[category].[valueName] - * + *

* For example: * en_US - * forestry.allele.smallest=Smallest + * forestry.allele.smallest=Smallest * ru_RU - * forestry.allele.smallest=????? ????????? - * forestry.allele.height.smallest=????? ?????? + * forestry.allele.smallest=????? ????????? + * forestry.allele.height.smallest=????? ?????? */ public interface IAlleleFactory { /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "height") - * @param valueName allele value name for uid and localization (i.e. "smallest") - * @param value allele float value + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "height") + * @param valueName allele value name for uid and localization (i.e. "smallest") + * @param value allele float value * @param isDominant allele dominance - * @param types allele chromosome type for registration (i.e. EnumTreeChromosome.HEIGHT) + * @param types allele chromosome type for registration (i.e. EnumTreeChromosome.HEIGHT) * @return a new IAlleleFloat, registered with the allele registry. * @since Forestry 4.2 */ IAlleleFloat createFloat(String modId, String category, String valueName, float value, boolean isDominant, IChromosomeType... types); /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "territory") - * @param valueName allele value name for uid and localization (i.e. "large") - * @param value allele area x, y, z size + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "territory") + * @param valueName allele value name for uid and localization (i.e. "large") + * @param value allele area x, y, z size * @param isDominant allele dominance - * @param types allele chromosome type for registration (i.e. EnumBeeChromosome.TERRITORY) + * @param types allele chromosome type for registration (i.e. EnumBeeChromosome.TERRITORY) * @return a new IAlleleArea, registered with the allele registry. * @since Forestry 4.2 */ IAlleleArea createArea(String modId, String category, String valueName, Vec3i value, boolean isDominant, IChromosomeType... types); /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "fertility") - * @param valueName allele value name for uid and localization (i.e. "low") - * @param value allele int value + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "fertility") + * @param valueName allele value name for uid and localization (i.e. "low") + * @param value allele int value * @param isDominant allele dominance - * @param types allele chromosome type for registration (i.e. EnumBeeChromosome.FERTILITY) + * @param types allele chromosome type for registration (i.e. EnumBeeChromosome.FERTILITY) * @return a new IAlleleInteger, registered with the allele registry. * @since Forestry 4.2 */ IAlleleInteger createInteger(String modId, String category, String valueName, int value, boolean isDominant, IChromosomeType... types); /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "fireproof") - * @param value allele boolean value + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "fireproof") + * @param value allele boolean value * @param isDominant allele dominance - * @param types allele chromosome type for registration (i.e. EnumTreeChromosome.FIREPROOF) + * @param types allele chromosome type for registration (i.e. EnumTreeChromosome.FIREPROOF) * @return a new IAlleleBoolean, registered with the allele registry. * Note that valueName will always be "true" or "false" * @since Forestry 4.2 @@ -76,12 +76,12 @@ public interface IAlleleFactory { IAlleleBoolean createBoolean(String modId, String category, boolean value, boolean isDominant, IChromosomeType... types); /** - * @param modId mod prefix for uid (i.e. "forestry") - * @param category allele category for uid (i.e. "flowers") - * @param valueName allele value name for uid (i.e. "vanilla") - * @param value allele IFlowerProvider value + * @param modId mod prefix for uid (i.e. "forestry") + * @param category allele category for uid (i.e. "flowers") + * @param valueName allele value name for uid (i.e. "vanilla") + * @param value allele IFlowerProvider value * @param isDominant allele dominance - * @param types allele chromosome type for registration (i.e. EnumBeeChromosome.FLOWER_PROVIDER) + * @param types allele chromosome type for registration (i.e. EnumBeeChromosome.FLOWER_PROVIDER) * @return a new IAlleleFlowers, registered with the allele registry. * IAlleleFlowers localization is handled by the IFlowerProvider.getDescription(), unlike the other alleles. * @since Forestry 4.2 diff --git a/src/main/java/forestry/api/genetics/IAlleleHandler.java b/src/main/java/forestry/api/genetics/IAlleleHandler.java index 797ebe188..362fbf59d 100644 --- a/src/main/java/forestry/api/genetics/IAlleleHandler.java +++ b/src/main/java/forestry/api/genetics/IAlleleHandler.java @@ -7,34 +7,30 @@ 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. + * @param allele Allele which was registered. */ void onRegisterAllele(IAllele allele); /** * Called when a classification is registered with {@link IAlleleRegistry}. * - * @param classification - * Classification which was registered. + * @param classification Classification which was registered. */ void onRegisterClassification(IClassification classification); /** * Called when a fruit family is registered with {@link IAlleleRegistry}. * - * @param family - * Fruit family which was registered. + * @param family Fruit family which was registered. */ void onRegisterFruitFamily(IFruitFamily family); } diff --git a/src/main/java/forestry/api/genetics/IAlleleProperty.java b/src/main/java/forestry/api/genetics/IAlleleProperty.java index bb1030ee0..9a2fe8f54 100644 --- a/src/main/java/forestry/api/genetics/IAlleleProperty.java +++ b/src/main/java/forestry/api/genetics/IAlleleProperty.java @@ -7,5 +7,5 @@ public interface IAlleleProperty> extends IAllele, */ @Override int compareTo(A o); - + } diff --git a/src/main/java/forestry/api/genetics/IAlleleRegistry.java b/src/main/java/forestry/api/genetics/IAlleleRegistry.java index 7a2ca5957..d48c06ec7 100644 --- a/src/main/java/forestry/api/genetics/IAlleleRegistry.java +++ b/src/main/java/forestry/api/genetics/IAlleleRegistry.java @@ -9,11 +9,9 @@ import javax.annotation.Nullable; import java.util.Collection; import java.util.Map; -import net.minecraft.item.ItemStack; - import com.mojang.authlib.GameProfile; - import forestry.api.genetics.IClassification.EnumClassLevel; +import net.minecraft.item.ItemStack; /** * Manages {@link ISpeciesRoot}, {@link IAllele}s, {@link IFruitFamily}s, {@link IClassification}, the blacklist and allows creation of research notes. @@ -26,6 +24,7 @@ public interface IAlleleRegistry { /** * Register a {@link ISpeciesRoot}. + * * @param root {@link ISpeciesRoot} to register. */ void registerSpeciesRoot(ISpeciesRoot root); @@ -37,6 +36,7 @@ public interface IAlleleRegistry { /** * 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. */ @@ -45,6 +45,7 @@ public interface IAlleleRegistry { /** * 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. */ @@ -53,6 +54,7 @@ public interface IAlleleRegistry { /** * Retrieve a matching {@link ISpeciesRoot} for the given {@link IIndividual}-class. + * * @param clz Class extending {@link IIndividual}. * @return {@link ISpeciesRoot} if found, null otherwise. */ @@ -77,8 +79,7 @@ public interface IAlleleRegistry { /** * Retrieve genetic information from an itemstack. * - * @param stack - * Stack to retrieve genetic information for. + * @param stack Stack to retrieve genetic information for. * @return IIndividual containing genetic information, null if none could be extracted. */ @Nullable @@ -93,11 +94,11 @@ public interface IAlleleRegistry { /** * Registers an allele. - * + *

* NOTE: Where possible, it is recommended to use IAlleleFactory instead - * because it has built-in advanced localization support. + * because it has built-in advanced localization support. * - * @param allele IAllele to register. + * @param allele IAllele to register. * @param chromosomeTypes valid chromosomeTypes for this allele. * @since Forestry 4.2 */ @@ -111,18 +112,15 @@ public interface IAlleleRegistry { /** * 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. + * @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. + * @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); @@ -149,20 +147,16 @@ public interface IAlleleRegistry { /** * Registers a classification. * - * @param classification - * IClassification to register. + * @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. + * @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); @@ -172,8 +166,7 @@ public interface IAlleleRegistry { /** * Gets a classification. * - * @param uid - * String based unique identifier of the classification to retrieve. + * @param uid String based unique identifier of the classification to retrieve. * @return {@link IClassification} if found, null otherwise. */ IClassification getClassification(String uid); @@ -207,8 +200,7 @@ public interface IAlleleRegistry { /** * Registers a new IAlleleHandler * - * @param handler - * IAlleleHandler to register. + * @param handler IAlleleHandler to register. */ void registerAlleleHandler(IAlleleHandler handler); @@ -217,8 +209,7 @@ public interface IAlleleRegistry { /** * Blacklist an allele identified by its UID from mutation. * - * @param uid - * UID of the allele to blacklist. + * @param uid UID of the allele to blacklist. */ void blacklistAllele(String uid); @@ -228,8 +219,7 @@ public interface IAlleleRegistry { Collection getAlleleBlacklist(); /** - * @param uid - * UID of the species to vet. + * @param uid UID of the species to vet. * @return true if the allele is blacklisted. */ boolean isBlacklisted(String uid); @@ -238,14 +228,14 @@ public interface IAlleleRegistry { /** * @param researcher Username of the player who researched this note. - * @param species {@link IAlleleSpecies} to encode on the research 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. + * @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/src/main/java/forestry/api/genetics/IAlleleSpecies.java b/src/main/java/forestry/api/genetics/IAlleleSpecies.java index dcd3352d4..956e344e4 100644 --- a/src/main/java/forestry/api/genetics/IAlleleSpecies.java +++ b/src/main/java/forestry/api/genetics/IAlleleSpecies.java @@ -5,13 +5,11 @@ ******************************************************************************/ package forestry.api.genetics; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - import com.mojang.authlib.GameProfile; - import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; /** * Basic species allele. @@ -53,6 +51,7 @@ public interface IAlleleSpecies extends IAllele { /** * 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(); diff --git a/src/main/java/forestry/api/genetics/IAlleleSpeciesBuilder.java b/src/main/java/forestry/api/genetics/IAlleleSpeciesBuilder.java index 426f63df6..a74c1b2c9 100644 --- a/src/main/java/forestry/api/genetics/IAlleleSpeciesBuilder.java +++ b/src/main/java/forestry/api/genetics/IAlleleSpeciesBuilder.java @@ -18,10 +18,14 @@ public interface IAlleleSpeciesBuilder { IAlleleSpeciesBuilder setHasEffect(); - /** Secret species are not shown in creative mode. */ + /** + * Secret species are not shown in creative mode. + */ IAlleleSpeciesBuilder setIsSecret(); - /** Uncounted species do not count toward total species discovered. */ + /** + * Uncounted species do not count toward total species discovered. + */ IAlleleSpeciesBuilder setIsNotCounted(); /** diff --git a/src/main/java/forestry/api/genetics/IAlyzerPlugin.java b/src/main/java/forestry/api/genetics/IAlyzerPlugin.java index 337fbc653..923a73df1 100644 --- a/src/main/java/forestry/api/genetics/IAlyzerPlugin.java +++ b/src/main/java/forestry/api/genetics/IAlyzerPlugin.java @@ -5,7 +5,6 @@ import java.util.Map; import net.minecraft.client.gui.GuiScreen; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/forestry/api/genetics/IBreedingTracker.java b/src/main/java/forestry/api/genetics/IBreedingTracker.java index 5dce75ee1..585149e64 100644 --- a/src/main/java/forestry/api/genetics/IBreedingTracker.java +++ b/src/main/java/forestry/api/genetics/IBreedingTracker.java @@ -7,11 +7,10 @@ package forestry.api.genetics; import javax.annotation.Nullable; +import forestry.api.apiculture.IBeekeepingMode; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import forestry.api.apiculture.IBeekeepingMode; - /** * Keeps track of who bred, discovered, and researched which species in a world. * @@ -48,7 +47,7 @@ public interface IBreedingTracker { * @param individual */ void registerPickup(IIndividual individual); - + /** * Marks a species as discovered. Should only be called from registerIndividual normally. * @@ -66,8 +65,7 @@ public interface IBreedingTracker { /** * Queries the tracker for discovered species. * - * @param mutation - * Mutation to query for. + * @param mutation Mutation to query for. * @return true if the mutation has been discovered. */ boolean isDiscovered(IMutation mutation); @@ -75,8 +73,7 @@ public interface IBreedingTracker { /** * Queries the tracker for discovered species. * - * @param species - * Species to check. + * @param species Species to check. * @return true if the species has been bred. */ boolean isDiscovered(IAlleleSpecies species); diff --git a/src/main/java/forestry/api/genetics/ICheckPollinatable.java b/src/main/java/forestry/api/genetics/ICheckPollinatable.java index bbbbab5eb..3a36f6508 100644 --- a/src/main/java/forestry/api/genetics/ICheckPollinatable.java +++ b/src/main/java/forestry/api/genetics/ICheckPollinatable.java @@ -31,7 +31,7 @@ public interface ICheckPollinatable { /** * Checks whether this can mate with the given pollen. - * + *

* Must be the one to check genetic equivalency. * * @param pollen IIndividual representing the pollen. diff --git a/src/main/java/forestry/api/genetics/IClassification.java b/src/main/java/forestry/api/genetics/IClassification.java index d8fd97213..85be1c607 100644 --- a/src/main/java/forestry/api/genetics/IClassification.java +++ b/src/main/java/forestry/api/genetics/IClassification.java @@ -9,7 +9,7 @@ import javax.annotation.Nullable; /** * Biological classifications from domain down to genus. - * + *

* Used by the *alyzers to display hierarchies. */ public interface IClassification { diff --git a/src/main/java/forestry/api/genetics/IClimateHelper.java b/src/main/java/forestry/api/genetics/IClimateHelper.java index 3607b0fb1..ae56808e8 100644 --- a/src/main/java/forestry/api/genetics/IClimateHelper.java +++ b/src/main/java/forestry/api/genetics/IClimateHelper.java @@ -8,25 +8,27 @@ 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. + * @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); + 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 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. */ @@ -34,14 +36,16 @@ public interface IClimateHelper { /** * Gets a collection of temperatures which fit the given parameters. - * @param prefered Base temperature from which to measure. + * + * @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. */ @@ -49,6 +53,7 @@ public interface IClimateHelper { /** * 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. */ diff --git a/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java b/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java index c115c477a..b3ca570cd 100644 --- a/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java +++ b/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java @@ -11,6 +11,7 @@ import net.minecraft.world.World; public interface IFlowerGrowthHelper { /** * Plants a random flower from flowerType at the specified position. + * * @return true if successful, false if it could not be planted. */ boolean plantRandomFlower(String flowerType, World world, BlockPos pos); diff --git a/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java b/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java index 93f4c8145..812fbb332 100644 --- a/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java +++ b/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java @@ -16,6 +16,7 @@ public interface IFlowerGrowthRule { * Checks a position for suitability, and then plants a flower there. * Returns true on success. * For implementers, you can plant a random flower using IFlowerGrowthHelper.plantRandomFlower + * * @since Forestry 4.0.8 */ boolean growFlower(IFlowerGrowthHelper helper, String flowerType, World world, BlockPos pos); diff --git a/src/main/java/forestry/api/genetics/IFlowerProvider.java b/src/main/java/forestry/api/genetics/IFlowerProvider.java index 17e590318..d5b0bb33d 100644 --- a/src/main/java/forestry/api/genetics/IFlowerProvider.java +++ b/src/main/java/forestry/api/genetics/IFlowerProvider.java @@ -29,6 +29,7 @@ public interface IFlowerProvider { /** * Allows the flower provider to affect the produce at the given location. * If this flowerProvider does not affect the products, it should return the products unchanged. + * * @return Array of itemstacks being the (modified or unmodified) produce. */ List affectProducts(World world, IIndividual individual, BlockPos pos, List products); diff --git a/src/main/java/forestry/api/genetics/IFruitBearer.java b/src/main/java/forestry/api/genetics/IFruitBearer.java index dc1062b52..a068c15c3 100644 --- a/src/main/java/forestry/api/genetics/IFruitBearer.java +++ b/src/main/java/forestry/api/genetics/IFruitBearer.java @@ -28,8 +28,7 @@ public interface IFruitBearer { /** * Picks the fruits of this tile, resetting it to unripe fruits. * - * @param tool - * Tool used in picking the fruits. May be empty. + * @param tool Tool used in picking the fruits. May be empty. * @return Picked fruits. */ NonNullList pickFruit(ItemStack tool); @@ -42,8 +41,7 @@ public interface IFruitBearer { /** * Increases the ripeness of the fruit. Adding 1.0f will fully ripen the fruit. * - * @param add - * Float to add to the ripeness. Will truncate to valid values. + * @param add Float to add to the ripeness. Will truncate to valid values. */ void addRipeness(float add); } diff --git a/src/main/java/forestry/api/genetics/IIndividual.java b/src/main/java/forestry/api/genetics/IIndividual.java index e470860dd..09b594ae5 100644 --- a/src/main/java/forestry/api/genetics/IIndividual.java +++ b/src/main/java/forestry/api/genetics/IIndividual.java @@ -11,7 +11,7 @@ import forestry.api.core.INbtWritable; /** * An actual individual with genetic information. - * + *

* Only the default implementation is supported. */ public interface IIndividual extends INbtWritable { @@ -23,7 +23,8 @@ public interface IIndividual extends INbtWritable { void addTooltip(List list); /** - * Call to mark the IIndividual as analyzed. + * Call to mark the IIndividual as analyzed. + * * @return true if the IIndividual has not been analyzed previously. */ boolean analyze(); @@ -38,6 +39,7 @@ public interface IIndividual extends INbtWritable { /** * 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. */ diff --git a/src/main/java/forestry/api/genetics/IIndividualLiving.java b/src/main/java/forestry/api/genetics/IIndividualLiving.java index e90737630..ae45f2f60 100644 --- a/src/main/java/forestry/api/genetics/IIndividualLiving.java +++ b/src/main/java/forestry/api/genetics/IIndividualLiving.java @@ -34,6 +34,7 @@ public interface IIndividualLiving extends IIndividual { /** * Age the individual. + * * @param world * @param ageModifier */ @@ -41,6 +42,7 @@ public interface IIndividualLiving extends IIndividual { /** * Mate with the given individual. + * * @param individual the {@link IIndividual} to mate this one with. */ void mate(IIndividual individual); diff --git a/src/main/java/forestry/api/genetics/ILeafTranslator.java b/src/main/java/forestry/api/genetics/ILeafTranslator.java index f91d5e1a1..cb014a13e 100644 --- a/src/main/java/forestry/api/genetics/ILeafTranslator.java +++ b/src/main/java/forestry/api/genetics/ILeafTranslator.java @@ -2,9 +2,8 @@ package forestry.api.genetics; import javax.annotation.Nullable; -import net.minecraft.block.state.IBlockState; - import forestry.api.arboriculture.ITree; +import net.minecraft.block.state.IBlockState; /** * Translates blockStates for a single plain leaf block into genetic data. diff --git a/src/main/java/forestry/api/genetics/IMutation.java b/src/main/java/forestry/api/genetics/IMutation.java index 2e04420ac..65f1ad1e7 100644 --- a/src/main/java/forestry/api/genetics/IMutation.java +++ b/src/main/java/forestry/api/genetics/IMutation.java @@ -9,7 +9,7 @@ import java.util.Collection; /** * Individuals can be seeded either as hive drops or as mutation results. - * + *

* {@link IAlleleRegistry} manages these. * * @author SirSengir @@ -33,8 +33,8 @@ public interface IMutation { /** * @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. + *

+ * 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(); @@ -44,10 +44,10 @@ public interface IMutation { float getBaseChance(); /** - * @return Collection of localized, human-readable strings describing special mutation conditions, if any. + * @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. diff --git a/src/main/java/forestry/api/genetics/IMutationBuilder.java b/src/main/java/forestry/api/genetics/IMutationBuilder.java index 8173b9554..d74d7c587 100644 --- a/src/main/java/forestry/api/genetics/IMutationBuilder.java +++ b/src/main/java/forestry/api/genetics/IMutationBuilder.java @@ -5,50 +5,65 @@ ******************************************************************************/ package forestry.api.genetics; -import net.minecraft.block.state.IBlockState; - -import net.minecraftforge.common.BiomeDictionary; - import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; +import net.minecraft.block.state.IBlockState; +import net.minecraftforge.common.BiomeDictionary; -/** Set custom mutation requirements */ +/** + * Set custom mutation requirements + */ public interface IMutationBuilder { IMutation build(); - - /** Prevent this mutation from being shown in the analyzers */ + + /** + * Prevent this mutation from being shown in the analyzers + */ IMutationBuilder setIsSecret(); - /** Require a specific temperature for this mutation to occur */ + /** + * Require a specific temperature for this mutation to occur + */ IMutationBuilder restrictTemperature(EnumTemperature temperature); IMutationBuilder restrictTemperature(EnumTemperature minTemperature, EnumTemperature maxTemperature); - /** Require a specific humidity for this mutation to occur */ + /** + * Require a specific humidity for this mutation to occur + */ IMutationBuilder restrictHumidity(EnumHumidity humidity); IMutationBuilder restrictHumidity(EnumHumidity minHumidity, EnumHumidity maxHumidity); /** * Restrict this mutation to certain types of biomes. + * * @param types The types of biomes this mutation can occur. */ IMutationBuilder restrictBiomeType(BiomeDictionary.Type... types); - /** Restrict the days of the year that this mutation can occur */ + /** + * Restrict the days of the year that this mutation can occur + */ IMutationBuilder restrictDateRange(int startMonth, int startDay, int endMonth, int endDay); - /** Restrict the time of day that this mutation can occur */ + /** + * Restrict the time of day that this mutation can occur + */ IMutationBuilder requireDay(); IMutationBuilder requireNight(); - /** Require a specific resource to be under the location of the mutation */ + /** + * Require a specific resource to be under the location of the mutation + */ IMutationBuilder requireResource(IBlockState... acceptedBlockStates); IMutationBuilder requireResource(String oreDictName); - /** Require some other custom mutation condition */ + /** + * Require some other custom mutation condition + */ IMutationBuilder addMutationCondition(IMutationCondition mutationCondition); } diff --git a/src/main/java/forestry/api/genetics/IPollinatable.java b/src/main/java/forestry/api/genetics/IPollinatable.java index 7a6d0a54e..3df9b3800 100644 --- a/src/main/java/forestry/api/genetics/IPollinatable.java +++ b/src/main/java/forestry/api/genetics/IPollinatable.java @@ -15,8 +15,7 @@ public interface IPollinatable extends ICheckPollinatable { /** * Pollinates this entity. * - * @param pollen - * IIndividual representing the pollen. + * @param pollen IIndividual representing the pollen. */ void mateWith(IIndividual pollen); } diff --git a/src/main/java/forestry/api/genetics/ISaplingTranslator.java b/src/main/java/forestry/api/genetics/ISaplingTranslator.java index c84a0ed25..243dd3e5f 100644 --- a/src/main/java/forestry/api/genetics/ISaplingTranslator.java +++ b/src/main/java/forestry/api/genetics/ISaplingTranslator.java @@ -2,9 +2,8 @@ package forestry.api.genetics; import javax.annotation.Nullable; -import net.minecraft.item.ItemStack; - import forestry.api.arboriculture.ITree; +import net.minecraft.item.ItemStack; public interface ISaplingTranslator { @Nullable diff --git a/src/main/java/forestry/api/genetics/ISpeciesRootPollinatable.java b/src/main/java/forestry/api/genetics/ISpeciesRootPollinatable.java index 76cecc295..e216824e4 100644 --- a/src/main/java/forestry/api/genetics/ISpeciesRootPollinatable.java +++ b/src/main/java/forestry/api/genetics/ISpeciesRootPollinatable.java @@ -3,13 +3,12 @@ package forestry.api.genetics; import javax.annotation.Nullable; import com.mojang.authlib.GameProfile; - import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; /** - * @since 5.12.16 * @author Nedelosk + * @since 5.12.16 */ public interface ISpeciesRootPollinatable extends ISpeciesRoot { @@ -17,5 +16,5 @@ public interface ISpeciesRootPollinatable extends ISpeciesRoot { @Nullable IPollinatable tryConvertToPollinatable(@Nullable GameProfile owner, World world, final BlockPos pos, final IIndividual pollen); - + } diff --git a/src/main/java/forestry/api/genetics/ISpeciesType.java b/src/main/java/forestry/api/genetics/ISpeciesType.java index 036b9b8cd..42cfade9e 100644 --- a/src/main/java/forestry/api/genetics/ISpeciesType.java +++ b/src/main/java/forestry/api/genetics/ISpeciesType.java @@ -5,6 +5,8 @@ ******************************************************************************/ package forestry.api.genetics; -/** Species types, implemented by enums and compared with == */ +/** + * Species types, implemented by enums and compared with == + */ public interface ISpeciesType { } diff --git a/src/main/java/forestry/api/greenhouse/DefaultGreenhouseLogic.java b/src/main/java/forestry/api/greenhouse/DefaultGreenhouseLogic.java index 346cdde99..112023715 100644 --- a/src/main/java/forestry/api/greenhouse/DefaultGreenhouseLogic.java +++ b/src/main/java/forestry/api/greenhouse/DefaultGreenhouseLogic.java @@ -5,20 +5,19 @@ ******************************************************************************/ package forestry.api.greenhouse; -import net.minecraft.nbt.NBTTagCompound; - import forestry.api.multiblock.IGreenhouseController; +import net.minecraft.nbt.NBTTagCompound; public class DefaultGreenhouseLogic implements IGreenhouseLogic { public final IGreenhouseController controller; private final String name; - + public DefaultGreenhouseLogic(IGreenhouseController controller, String name) { this.controller = controller; this.name = name; } - + @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { return nbt; @@ -35,7 +34,7 @@ public class DefaultGreenhouseLogic implements IGreenhouseLogic { @Override public void onEvent(EnumGreenhouseEventType type, Object event) { } - + @Override public IGreenhouseController getController() { return controller; diff --git a/src/main/java/forestry/api/greenhouse/EnumGreenhouseEventType.java b/src/main/java/forestry/api/greenhouse/EnumGreenhouseEventType.java index 135d1f615..837b8afd0 100644 --- a/src/main/java/forestry/api/greenhouse/EnumGreenhouseEventType.java +++ b/src/main/java/forestry/api/greenhouse/EnumGreenhouseEventType.java @@ -8,5 +8,5 @@ package forestry.api.greenhouse; public enum EnumGreenhouseEventType { CAMOUFLAGE - + } diff --git a/src/main/java/forestry/api/greenhouse/GreenhouseManager.java b/src/main/java/forestry/api/greenhouse/GreenhouseManager.java index 469ed6269..fc1142af5 100644 --- a/src/main/java/forestry/api/greenhouse/GreenhouseManager.java +++ b/src/main/java/forestry/api/greenhouse/GreenhouseManager.java @@ -6,7 +6,7 @@ package forestry.api.greenhouse; public class GreenhouseManager { - + public static IGreenhouseHelper greenhouseHelper; } diff --git a/src/main/java/forestry/api/greenhouse/IGreenhouseClimaLogic.java b/src/main/java/forestry/api/greenhouse/IGreenhouseClimaLogic.java index 1a32953b1..556f3f442 100644 --- a/src/main/java/forestry/api/greenhouse/IGreenhouseClimaLogic.java +++ b/src/main/java/forestry/api/greenhouse/IGreenhouseClimaLogic.java @@ -7,5 +7,5 @@ package forestry.api.greenhouse; public interface IGreenhouseClimaLogic extends IGreenhouseLogic { - + } diff --git a/src/main/java/forestry/api/greenhouse/IGreenhouseHelper.java b/src/main/java/forestry/api/greenhouse/IGreenhouseHelper.java index 3ee9eb4ff..b80623e9e 100644 --- a/src/main/java/forestry/api/greenhouse/IGreenhouseHelper.java +++ b/src/main/java/forestry/api/greenhouse/IGreenhouseHelper.java @@ -19,9 +19,9 @@ public interface IGreenhouseHelper { */ @Nullable IGreenhouseController getGreenhouseController(World world, BlockPos pos); - + void addGreenhouseLogic(Class logic); - + List> getGreenhouseLogics(); - + } diff --git a/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java b/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java index 7e8ad635c..cc301461e 100644 --- a/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java +++ b/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java @@ -5,11 +5,10 @@ ******************************************************************************/ package forestry.api.greenhouse; -import net.minecraft.world.World; - import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; import forestry.api.core.IErrorLogicSource; +import net.minecraft.world.World; public interface IGreenhouseHousing extends IErrorLogicSource { @@ -20,11 +19,12 @@ public interface IGreenhouseHousing extends IErrorLogicSource { float getExactTemperature(); float getExactHumidity(); - + /** * Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12 + * * @return The world in that the housing is. */ World getWorldObj(); - + } diff --git a/src/main/java/forestry/api/greenhouse/IGreenhouseListener.java b/src/main/java/forestry/api/greenhouse/IGreenhouseListener.java index c5e41fa2a..add3a804c 100644 --- a/src/main/java/forestry/api/greenhouse/IGreenhouseListener.java +++ b/src/main/java/forestry/api/greenhouse/IGreenhouseListener.java @@ -7,15 +7,15 @@ package forestry.api.greenhouse; import forestry.api.multiblock.IGreenhouseController; -public interface IGreenhouseListener { +public interface IGreenhouseListener { /** * Called before the greenhouse update the climate system. - * + * * @param greenhouse The greenhouse of the listener. - * @param canWork The actual {@link Boolean} value. + * @param canWork The actual {@link Boolean} value. * @return True if the greenhouse can update the climate. */ boolean canWork(IGreenhouseController greenhouse, boolean canWork); - + } diff --git a/src/main/java/forestry/api/greenhouse/IGreenhouseLogic.java b/src/main/java/forestry/api/greenhouse/IGreenhouseLogic.java index cabea2779..1f0478994 100644 --- a/src/main/java/forestry/api/greenhouse/IGreenhouseLogic.java +++ b/src/main/java/forestry/api/greenhouse/IGreenhouseLogic.java @@ -17,11 +17,11 @@ import forestry.api.multiblock.IGreenhouseController; public interface IGreenhouseLogic extends INbtWritable, INbtReadable { void work(); - + void onEvent(EnumGreenhouseEventType type, Object event); - + IGreenhouseController getController(); - + String getName(); - + } diff --git a/src/main/java/forestry/api/greenhouse/IInternalBlock.java b/src/main/java/forestry/api/greenhouse/IInternalBlock.java index b2dfdea62..abe7be4a0 100644 --- a/src/main/java/forestry/api/greenhouse/IInternalBlock.java +++ b/src/main/java/forestry/api/greenhouse/IInternalBlock.java @@ -6,7 +6,6 @@ package forestry.api.greenhouse; import javax.annotation.Nullable; - import java.util.Collection; import net.minecraft.util.math.BlockPos; @@ -14,7 +13,7 @@ import net.minecraft.util.math.BlockPos; public interface IInternalBlock { BlockPos getPos(); - + @Nullable IInternalBlock getRoot(); diff --git a/src/main/java/forestry/api/greenhouse/IInternalBlockFace.java b/src/main/java/forestry/api/greenhouse/IInternalBlockFace.java index 5878b4995..a189ec066 100644 --- a/src/main/java/forestry/api/greenhouse/IInternalBlockFace.java +++ b/src/main/java/forestry/api/greenhouse/IInternalBlockFace.java @@ -5,13 +5,13 @@ ******************************************************************************/ package forestry.api.greenhouse; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; public interface IInternalBlockFace { - + boolean isTested(); - + void setTested(boolean tested); EnumFacing getFace(); diff --git a/src/main/java/forestry/api/lepidopterology/ButterflyManager.java b/src/main/java/forestry/api/lepidopterology/ButterflyManager.java index 67ce0a2da..8425797aa 100644 --- a/src/main/java/forestry/api/lepidopterology/ButterflyManager.java +++ b/src/main/java/forestry/api/lepidopterology/ButterflyManager.java @@ -11,7 +11,7 @@ package forestry.api.lepidopterology; public class ButterflyManager { - + /** * Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootButterflies") */ @@ -21,7 +21,7 @@ public class ButterflyManager { * Used to create new butterflies. */ public static IButterflyFactory butterflyFactory; - + /** * Used to create new butterfly mutations. */ diff --git a/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java b/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java index 145f5da72..e263e044f 100644 --- a/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java +++ b/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java @@ -69,11 +69,11 @@ public enum EnumButterflyChromosome implements IChromosomeType { * Extra effect to surroundings. (?) */ EFFECT(IAlleleButterflyEffect.class), - + COCOON(IAlleleButterflyCocoon.class); - + private final Class alleleClass; - + EnumButterflyChromosome(Class alleleClass) { this.alleleClass = alleleClass; } diff --git a/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java b/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java index 5c97b61c3..60efeca8b 100644 --- a/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java +++ b/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java @@ -11,7 +11,7 @@ import forestry.api.genetics.ISpeciesType; public enum EnumFlutterType implements ISpeciesType { BUTTERFLY, SERUM, CATERPILLAR, COCOON; - + public static final EnumFlutterType[] VALUES = values(); public String getName() { diff --git a/src/main/java/forestry/api/lepidopterology/IAlleleButterflyCocoon.java b/src/main/java/forestry/api/lepidopterology/IAlleleButterflyCocoon.java index 44d42d57d..71ed9dbdd 100644 --- a/src/main/java/forestry/api/lepidopterology/IAlleleButterflyCocoon.java +++ b/src/main/java/forestry/api/lepidopterology/IAlleleButterflyCocoon.java @@ -17,11 +17,11 @@ import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.ItemStack; public interface IAlleleButterflyCocoon extends IAlleleProperty { - + ModelResourceLocation getCocoonItemModel(int age); - + String getCocoonName(); - + Map getCocoonLoot(); - + } diff --git a/src/main/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java b/src/main/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java index 6b3e000b2..07841e5fe 100644 --- a/src/main/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java +++ b/src/main/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java @@ -12,7 +12,8 @@ public interface IAlleleButterflyEffect extends IAlleleEffect { /** * Used by butterflies to trigger effects in the world. - * @param butterfly {@link IEntityButterfly} + * + * @param butterfly {@link IEntityButterfly} * @param storedData * @return {@link forestry.api.genetics.IEffectData} for the next cycle. */ diff --git a/src/main/java/forestry/api/lepidopterology/IButterflyCocoon.java b/src/main/java/forestry/api/lepidopterology/IButterflyCocoon.java index c6f1731e3..a638db53c 100644 --- a/src/main/java/forestry/api/lepidopterology/IButterflyCocoon.java +++ b/src/main/java/forestry/api/lepidopterology/IButterflyCocoon.java @@ -14,17 +14,17 @@ import javax.annotation.Nullable; import forestry.api.genetics.IHousing; -public interface IButterflyCocoon extends IHousing{ - +public interface IButterflyCocoon extends IHousing { + IButterfly getCaterpillar(); - + void setCaterpillar(IButterfly butterfly); @Nullable IButterflyNursery getNursery(); - + void setNursery(IButterflyNursery nursery); - + boolean isSolid(); - + } diff --git a/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java b/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java index 06daf43da..f3ddc15ba 100644 --- a/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java +++ b/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java @@ -20,16 +20,16 @@ public interface IButterflyFactory { * Automatically registered with AlleleManager.alleleRegistry.registerAllele() * See IAlleleButterflySpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species. * - * @param uid Unique Identifier for this species - * @param unlocalizedName Unlocalized name for this species - * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. + * @param uid Unique Identifier for this species + * @param unlocalizedName Unlocalized name for this species + * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. * @param unlocalizedDescription Unlocalized description for this species - * @param modID The modID form the mod of the butterfly - * @param texturePath String texture path for this butterfly e.g. "forestry:butterfly/..." - * @param dominant Whether this species is genetically dominant (false means it is recessive) - * @param branch Classification of this species - * @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. - * @param serumColour The color of this butterfly's serum. + * @param modID The modID form the mod of the butterfly + * @param texturePath String texture path for this butterfly e.g. "forestry:butterfly/..." + * @param dominant Whether this species is genetically dominant (false means it is recessive) + * @param branch Classification of this species + * @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. + * @param serumColour The color of this butterfly's serum. * @return a new butterfly species allele. */ IAlleleButterflySpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean dominant, IClassification branch, String binomial, Color serumColour); diff --git a/src/main/java/forestry/api/lepidopterology/IButterflyMutationFactory.java b/src/main/java/forestry/api/lepidopterology/IButterflyMutationFactory.java index 35e94d80f..16dcf9919 100644 --- a/src/main/java/forestry/api/lepidopterology/IButterflyMutationFactory.java +++ b/src/main/java/forestry/api/lepidopterology/IButterflyMutationFactory.java @@ -15,8 +15,8 @@ public interface IButterflyMutationFactory { * * @param parentButterfly0 A parent butterfly for this mutation * @param parentButterfly1 A parent butterfly for this mutation - * @param result The resulting alleles for this mutation - * @param chance The chance that breeding the two parent butterfly's will result in this mutation + * @param result The resulting alleles for this mutation + * @param chance The chance that breeding the two parent butterfly's will result in this mutation * @return a new butterfly mutation. */ IButterflyMutationBuilder createMutation(IAlleleButterflySpecies parentButterfly0, IAlleleButterflySpecies parentButterfly1, IAllele[] result, int chance); diff --git a/src/main/java/forestry/api/lepidopterology/IButterflyNursery.java b/src/main/java/forestry/api/lepidopterology/IButterflyNursery.java index 2a03c3b9b..bfceeec65 100644 --- a/src/main/java/forestry/api/lepidopterology/IButterflyNursery.java +++ b/src/main/java/forestry/api/lepidopterology/IButterflyNursery.java @@ -14,11 +14,11 @@ import forestry.api.genetics.IIndividual; public interface IButterflyNursery extends IHousing, IClimateProvider { @Nullable IButterfly getCaterpillar(); - + IIndividual getNanny(); - + void setCaterpillar(@Nullable IButterfly butterfly); - + boolean canNurse(IButterfly butterfly); - + } diff --git a/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java b/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java index 328cc584d..f141ef4ab 100644 --- a/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java +++ b/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java @@ -7,11 +7,10 @@ package forestry.api.lepidopterology; import javax.annotation.Nullable; +import forestry.api.genetics.IIndividual; 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); @@ -29,8 +28,8 @@ public interface IEntityButterfly extends IAnimals { IIndividual getPollen(); void setPollen(@Nullable IIndividual pollen); - + boolean canMateWith(IEntityButterfly butterfly); - + boolean canMate(); } diff --git a/src/main/java/forestry/api/lepidopterology/ILepidopteristTracker.java b/src/main/java/forestry/api/lepidopterology/ILepidopteristTracker.java index befa591d9..204b5b507 100644 --- a/src/main/java/forestry/api/lepidopterology/ILepidopteristTracker.java +++ b/src/main/java/forestry/api/lepidopterology/ILepidopteristTracker.java @@ -10,5 +10,5 @@ import forestry.api.genetics.IBreedingTracker; public interface ILepidopteristTracker extends IBreedingTracker { void registerCatch(IButterfly butterfly); - + } diff --git a/src/main/java/forestry/api/mail/EnumAddressee.java b/src/main/java/forestry/api/mail/EnumAddressee.java index 7327e4465..1421cca9b 100644 --- a/src/main/java/forestry/api/mail/EnumAddressee.java +++ b/src/main/java/forestry/api/mail/EnumAddressee.java @@ -19,7 +19,7 @@ public enum EnumAddressee { return addr; } } - + return null; } diff --git a/src/main/java/forestry/api/mail/ILetter.java b/src/main/java/forestry/api/mail/ILetter.java index 016143927..80ce8cae7 100644 --- a/src/main/java/forestry/api/mail/ILetter.java +++ b/src/main/java/forestry/api/mail/ILetter.java @@ -8,10 +8,9 @@ package forestry.api.mail; import javax.annotation.Nullable; import java.util.List; +import forestry.api.core.INbtWritable; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; - -import forestry.api.core.INbtWritable; import net.minecraft.util.NonNullList; public interface ILetter extends IInventory, INbtWritable { diff --git a/src/main/java/forestry/api/mail/IMailAddress.java b/src/main/java/forestry/api/mail/IMailAddress.java index 5733d97c3..bfe63d89a 100644 --- a/src/main/java/forestry/api/mail/IMailAddress.java +++ b/src/main/java/forestry/api/mail/IMailAddress.java @@ -8,7 +8,6 @@ package forestry.api.mail; import javax.annotation.Nullable; import com.mojang.authlib.GameProfile; - import forestry.api.core.INbtWritable; public interface IMailAddress extends INbtWritable { diff --git a/src/main/java/forestry/api/mail/IPostalCarrier.java b/src/main/java/forestry/api/mail/IPostalCarrier.java index 33ac38a2e..5179c1775 100644 --- a/src/main/java/forestry/api/mail/IPostalCarrier.java +++ b/src/main/java/forestry/api/mail/IPostalCarrier.java @@ -13,11 +13,11 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.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. + * 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 { @@ -40,11 +40,12 @@ public interface IPostalCarrier { /** * 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 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. + * @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/src/main/java/forestry/api/mail/IPostalState.java b/src/main/java/forestry/api/mail/IPostalState.java index 8b50ba9d5..ec5abb4d0 100644 --- a/src/main/java/forestry/api/mail/IPostalState.java +++ b/src/main/java/forestry/api/mail/IPostalState.java @@ -6,9 +6,13 @@ package forestry.api.mail; public interface IPostalState { - /** Normal states are OK, error states are not OK */ + /** + * Normal states are OK, error states are not OK + */ boolean isOk(); - /** Localized description of the postal state */ + /** + * Localized description of the postal state + */ String getDescription(); } diff --git a/src/main/java/forestry/api/mail/ITradeStationInfo.java b/src/main/java/forestry/api/mail/ITradeStationInfo.java index 905acfb39..e6452d3fb 100644 --- a/src/main/java/forestry/api/mail/ITradeStationInfo.java +++ b/src/main/java/forestry/api/mail/ITradeStationInfo.java @@ -5,9 +5,8 @@ ******************************************************************************/ package forestry.api.mail; -import net.minecraft.item.ItemStack; - import com.mojang.authlib.GameProfile; +import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; public interface ITradeStationInfo { diff --git a/src/main/java/forestry/api/multiblock/IAlvearyComponent.java b/src/main/java/forestry/api/multiblock/IAlvearyComponent.java index 8d09f9216..bb76b0c61 100644 --- a/src/main/java/forestry/api/multiblock/IAlvearyComponent.java +++ b/src/main/java/forestry/api/multiblock/IAlvearyComponent.java @@ -41,8 +41,9 @@ public interface IAlvearyComponent extends IM interface Climatiser extends IAlvearyComponent { /** * Called every tick by the alveary. + * * @param tickCount the number of ticks in the world - * @param alveary the climate controlled alveary + * @param alveary the climate controlled alveary */ void changeClimate(int tickCount, IClimateControlled alveary); } diff --git a/src/main/java/forestry/api/multiblock/ICharcoalPileController.java b/src/main/java/forestry/api/multiblock/ICharcoalPileController.java index c957f64ab..5e6d38bb2 100644 --- a/src/main/java/forestry/api/multiblock/ICharcoalPileController.java +++ b/src/main/java/forestry/api/multiblock/ICharcoalPileController.java @@ -1,7 +1,7 @@ package forestry.api.multiblock; -public interface ICharcoalPileController extends IMultiblockController{ - +public interface ICharcoalPileController extends IMultiblockController { + boolean isActive(); void setActive(boolean active); diff --git a/src/main/java/forestry/api/multiblock/IGreenhouseComponent.java b/src/main/java/forestry/api/multiblock/IGreenhouseComponent.java index cb55e69b3..7025ce7e0 100644 --- a/src/main/java/forestry/api/multiblock/IGreenhouseComponent.java +++ b/src/main/java/forestry/api/multiblock/IGreenhouseComponent.java @@ -21,20 +21,20 @@ public interface IGreenhouseComponent exte interface Listener extends IGreenhouseComponent { IGreenhouseListener getGreenhouseListener(); } - + interface ClimateControl extends IGreenhouseComponent, IClimateControlProvider { - + @Override IClimateControl getClimateControl(); } - + interface Door extends IGreenhouseComponent { } interface Climatiser extends IGreenhouseComponent, IClimateSourceProvider { IClimatiserDefinition getDefinition(); } - + interface ButterflyHatch extends IGreenhouseComponent { NonNullList addCocoonLoot(IButterflyCocoon cocoon); } diff --git a/src/main/java/forestry/api/multiblock/IGreenhouseController.java b/src/main/java/forestry/api/multiblock/IGreenhouseController.java index bc00e2de0..4acea836b 100644 --- a/src/main/java/forestry/api/multiblock/IGreenhouseController.java +++ b/src/main/java/forestry/api/multiblock/IGreenhouseController.java @@ -5,9 +5,8 @@ ******************************************************************************/ package forestry.api.multiblock; -import java.util.List; - import javax.annotation.Nullable; +import java.util.List; import forestry.api.climate.IClimateControl; import forestry.api.climate.IClimateControlProvider; @@ -18,20 +17,20 @@ import forestry.api.greenhouse.IGreenhouseHousing; import forestry.api.greenhouse.IGreenhouseLogic; public interface IGreenhouseController extends IMultiblockController, IGreenhouseHousing, ICamouflageHandler, IClimateControlProvider { - + /** * Handle change events. */ void onChange(EnumGreenhouseEventType type, Object event); - + /** * @return The logics of the greenhouse. */ List getLogics(); - + @Nullable IClimateRegion getRegion(); - + @Override IClimateControl getClimateControl(); diff --git a/src/main/java/forestry/api/multiblock/IMultiblockComponent.java b/src/main/java/forestry/api/multiblock/IMultiblockComponent.java index d5744ee15..0274e3cbc 100644 --- a/src/main/java/forestry/api/multiblock/IMultiblockComponent.java +++ b/src/main/java/forestry/api/multiblock/IMultiblockComponent.java @@ -7,18 +7,18 @@ package forestry.api.multiblock; import javax.annotation.Nullable; -import net.minecraft.util.math.BlockPos; - import com.mojang.authlib.GameProfile; +import net.minecraft.util.math.BlockPos; /** * Basic interface for a multiblock machine component. * Implemented by TileEntities. */ public interface IMultiblockComponent { - + /** * Returns the location of this tile entity in the world. + * * @return ChunkCoordinates set to the location of this tile entity in the world. */ BlockPos getCoordinates(); @@ -39,6 +39,7 @@ public interface IMultiblockComponent { * it was constructed by a player/entity action, not by chunks loading. * Note that, for non-square machines, the min/max coordinates may not actually be part * of the machine! They form an outer bounding box for the whole machine itself. + * * @param multiblockController The controller to which this part is being assembled. */ void onMachineAssembled(IMultiblockController multiblockController, BlockPos minCoord, BlockPos maxCoord); diff --git a/src/main/java/forestry/api/multiblock/IMultiblockLogic.java b/src/main/java/forestry/api/multiblock/IMultiblockLogic.java index 7a799a940..b0544d758 100644 --- a/src/main/java/forestry/api/multiblock/IMultiblockLogic.java +++ b/src/main/java/forestry/api/multiblock/IMultiblockLogic.java @@ -5,15 +5,14 @@ ******************************************************************************/ package forestry.api.multiblock; +import forestry.api.core.INbtWritable; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; -import forestry.api.core.INbtWritable; - /** * Multiblock Logic implements the basic logic for IMultiblockComponent tile entities. * Instances must come from MultiblockManager.logicFactory, most of the implementation is hidden. - * + *

* IMultiblockComponent tile entities must wire up the methods in the "Updating and Synchronization" section. * As a starting point, you can use MultiblockTileEntityBase. */ diff --git a/src/main/java/forestry/api/multiblock/IMultiblockLogicCharcoalPile.java b/src/main/java/forestry/api/multiblock/IMultiblockLogicCharcoalPile.java index 186ce8f1a..fdcad69e0 100644 --- a/src/main/java/forestry/api/multiblock/IMultiblockLogicCharcoalPile.java +++ b/src/main/java/forestry/api/multiblock/IMultiblockLogicCharcoalPile.java @@ -17,5 +17,5 @@ public interface IMultiblockLogicCharcoalPile extends IMultiblockLogic { */ @Override ICharcoalPileController getController(); - + } diff --git a/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java b/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java index b488fa8f7..c59d70217 100644 --- a/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java +++ b/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java @@ -13,8 +13,8 @@ public interface IMultiblockLogicFactory { IMultiblockLogicAlveary createAlvearyLogic(); IMultiblockLogicFarm createFarmLogic(); - + IMultiblockLogicGreenhouse createGreenhouseLogic(); - + IMultiblockLogicCharcoalPile createCharcoalPileLogic(); } diff --git a/src/main/java/forestry/api/recipes/ICarpenterManager.java b/src/main/java/forestry/api/recipes/ICarpenterManager.java index 62a22de91..fb7592a6a 100644 --- a/src/main/java/forestry/api/recipes/ICarpenterManager.java +++ b/src/main/java/forestry/api/recipes/ICarpenterManager.java @@ -9,17 +9,16 @@ import javax.annotation.Nullable; 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 @@ -28,42 +27,30 @@ 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. + * @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. */ 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 empty. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. + * @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 empty. + * @param product Crafting result. + * @param materials Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. */ 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 empty. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. + * @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 empty. + * @param product Crafting result. + * @param materials Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. */ void addRecipe(int packagingTime, @Nullable FluidStack liquid, ItemStack box, ItemStack product, Object... materials); } diff --git a/src/main/java/forestry/api/recipes/ICentrifugeManager.java b/src/main/java/forestry/api/recipes/ICentrifugeManager.java index 4d1030c90..559ab5b34 100644 --- a/src/main/java/forestry/api/recipes/ICentrifugeManager.java +++ b/src/main/java/forestry/api/recipes/ICentrifugeManager.java @@ -11,10 +11,10 @@ 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 @@ -25,9 +25,9 @@ public interface ICentrifugeManager extends ICraftingProvider * Add a recipe to the centrifuge * * @param timePerItem Time to centrifugate one item of the given type. Default is 20. - * @param input ItemStack containing information on item id and damage. Stack size will be ignored. - * @param products Specifies the possible products and the chances of them resulting from centrifuging. - * Chances are from (0.0 to 1.0] + * @param input ItemStack containing information on item id and damage. Stack size will be ignored. + * @param products Specifies the possible products and the chances of them resulting from centrifuging. + * Chances are from (0.0 to 1.0] */ void addRecipe(int timePerItem, ItemStack input, Map products); diff --git a/src/main/java/forestry/api/recipes/ICentrifugeRecipe.java b/src/main/java/forestry/api/recipes/ICentrifugeRecipe.java index 595123f43..466c34c1b 100644 --- a/src/main/java/forestry/api/recipes/ICentrifugeRecipe.java +++ b/src/main/java/forestry/api/recipes/ICentrifugeRecipe.java @@ -13,13 +13,19 @@ import net.minecraft.item.ItemStack; public interface ICentrifugeRecipe extends IForestryRecipe { - /** The item for this recipe to match against. **/ + /** + * The item for this recipe to match against. + **/ ItemStack getInput(); - /** The time it takes to process one item. Default is 20. **/ + /** + * The time it takes to process one item. Default is 20. + **/ int getProcessingTime(); - /** Returns the randomized products from processing one input item. **/ + /** + * Returns the randomized products from processing one input item. + **/ Collection getProducts(Random random); /** diff --git a/src/main/java/forestry/api/recipes/ICraftingProvider.java b/src/main/java/forestry/api/recipes/ICraftingProvider.java index 36dfd4bf6..37ff536ac 100644 --- a/src/main/java/forestry/api/recipes/ICraftingProvider.java +++ b/src/main/java/forestry/api/recipes/ICraftingProvider.java @@ -10,6 +10,7 @@ import java.util.Collection; public interface ICraftingProvider { /** * Add a new recipe to the crafting provider. + * * @return true if this collection changed as a result of the call * @since Forestry 4.1.0 */ @@ -17,6 +18,7 @@ public interface ICraftingProvider { /** * Remove a specific recipe from the crafting provider. + * * @return true if an element was removed as a result of this call * @since Forestry 4.1.0 */ diff --git a/src/main/java/forestry/api/recipes/IFabricatorManager.java b/src/main/java/forestry/api/recipes/IFabricatorManager.java index d6df1c08d..ac744a625 100644 --- a/src/main/java/forestry/api/recipes/IFabricatorManager.java +++ b/src/main/java/forestry/api/recipes/IFabricatorManager.java @@ -6,7 +6,6 @@ package forestry.api.recipes; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.FluidStack; public interface IFabricatorManager extends ICraftingProvider { diff --git a/src/main/java/forestry/api/recipes/IFabricatorRecipe.java b/src/main/java/forestry/api/recipes/IFabricatorRecipe.java index 7153d7541..d13f4a541 100644 --- a/src/main/java/forestry/api/recipes/IFabricatorRecipe.java +++ b/src/main/java/forestry/api/recipes/IFabricatorRecipe.java @@ -6,7 +6,6 @@ package forestry.api.recipes; import net.minecraft.item.ItemStack; - import net.minecraft.util.NonNullList; import net.minecraftforge.fluids.FluidStack; diff --git a/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java b/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java index 5ec9ef230..000569eb4 100644 --- a/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java +++ b/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java @@ -11,14 +11,14 @@ package forestry.api.recipes; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.FluidStack; public interface IFabricatorSmeltingManager extends ICraftingProvider { /** * Add a smelting recipe to the Fabricator - * @param resource item to be melted down - * @param molten resulting fluid + * + * @param resource item to be melted down + * @param molten resulting fluid * @param meltingPoint temperature at which the item melts. Glass is 1000, Sand is 3000. */ void addSmelting(ItemStack resource, FluidStack molten, int meltingPoint); diff --git a/src/main/java/forestry/api/recipes/IFabricatorSmeltingRecipe.java b/src/main/java/forestry/api/recipes/IFabricatorSmeltingRecipe.java index 3b0a3565b..5ccd79b68 100644 --- a/src/main/java/forestry/api/recipes/IFabricatorSmeltingRecipe.java +++ b/src/main/java/forestry/api/recipes/IFabricatorSmeltingRecipe.java @@ -11,7 +11,6 @@ package forestry.api.recipes; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.FluidStack; public interface IFabricatorSmeltingRecipe extends IForestryRecipe { diff --git a/src/main/java/forestry/api/recipes/IFermenterManager.java b/src/main/java/forestry/api/recipes/IFermenterManager.java index 4723628a0..3ffd8eec8 100644 --- a/src/main/java/forestry/api/recipes/IFermenterManager.java +++ b/src/main/java/forestry/api/recipes/IFermenterManager.java @@ -6,16 +6,15 @@ 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 @@ -25,14 +24,14 @@ public interface IFermenterManager extends ICraftingProvider { /** * Add a recipe to the fermenter * - * @param resource ItemStack representing the resource. + * @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. + * 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 */ void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output, FluidStack liquid); @@ -40,13 +39,13 @@ public interface IFermenterManager extends ICraftingProvider { /** * 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 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. + * 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 */ void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output); diff --git a/src/main/java/forestry/api/recipes/IFermenterRecipe.java b/src/main/java/forestry/api/recipes/IFermenterRecipe.java index 4bbd0f54b..fc5c49df3 100644 --- a/src/main/java/forestry/api/recipes/IFermenterRecipe.java +++ b/src/main/java/forestry/api/recipes/IFermenterRecipe.java @@ -6,7 +6,6 @@ package forestry.api.recipes; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; diff --git a/src/main/java/forestry/api/recipes/IMoistenerManager.java b/src/main/java/forestry/api/recipes/IMoistenerManager.java index 64d7bb634..36cb79510 100644 --- a/src/main/java/forestry/api/recipes/IMoistenerManager.java +++ b/src/main/java/forestry/api/recipes/IMoistenerManager.java @@ -9,10 +9,10 @@ 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 @@ -22,12 +22,9 @@ 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. + * @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. */ void addRecipe(ItemStack resource, ItemStack product, int timePerItem); } diff --git a/src/main/java/forestry/api/recipes/IMoistenerRecipe.java b/src/main/java/forestry/api/recipes/IMoistenerRecipe.java index 73eaf5a92..33ded7d89 100644 --- a/src/main/java/forestry/api/recipes/IMoistenerRecipe.java +++ b/src/main/java/forestry/api/recipes/IMoistenerRecipe.java @@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack; public interface IMoistenerRecipe extends IForestryRecipe { /** * Moistener runs at 1 - 4 time ticks per ingame tick depending on light level. For mycelium this value is currently 5000. + * * @return moistener ticks to process one item. */ int getTimePerItem(); diff --git a/src/main/java/forestry/api/recipes/ISqueezerManager.java b/src/main/java/forestry/api/recipes/ISqueezerManager.java index c2fdff64a..eed8664bf 100644 --- a/src/main/java/forestry/api/recipes/ISqueezerManager.java +++ b/src/main/java/forestry/api/recipes/ISqueezerManager.java @@ -6,16 +6,15 @@ package forestry.api.recipes; import net.minecraft.item.ItemStack; - import net.minecraft.util.NonNullList; 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 @@ -26,10 +25,10 @@ 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. May be empty. - * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 100. + * @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. May be empty. + * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 100. */ void addRecipe(int timePerItem, NonNullList resources, FluidStack liquid, ItemStack remnants, int chance); @@ -37,10 +36,10 @@ 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 item stack 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. May be empty. - * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 100. + * @param resources item stack 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. May be empty. + * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 100. */ void addRecipe(int timePerItem, ItemStack resources, FluidStack liquid, ItemStack remnants, int chance); @@ -48,8 +47,8 @@ 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 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. */ void addRecipe(int timePerItem, NonNullList resources, FluidStack liquid); @@ -57,8 +56,8 @@ 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 item stack 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 resources item stack representing the required resources for one process. Stack size will be taken into account. + * @param liquid {@link FluidStack} representing the output of this recipe. */ void addRecipe(int timePerItem, ItemStack resources, FluidStack liquid); @@ -66,10 +65,10 @@ public interface ISqueezerManager extends ICraftingProvider { * Add a recipe for a fluid container to the squeezer. * This will add recipes to get all types of liquids out of this type of fluid container. * - * @param timePerItem Number of work cycles required to squeeze one set of resources. + * @param timePerItem Number of work cycles required to squeeze one set of resources. * @param emptyContainer The empty version of the fluid container that will be squeezed. - * @param remnants Item stack representing the possible remnants from this recipe. May be empty. - * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 1. + * @param remnants Item stack representing the possible remnants from this recipe. May be empty. + * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 1. */ void addContainerRecipe(int timePerItem, ItemStack emptyContainer, ItemStack remnants, float chance); } diff --git a/src/main/java/forestry/api/recipes/ISqueezerRecipe.java b/src/main/java/forestry/api/recipes/ISqueezerRecipe.java index 4cc23e9db..bc0e7688c 100644 --- a/src/main/java/forestry/api/recipes/ISqueezerRecipe.java +++ b/src/main/java/forestry/api/recipes/ISqueezerRecipe.java @@ -6,7 +6,6 @@ package forestry.api.recipes; import net.minecraft.item.ItemStack; - import net.minecraft.util.NonNullList; import net.minecraftforge.fluids.FluidStack; diff --git a/src/main/java/forestry/api/recipes/IStillManager.java b/src/main/java/forestry/api/recipes/IStillManager.java index 01adab4ab..b91ebe7cf 100644 --- a/src/main/java/forestry/api/recipes/IStillManager.java +++ b/src/main/java/forestry/api/recipes/IStillManager.java @@ -9,12 +9,12 @@ 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 @@ -23,12 +23,9 @@ 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 - * FluidStack representing the input liquid. - * @param output - * FluidStack representing the output liquid + * @param cyclesPerUnit Amount of work cycles required to run through the conversion once. + * @param input FluidStack representing the input liquid. + * @param output FluidStack representing the output liquid */ void addRecipe(int cyclesPerUnit, FluidStack input, FluidStack output); } diff --git a/src/main/java/forestry/api/recipes/IVariableFermentable.java b/src/main/java/forestry/api/recipes/IVariableFermentable.java index a970ff74d..b2fcdbf2e 100644 --- a/src/main/java/forestry/api/recipes/IVariableFermentable.java +++ b/src/main/java/forestry/api/recipes/IVariableFermentable.java @@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack; * 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. diff --git a/src/main/java/forestry/api/recipes/RecipeManagers.java b/src/main/java/forestry/api/recipes/RecipeManagers.java index b3f608d34..403da0ad9 100644 --- a/src/main/java/forestry/api/recipes/RecipeManagers.java +++ b/src/main/java/forestry/api/recipes/RecipeManagers.java @@ -11,7 +11,7 @@ package forestry.api.recipes; * @author SirSengir */ public class RecipeManagers { - + /** * Allows you to add recipes to the carpenter. See {@link ICarpenterManager} for details. */ diff --git a/src/main/java/forestry/api/storage/BackpackEvent.java b/src/main/java/forestry/api/storage/BackpackEvent.java index 9bbe05b35..f8b32b59e 100644 --- a/src/main/java/forestry/api/storage/BackpackEvent.java +++ b/src/main/java/forestry/api/storage/BackpackEvent.java @@ -7,7 +7,6 @@ package forestry.api.storage; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; - import net.minecraftforge.fml.common.eventhandler.Event; public abstract class BackpackEvent extends Event { diff --git a/src/main/java/forestry/api/storage/BackpackResupplyEvent.java b/src/main/java/forestry/api/storage/BackpackResupplyEvent.java index 326c6c0a7..33f79f08d 100644 --- a/src/main/java/forestry/api/storage/BackpackResupplyEvent.java +++ b/src/main/java/forestry/api/storage/BackpackResupplyEvent.java @@ -7,7 +7,6 @@ package forestry.api.storage; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; - import net.minecraftforge.fml.common.eventhandler.Cancelable; /** diff --git a/src/main/java/forestry/api/storage/BackpackStowEvent.java b/src/main/java/forestry/api/storage/BackpackStowEvent.java index bfa495f5d..bfc59c021 100644 --- a/src/main/java/forestry/api/storage/BackpackStowEvent.java +++ b/src/main/java/forestry/api/storage/BackpackStowEvent.java @@ -8,7 +8,6 @@ package forestry.api.storage; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.common.eventhandler.Cancelable; /** diff --git a/src/main/java/forestry/api/storage/IBackpackDefinition.java b/src/main/java/forestry/api/storage/IBackpackDefinition.java index 526451f7a..8c51fe927 100644 --- a/src/main/java/forestry/api/storage/IBackpackDefinition.java +++ b/src/main/java/forestry/api/storage/IBackpackDefinition.java @@ -31,7 +31,7 @@ public interface IBackpackDefinition { /** * Filters items that can be put into a backpack. - * + *

* For Backpack Implementers: you can create a new filter with * {@link IBackpackInterface#createBackpackFilter()} or * {@link IBackpackInterface#createNaturalistBackpackFilter(String)} diff --git a/src/main/java/forestry/api/world/ITreeGenData.java b/src/main/java/forestry/api/world/ITreeGenData.java index da73cd3fe..49677980f 100644 --- a/src/main/java/forestry/api/world/ITreeGenData.java +++ b/src/main/java/forestry/api/world/ITreeGenData.java @@ -8,14 +8,12 @@ package forestry.api.world; import javax.annotation.Nullable; import java.util.Random; +import com.mojang.authlib.GameProfile; +import forestry.api.arboriculture.ITreeGenome; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import com.mojang.authlib.GameProfile; - -import forestry.api.arboriculture.ITreeGenome; - public interface ITreeGenData { int getGirth(); diff --git a/src/main/java/forestry/apiculture/BeekeepingLogic.java b/src/main/java/forestry/apiculture/BeekeepingLogic.java index c130e872d..d5940a9e8 100644 --- a/src/main/java/forestry/apiculture/BeekeepingLogic.java +++ b/src/main/java/forestry/apiculture/BeekeepingLogic.java @@ -486,7 +486,7 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable { @Override public boolean canDoBeeFX() { - if(Proxies.common.getClientInstance().isGamePaused()){ + if (Proxies.common.getClientInstance().isGamePaused()) { return false; } return active; diff --git a/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java b/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java index f5a9a06dd..0215099ae 100755 --- a/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java +++ b/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.apiculture; -import net.minecraft.world.World; - import forestry.api.apiculture.BeeManager; import forestry.core.ISaveEventHandler; +import net.minecraft.world.World; public class SaveEventHandlerApiculture implements ISaveEventHandler { diff --git a/src/main/java/forestry/apiculture/VillageCreationApiculture.java b/src/main/java/forestry/apiculture/VillageCreationApiculture.java index b8433c25f..86db2858b 100644 --- a/src/main/java/forestry/apiculture/VillageCreationApiculture.java +++ b/src/main/java/forestry/apiculture/VillageCreationApiculture.java @@ -14,16 +14,14 @@ import javax.annotation.Nullable; import java.util.List; import java.util.Random; +import forestry.apiculture.worldgen.VillageApiaristHouse; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.MathHelper; import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraft.world.gen.structure.StructureComponent; import net.minecraft.world.gen.structure.StructureVillagePieces; - import net.minecraftforge.fml.common.registry.VillagerRegistry; -import forestry.apiculture.worldgen.VillageApiaristHouse; - public class VillageCreationApiculture implements VillagerRegistry.IVillageCreationHandler { public static void registerVillageComponents() { diff --git a/src/main/java/forestry/apiculture/blocks/AlvearyItemModel.java b/src/main/java/forestry/apiculture/blocks/AlvearyItemModel.java index f2b942ad5..3c6ff258f 100644 --- a/src/main/java/forestry/apiculture/blocks/AlvearyItemModel.java +++ b/src/main/java/forestry/apiculture/blocks/AlvearyItemModel.java @@ -1,12 +1,10 @@ package forestry.apiculture.blocks; -import net.minecraft.item.Item; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.api.core.IItemModelRegister; import forestry.api.core.IModelManager; +import net.minecraft.item.Item; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class AlvearyItemModel implements IItemModelRegister { private final BlockAlveary blockAlveary; diff --git a/src/main/java/forestry/apiculture/blocks/BlockBeeHives.java b/src/main/java/forestry/apiculture/blocks/BlockBeeHives.java index 77aa984cc..0e33ca4c7 100644 --- a/src/main/java/forestry/apiculture/blocks/BlockBeeHives.java +++ b/src/main/java/forestry/apiculture/blocks/BlockBeeHives.java @@ -16,6 +16,19 @@ import java.util.Collections; import java.util.List; import java.util.Random; +import forestry.api.apiculture.BeeManager; +import forestry.api.apiculture.EnumBeeType; +import forestry.api.apiculture.IBee; +import forestry.api.apiculture.IHiveDrop; +import forestry.api.apiculture.IHiveTile; +import forestry.api.apiculture.hives.IHiveRegistry.HiveType; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; +import forestry.api.core.Tabs; +import forestry.apiculture.MaterialBeehive; +import forestry.apiculture.PluginApiculture; +import forestry.apiculture.tiles.TileHive; +import forestry.core.blocks.IBlockWithMeta; import net.minecraft.block.BlockContainer; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; @@ -30,27 +43,12 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.apiculture.BeeManager; -import forestry.api.apiculture.EnumBeeType; -import forestry.api.apiculture.IBee; -import forestry.api.apiculture.IHiveDrop; -import forestry.api.apiculture.IHiveTile; -import forestry.api.apiculture.hives.IHiveRegistry.HiveType; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.api.core.Tabs; -import forestry.apiculture.MaterialBeehive; -import forestry.apiculture.PluginApiculture; -import forestry.apiculture.tiles.TileHive; -import forestry.core.blocks.IBlockWithMeta; - public class BlockBeeHives extends BlockContainer implements IItemModelRegister, IBlockWithMeta { private static final PropertyEnum HIVE_TYPES = PropertyEnum.create("hive", HiveType.class); - + public BlockBeeHives() { super(new MaterialBeehive(true)); setLightLevel(0.4f); @@ -59,7 +57,7 @@ public class BlockBeeHives extends BlockContainer implements IItemModelRegister, setHarvestLevel("scoop", 0); setDefaultState(this.blockState.getBaseState().withProperty(HIVE_TYPES, HiveType.FOREST)); } - + @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, HIVE_TYPES); @@ -195,7 +193,7 @@ public class BlockBeeHives extends BlockContainer implements IItemModelRegister, @Override @SideOnly(Side.CLIENT) public void registerModel(Item item, IModelManager manager) { - for (HiveType hiveType : HiveType.VALUES) { + for (HiveType hiveType : HiveType.VALUES) { manager.registerItemModel(item, hiveType.getMeta(), "beehives/" + hiveType.getName()); } } diff --git a/src/main/java/forestry/apiculture/blocks/BlockCandle.java b/src/main/java/forestry/apiculture/blocks/BlockCandle.java index efe1a5689..d7d00aace 100644 --- a/src/main/java/forestry/apiculture/blocks/BlockCandle.java +++ b/src/main/java/forestry/apiculture/blocks/BlockCandle.java @@ -11,9 +11,6 @@ package forestry.apiculture.blocks; import javax.annotation.Nullable; - -import com.google.common.collect.ImmutableMap; - import java.awt.Color; import java.util.ArrayList; import java.util.Arrays; @@ -23,6 +20,14 @@ import java.util.Map; import java.util.Random; import java.util.Set; +import com.google.common.collect.ImmutableMap; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; +import forestry.api.core.Tabs; +import forestry.apiculture.tiles.TileCandle; +import forestry.core.blocks.IColoredBlock; +import forestry.core.tiles.TileUtil; +import forestry.core.utils.ItemStackUtil; import net.minecraft.block.BlockTorch; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.SoundType; @@ -46,25 +51,16 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.api.core.Tabs; -import forestry.apiculture.tiles.TileCandle; -import forestry.core.blocks.IColoredBlock; -import forestry.core.tiles.TileUtil; -import forestry.core.utils.ItemStackUtil; - public class BlockCandle extends BlockTorch implements IItemModelRegister, ITileEntityProvider, IColoredBlock { private static final ImmutableMap colours; public static final Set lightingItems; public static final String colourTagName = "colour"; - + private static final PropertyEnum STATE = PropertyEnum.create("state", State.class); private enum State implements IStringSerializable { @@ -81,7 +77,7 @@ public class BlockCandle extends BlockTorch implements IItemModelRegister, ITile return name; } } - + static { colours = ImmutableMap.builder() .put("dyeWhite", new Color(255, 255, 255).getRGB()) @@ -115,12 +111,12 @@ public class BlockCandle extends BlockTorch implements IItemModelRegister, ITile setCreativeTab(Tabs.tabApiculture); setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP).withProperty(STATE, State.OFF)); } - + @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, FACING, STATE); } - + @Override public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) { TileCandle tileCandle = TileUtil.getTile(world, pos, TileCandle.class); @@ -244,7 +240,7 @@ public class BlockCandle extends BlockTorch implements IItemModelRegister, ITile drop.set(itemStack); } } - + @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { ItemStack dropStack = drop.get(); diff --git a/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java b/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java index e9f1af7b4..723c76ce7 100644 --- a/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java +++ b/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java @@ -12,14 +12,13 @@ package forestry.apiculture.blocks; import java.util.Map; -import net.minecraft.block.material.Material; -import net.minecraft.item.ItemStack; - import forestry.api.core.Tabs; import forestry.apiculture.items.ItemBlockCandle; import forestry.core.blocks.BlockBase; import forestry.core.blocks.BlockRegistry; import forestry.core.items.ItemBlockForestry; +import net.minecraft.block.material.Material; +import net.minecraft.item.ItemStack; public class BlockRegistryApiculture extends BlockRegistry { public final BlockApiculture apiary; diff --git a/src/main/java/forestry/apiculture/commands/BeeModeHelper.java b/src/main/java/forestry/apiculture/commands/BeeModeHelper.java index 336023fa4..8ad1de7e5 100644 --- a/src/main/java/forestry/apiculture/commands/BeeModeHelper.java +++ b/src/main/java/forestry/apiculture/commands/BeeModeHelper.java @@ -15,11 +15,10 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import net.minecraft.world.World; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBeekeepingMode; import forestry.core.commands.ICommandModeHelper; +import net.minecraft.world.World; public class BeeModeHelper implements ICommandModeHelper { diff --git a/src/main/java/forestry/apiculture/commands/BeeStatsSaveHelper.java b/src/main/java/forestry/apiculture/commands/BeeStatsSaveHelper.java index 38ed146cf..415c32548 100644 --- a/src/main/java/forestry/apiculture/commands/BeeStatsSaveHelper.java +++ b/src/main/java/forestry/apiculture/commands/BeeStatsSaveHelper.java @@ -13,10 +13,7 @@ package forestry.apiculture.commands; import java.util.ArrayList; import java.util.Collection; -import net.minecraft.world.World; - import com.mojang.authlib.GameProfile; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IAlleleBeeSpecies; import forestry.api.apiculture.IApiaristTracker; @@ -27,6 +24,7 @@ import forestry.api.genetics.IBreedingTracker; import forestry.core.commands.IStatsSaveHelper; import forestry.core.utils.StringUtil; import forestry.core.utils.Translator; +import net.minecraft.world.World; public class BeeStatsSaveHelper implements IStatsSaveHelper { diff --git a/src/main/java/forestry/apiculture/entities/ParticleBeeExplore.java b/src/main/java/forestry/apiculture/entities/ParticleBeeExplore.java index f8438609b..b63e871b2 100644 --- a/src/main/java/forestry/apiculture/entities/ParticleBeeExplore.java +++ b/src/main/java/forestry/apiculture/entities/ParticleBeeExplore.java @@ -10,6 +10,7 @@ ******************************************************************************/ package forestry.apiculture.entities; +import forestry.apiculture.proxy.ProxyApicultureClient; import net.minecraft.client.particle.Particle; import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.entity.Entity; @@ -17,8 +18,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import forestry.apiculture.proxy.ProxyApicultureClient; - public class ParticleBeeExplore extends Particle { private final Vec3d origin; diff --git a/src/main/java/forestry/apiculture/entities/ParticleBeeRoundTrip.java b/src/main/java/forestry/apiculture/entities/ParticleBeeRoundTrip.java index c00700129..9ef7ae414 100644 --- a/src/main/java/forestry/apiculture/entities/ParticleBeeRoundTrip.java +++ b/src/main/java/forestry/apiculture/entities/ParticleBeeRoundTrip.java @@ -10,6 +10,7 @@ ******************************************************************************/ package forestry.apiculture.entities; +import forestry.apiculture.proxy.ProxyApicultureClient; import net.minecraft.client.particle.Particle; import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.entity.Entity; @@ -17,8 +18,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import forestry.apiculture.proxy.ProxyApicultureClient; - public class ParticleBeeRoundTrip extends Particle { private final Vec3d origin; private final BlockPos destination; diff --git a/src/main/java/forestry/apiculture/entities/ParticleBeeTargetEntity.java b/src/main/java/forestry/apiculture/entities/ParticleBeeTargetEntity.java index 7289f9d8e..d31e595e7 100644 --- a/src/main/java/forestry/apiculture/entities/ParticleBeeTargetEntity.java +++ b/src/main/java/forestry/apiculture/entities/ParticleBeeTargetEntity.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.entities; +import forestry.apiculture.proxy.ProxyApicultureClient; import net.minecraft.client.particle.Particle; import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.entity.Entity; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import forestry.apiculture.proxy.ProxyApicultureClient; - public class ParticleBeeTargetEntity extends Particle { private final Vec3d origin; private final Entity entity; diff --git a/src/main/java/forestry/apiculture/flowers/Flower.java b/src/main/java/forestry/apiculture/flowers/Flower.java index f6cf6014d..ecec90a50 100644 --- a/src/main/java/forestry/apiculture/flowers/Flower.java +++ b/src/main/java/forestry/apiculture/flowers/Flower.java @@ -11,7 +11,6 @@ package forestry.apiculture.flowers; import com.google.common.base.Objects; - import net.minecraft.block.state.IBlockState; public final class Flower { @@ -27,7 +26,7 @@ public final class Flower { public boolean isPlantable() { return this.weight != 0.0; } - + @Override public boolean equals(Object obj) { if (!(obj instanceof Flower)) { diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java index b174ce922..61c384e62 100644 --- a/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java +++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.flowers; +import forestry.api.genetics.IFlowerGrowthHelper; +import forestry.api.genetics.IFlowerGrowthRule; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.genetics.IFlowerGrowthHelper; -import forestry.api.genetics.IFlowerGrowthRule; - public class GrowthRuleDirtGrass implements IFlowerGrowthRule { @Override diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java index 5a1cfd604..c99fdf8fa 100644 --- a/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java +++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java @@ -13,14 +13,13 @@ package forestry.apiculture.flowers; import java.util.Arrays; import java.util.List; +import forestry.api.genetics.IFlowerGrowthHelper; +import forestry.api.genetics.IFlowerGrowthRule; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.genetics.IFlowerGrowthHelper; -import forestry.api.genetics.IFlowerGrowthRule; - public class GrowthRuleFertilize implements IFlowerGrowthRule { private final List allowedItems; diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java index 480b20a4d..e0dcc63ff 100644 --- a/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java +++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.flowers; +import forestry.api.genetics.IFlowerGrowthHelper; +import forestry.api.genetics.IFlowerGrowthRule; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.genetics.IFlowerGrowthHelper; -import forestry.api.genetics.IFlowerGrowthRule; - public class GrowthRuleMycelium implements IFlowerGrowthRule { @Override diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java index 7194e0ade..546e82a29 100644 --- a/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java +++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.apiculture.flowers; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.genetics.IFlowerGrowthHelper; import forestry.api.genetics.IFlowerGrowthRule; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class GrowthRuleNone implements IFlowerGrowthRule { diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java index a572366c9..fbc66222a 100644 --- a/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java +++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.flowers; +import forestry.api.genetics.IFlowerGrowthHelper; +import forestry.api.genetics.IFlowerGrowthRule; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.genetics.IFlowerGrowthHelper; -import forestry.api.genetics.IFlowerGrowthRule; - public class GrowthRuleSnow implements IFlowerGrowthRule { @Override diff --git a/src/main/java/forestry/apiculture/genetics/BeeAlyzerPlugin.java b/src/main/java/forestry/apiculture/genetics/BeeAlyzerPlugin.java index e5feba7ea..c2b1e6178 100644 --- a/src/main/java/forestry/apiculture/genetics/BeeAlyzerPlugin.java +++ b/src/main/java/forestry/apiculture/genetics/BeeAlyzerPlugin.java @@ -47,7 +47,7 @@ public class BeeAlyzerPlugin implements IAlyzerPlugin { @SideOnly(Side.CLIENT) @Override public void drawAnalyticsPage1(GuiScreen gui, ItemStack itemStack) { - if(gui instanceof GuiAlyzer){ + if (gui instanceof GuiAlyzer) { GuiAlyzer guiAlyzer = (GuiAlyzer) gui; IBee bee = BeeManager.beeRoot.getMember(itemStack); if (bee == null) { @@ -57,25 +57,25 @@ public class BeeAlyzerPlugin implements IAlyzerPlugin { if (type == null) { return; } - + TextLayoutHelper textLayout = guiAlyzer.getTextLayout(); - + textLayout.startPage(GuiAlyzer.COLUMN_0, GuiAlyzer.COLUMN_1, GuiAlyzer.COLUMN_2); - + textLayout.drawLine(Translator.translateToLocal("for.gui.active"), GuiAlyzer.COLUMN_1); textLayout.drawLine(Translator.translateToLocal("for.gui.inactive"), GuiAlyzer.COLUMN_2); - + textLayout.newLine(); textLayout.newLine(); - + { String customPrimaryBeeKey = "for.bees.custom.beealyzer." + type.getName() + "." + bee.getGenome().getPrimary().getUnlocalizedName().replace("bees.species.", ""); String customSecondaryBeeKey = "for.bees.custom.beealyzer." + type.getName() + "." + bee.getGenome().getSecondary().getUnlocalizedName().replace("bees.species.", ""); - + guiAlyzer.drawSpeciesRow(Translator.translateToLocal("for.gui.species"), bee, EnumBeeChromosome.SPECIES, GuiAlyzer.checkCustomName(customPrimaryBeeKey), GuiAlyzer.checkCustomName(customSecondaryBeeKey)); textLayout.newLine(); } - + guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.lifespan"), bee, EnumBeeChromosome.LIFESPAN); textLayout.newLine(); guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.speed"), bee, EnumBeeChromosome.SPEED); @@ -84,20 +84,20 @@ public class BeeAlyzerPlugin implements IAlyzerPlugin { textLayout.newLine(); guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.flowers"), bee, EnumBeeChromosome.FLOWER_PROVIDER); textLayout.newLine(); - + textLayout.drawLine(Translator.translateToLocal("for.gui.fertility"), GuiAlyzer.COLUMN_0); IAlleleInteger primaryFertility = (IAlleleInteger) bee.getGenome().getActiveAllele(EnumBeeChromosome.FERTILITY); IAlleleInteger secondaryFertility = (IAlleleInteger) bee.getGenome().getInactiveAllele(EnumBeeChromosome.FERTILITY); guiAlyzer.drawFertilityInfo(primaryFertility.getValue(), GuiAlyzer.COLUMN_1, guiAlyzer.getColorCoding(primaryFertility.isDominant()), 0); guiAlyzer.drawFertilityInfo(secondaryFertility.getValue(), GuiAlyzer.COLUMN_2, guiAlyzer.getColorCoding(secondaryFertility.isDominant()), 0); textLayout.newLine(); - + guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.area"), bee, EnumBeeChromosome.TERRITORY); textLayout.newLine(); - + guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.effect"), bee, EnumBeeChromosome.EFFECT); textLayout.newLine(); - + textLayout.endPage(); } } @@ -105,52 +105,52 @@ public class BeeAlyzerPlugin implements IAlyzerPlugin { @SideOnly(Side.CLIENT) @Override public void drawAnalyticsPage2(GuiScreen gui, ItemStack itemStack) { - if(gui instanceof GuiAlyzer){ + if (gui instanceof GuiAlyzer) { GuiAlyzer guiAlyzer = (GuiAlyzer) gui; IBee bee = BeeManager.beeRoot.getMember(itemStack); if (bee == null) { return; } EnumBeeType type = BeeManager.beeRoot.getType(itemStack); - + TextLayoutHelper textLayout = guiAlyzer.getTextLayout(); - + textLayout.startPage(GuiAlyzer.COLUMN_0, GuiAlyzer.COLUMN_1, GuiAlyzer.COLUMN_2); - + textLayout.drawLine(Translator.translateToLocal("for.gui.active"), GuiAlyzer.COLUMN_1); textLayout.drawLine(Translator.translateToLocal("for.gui.inactive"), GuiAlyzer.COLUMN_2); - + textLayout.newLine(); - + guiAlyzer.drawRow(Translator.translateToLocal("for.gui.climate"), AlleleManager.climateHelper.toDisplay(bee.getGenome().getPrimary().getTemperature()), AlleleManager.climateHelper.toDisplay(bee.getGenome().getSecondary().getTemperature()), bee, EnumBeeChromosome.SPECIES); - + textLayout.newLine(); - + IAlleleTolerance tempToleranceActive = (IAlleleTolerance) bee.getGenome().getActiveAllele(EnumBeeChromosome.TEMPERATURE_TOLERANCE); IAlleleTolerance tempToleranceInactive = (IAlleleTolerance) bee.getGenome().getInactiveAllele(EnumBeeChromosome.TEMPERATURE_TOLERANCE); textLayout.drawLine(" " + Translator.translateToLocal("for.gui.tolerance"), GuiAlyzer.COLUMN_0); guiAlyzer.drawToleranceInfo(tempToleranceActive, GuiAlyzer.COLUMN_1); guiAlyzer.drawToleranceInfo(tempToleranceInactive, GuiAlyzer.COLUMN_2); - + textLayout.newLine(16); - + guiAlyzer.drawRow(Translator.translateToLocal("for.gui.humidity"), AlleleManager.climateHelper.toDisplay(bee.getGenome().getPrimary().getHumidity()), AlleleManager.climateHelper.toDisplay(bee.getGenome().getSecondary().getHumidity()), bee, EnumBeeChromosome.SPECIES); - + textLayout.newLine(); - + IAlleleTolerance humidToleranceActive = (IAlleleTolerance) bee.getGenome().getActiveAllele(EnumBeeChromosome.HUMIDITY_TOLERANCE); IAlleleTolerance humidToleranceInactive = (IAlleleTolerance) bee.getGenome().getInactiveAllele(EnumBeeChromosome.HUMIDITY_TOLERANCE); textLayout.drawLine(" " + Translator.translateToLocal("for.gui.tolerance"), GuiAlyzer.COLUMN_0); guiAlyzer.drawToleranceInfo(humidToleranceActive, GuiAlyzer.COLUMN_1); guiAlyzer.drawToleranceInfo(humidToleranceInactive, GuiAlyzer.COLUMN_2); - + textLayout.newLine(16); - + String yes = Translator.translateToLocal("for.yes"); String no = Translator.translateToLocal("for.no"); - + String diurnal0, diurnal1, nocturnal0, nocturnal1; if (bee.getGenome().getNeverSleeps()) { nocturnal0 = diurnal0 = yes; @@ -164,31 +164,31 @@ public class BeeAlyzerPlugin implements IAlyzerPlugin { nocturnal1 = bee.getGenome().getSecondary().isNocturnal() ? yes : no; diurnal1 = !bee.getGenome().getSecondary().isNocturnal() ? yes : no; } - + textLayout.drawLine(Translator.translateToLocal("for.gui.diurnal"), GuiAlyzer.COLUMN_0); textLayout.drawLine(diurnal0, GuiAlyzer.COLUMN_1, guiAlyzer.getColorCoding(false)); textLayout.drawLine(diurnal1, GuiAlyzer.COLUMN_2, guiAlyzer.getColorCoding(false)); textLayout.newLineCompressed(); - + textLayout.drawLine(Translator.translateToLocal("for.gui.nocturnal"), GuiAlyzer.COLUMN_0); textLayout.drawLine(nocturnal0, GuiAlyzer.COLUMN_1, guiAlyzer.getColorCoding(false)); textLayout.drawLine(nocturnal1, GuiAlyzer.COLUMN_2, guiAlyzer.getColorCoding(false)); textLayout.newLineCompressed(); - + String primary = StringUtil.readableBoolean(bee.getGenome().getToleratesRain(), yes, no); String secondary = StringUtil.readableBoolean(((AlleleBoolean) bee.getGenome().getInactiveAllele(EnumBeeChromosome.TOLERATES_RAIN)).getValue(), yes, no); - + guiAlyzer.drawRow(Translator.translateToLocal("for.gui.flyer"), primary, secondary, bee, EnumBeeChromosome.TOLERATES_RAIN); - + textLayout.newLineCompressed(); - + primary = StringUtil.readableBoolean(bee.getGenome().getCaveDwelling(), yes, no); secondary = StringUtil.readableBoolean(((AlleleBoolean) bee.getGenome().getInactiveAllele(EnumBeeChromosome.CAVE_DWELLING)).getValue(), yes, no); - + guiAlyzer.drawRow(Translator.translateToLocal("for.gui.cave"), primary, secondary, bee, EnumBeeChromosome.CAVE_DWELLING); - + textLayout.newLine(); - + String displayText; if (type == EnumBeeType.PRINCESS || type == EnumBeeType.QUEEN) { String displayTextKey = "for.bees.stock.pristine"; @@ -198,13 +198,13 @@ public class BeeAlyzerPlugin implements IAlyzerPlugin { displayText = Translator.translateToLocal(displayTextKey); textLayout.drawCenteredLine(displayText, 8, 208, guiAlyzer.getFontColor().get("gui.beealyzer.binomial")); } - + if (bee.getGeneration() >= 0) { textLayout.newLineCompressed(); displayText = Translator.translateToLocalFormatted("for.gui.beealyzer.generations", bee.getGeneration()); textLayout.drawCenteredLine(displayText, 8, 208, guiAlyzer.getFontColor().get("gui.beealyzer.binomial")); } - + textLayout.endPage(); } } @@ -212,52 +212,52 @@ public class BeeAlyzerPlugin implements IAlyzerPlugin { @SideOnly(Side.CLIENT) @Override public void drawAnalyticsPage3(GuiScreen gui, ItemStack itemStack) { - if(gui instanceof GuiAlyzer){ + if (gui instanceof GuiAlyzer) { GuiAlyzer guiAlyzer = (GuiAlyzer) gui; IBee bee = BeeManager.beeRoot.getMember(itemStack); if (bee == null) { return; } - + TextLayoutHelper textLayout = guiAlyzer.getTextLayout(); WidgetManager widgetManager = guiAlyzer.getWidgetManager(); - + textLayout.startPage(GuiAlyzer.COLUMN_0, GuiAlyzer.COLUMN_1, GuiAlyzer.COLUMN_2); - + textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.produce") + ":", GuiAlyzer.COLUMN_0); - + textLayout.newLine(); - + int x = GuiAlyzer.COLUMN_0; for (ItemStack stack : bee.getProduceList()) { widgetManager.add(new ItemStackWidget(widgetManager, x, textLayout.getLineY(), stack)); - + x += 18; if (x > 148) { x = GuiAlyzer.COLUMN_0; textLayout.newLine(); } } - + textLayout.newLine(); textLayout.newLine(); textLayout.newLine(); textLayout.newLine(); - + textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.specialty") + ":", GuiAlyzer.COLUMN_0); textLayout.newLine(); - + x = GuiAlyzer.COLUMN_0; for (ItemStack stack : bee.getSpecialtyList()) { widgetManager.add(new ItemStackWidget(widgetManager, x, textLayout.getLineY(), stack)); - + x += 18; if (x > 148) { x = GuiAlyzer.COLUMN_0; textLayout.newLine(); } } - + textLayout.endPage(); } } diff --git a/src/main/java/forestry/apiculture/genetics/BeeDefinition.java b/src/main/java/forestry/apiculture/genetics/BeeDefinition.java index 259afceb3..a93e1e1a1 100644 --- a/src/main/java/forestry/apiculture/genetics/BeeDefinition.java +++ b/src/main/java/forestry/apiculture/genetics/BeeDefinition.java @@ -531,7 +531,7 @@ public enum BeeDefinition implements IBeeDefinition { protected void setAlleles(IAllele[] template) { AlleleHelper.getInstance().set(template, EnumBeeChromosome.EFFECT, AlleleEffects.effectReanimation); } - + @Override protected void registerMutations() { registerMutation(HERMITIC, ENDED, 4); @@ -551,7 +551,7 @@ public enum BeeDefinition implements IBeeDefinition { AlleleHelper.getInstance().set(template, EnumBeeChromosome.LIFESPAN, EnumAllele.Lifespan.LONGEST); AlleleHelper.getInstance().set(template, EnumBeeChromosome.EFFECT, AlleleEffects.effectResurrection); } - + @Override protected void registerMutations() { registerMutation(SPECTRAL, ENDED, 2); @@ -633,7 +633,7 @@ public enum BeeDefinition implements IBeeDefinition { AlleleHelper.getInstance().set(template, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWER); AlleleHelper.getInstance().set(template, EnumBeeChromosome.LIFESPAN, EnumAllele.Lifespan.NORMAL); } - + @Override protected void registerMutations() { registerMutation(MONASTIC, DEMONIC, 4).setIsSecret(); @@ -651,7 +651,7 @@ public enum BeeDefinition implements IBeeDefinition { AlleleHelper.getInstance().set(template, EnumBeeChromosome.SPEED, EnumAllele.Speed.NORMAL); AlleleHelper.getInstance().set(template, EnumBeeChromosome.LIFESPAN, EnumAllele.Lifespan.LONGER); } - + @Override protected void registerMutations() { registerMutation(DEMONIC, VINDICTIVE, 8).setIsSecret(); @@ -671,7 +671,7 @@ public enum BeeDefinition implements IBeeDefinition { AlleleHelper.getInstance().set(template, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWEST); AlleleHelper.getInstance().set(template, EnumBeeChromosome.LIFESPAN, EnumAllele.Lifespan.LONGEST); } - + @Override protected void registerMutations() { registerMutation(VENGEFUL, VINDICTIVE, 4); @@ -970,7 +970,7 @@ public enum BeeDefinition implements IBeeDefinition { AlleleHelper.getInstance().set(template, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.FASTEST); AlleleHelper.getInstance().set(template, EnumBeeChromosome.EFFECT, AlleleEffects.effectRepulsion); } - + @Override protected void registerMutations() { registerMutation(MONASTIC, SECLUDED, 8); @@ -986,7 +986,7 @@ public enum BeeDefinition implements IBeeDefinition { private IAllele[] template; @Nullable private IBeeGenome genome; - + BeeDefinition(BeeBranchDefinition branch, String binomial, boolean dominant, Color primary, Color secondary) { String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH); String species = "species" + WordUtils.capitalize(lowercaseName); @@ -1023,9 +1023,9 @@ public enum BeeDefinition implements IBeeDefinition { } MinecraftForge.EVENT_BUS.post(new AlleleSpeciesRegisterEvent(BeeManager.beeRoot)); } - + public static void preInit() { - + } private void init() { diff --git a/src/main/java/forestry/apiculture/genetics/BeeMutation.java b/src/main/java/forestry/apiculture/genetics/BeeMutation.java index 49ac20124..92b14c4c8 100644 --- a/src/main/java/forestry/apiculture/genetics/BeeMutation.java +++ b/src/main/java/forestry/apiculture/genetics/BeeMutation.java @@ -10,9 +10,6 @@ ******************************************************************************/ package forestry.apiculture.genetics; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IAlleleBeeSpecies; import forestry.api.apiculture.IBeeGenome; @@ -23,18 +20,20 @@ import forestry.api.apiculture.IBeeMutationBuilder; import forestry.api.apiculture.IBeeRoot; import forestry.api.genetics.IAllele; import forestry.core.genetics.mutations.Mutation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class BeeMutation extends Mutation implements IBeeMutation, IBeeMutationBuilder { public BeeMutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance) { super(bee0, bee1, result, chance); } - + @Override public IBeeMutation build() { return this; } - + @Override public IBeeRoot getRoot() { return BeeManager.beeRoot; diff --git a/src/main/java/forestry/apiculture/genetics/BeeRoot.java b/src/main/java/forestry/apiculture/genetics/BeeRoot.java index 4006c111c..7daeac74e 100644 --- a/src/main/java/forestry/apiculture/genetics/BeeRoot.java +++ b/src/main/java/forestry/apiculture/genetics/BeeRoot.java @@ -57,7 +57,9 @@ public class BeeRoot extends SpeciesRoot implements IBeeRoot { private static int beeSpeciesCount = -1; private static final List beeTemplates = new ArrayList<>(); - /** List of possible mutations on species alleles. */ + /** + * List of possible mutations on species alleles. + */ private static final List beeMutations = new ArrayList<>(); public static final String UID = "rootBees"; diff --git a/src/main/java/forestry/apiculture/genetics/BeeVariation.java b/src/main/java/forestry/apiculture/genetics/BeeVariation.java index ed37c214e..20f2a2bd5 100644 --- a/src/main/java/forestry/apiculture/genetics/BeeVariation.java +++ b/src/main/java/forestry/apiculture/genetics/BeeVariation.java @@ -1,7 +1,5 @@ package forestry.apiculture.genetics; -import net.minecraft.item.ItemStack; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.apiculture.EnumBeeType; @@ -9,6 +7,7 @@ import forestry.api.apiculture.IBee; import forestry.api.apiculture.IBeeGenome; import forestry.api.genetics.IAllele; import forestry.core.genetics.alleles.AlleleHelper; +import net.minecraft.item.ItemStack; public abstract class BeeVariation implements IBeeDefinition { diff --git a/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java b/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java index f849d087f..0b332ea14 100755 --- a/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java +++ b/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java @@ -15,9 +15,6 @@ import java.util.List; import java.util.Locale; import java.util.Random; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.DefaultBeeModifier; import forestry.api.apiculture.IBee; @@ -25,6 +22,8 @@ import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.apiculture.IBeeModifier; import forestry.api.apiculture.IBeekeepingMode; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class BeekeepingMode implements IBeekeepingMode { @@ -102,10 +101,10 @@ public class BeekeepingMode implements IBeekeepingMode { return true; } } - + return false; } - + @Override public boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing) { IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing); @@ -116,10 +115,10 @@ public class BeekeepingMode implements IBeekeepingMode { return true; } } - + return false; } - + @Override public boolean isNaturalOffspring(IBee queen) { return queen.isNatural(); diff --git a/src/main/java/forestry/apiculture/genetics/DefaultBeeModelProvider.java b/src/main/java/forestry/apiculture/genetics/DefaultBeeModelProvider.java index 9934b337c..a87e39aa3 100644 --- a/src/main/java/forestry/apiculture/genetics/DefaultBeeModelProvider.java +++ b/src/main/java/forestry/apiculture/genetics/DefaultBeeModelProvider.java @@ -13,18 +13,16 @@ package forestry.apiculture.genetics; import javax.annotation.Nullable; import java.util.Locale; -import net.minecraft.client.renderer.block.model.ModelBakery; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.api.apiculture.EnumBeeType; import forestry.api.apiculture.IBeeModelProvider; import forestry.api.core.IModelManager; import forestry.apiculture.items.ItemBeeGE; +import net.minecraft.client.renderer.block.model.ModelBakery; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class DefaultBeeModelProvider implements IBeeModelProvider { diff --git a/src/main/java/forestry/apiculture/genetics/HiveDrop.java b/src/main/java/forestry/apiculture/genetics/HiveDrop.java index 99e20df93..8b3ad68bd 100755 --- a/src/main/java/forestry/apiculture/genetics/HiveDrop.java +++ b/src/main/java/forestry/apiculture/genetics/HiveDrop.java @@ -14,13 +14,12 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import forestry.api.apiculture.IBee; +import forestry.api.apiculture.IHiveDrop; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; -import forestry.api.apiculture.IBee; -import forestry.api.apiculture.IHiveDrop; - public class HiveDrop implements IHiveDrop { private final IBeeDefinition beeTemplate; @@ -39,7 +38,7 @@ public class HiveDrop implements IHiveDrop { this.ignobleShare = share; return this; } - + @Override public IBee getBeeType(IBlockAccess world, BlockPos pos) { return beeTemplate.getIndividual(); diff --git a/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java b/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java index 71c30aa1c..cdd082c8f 100644 --- a/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java +++ b/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.genetics; -import net.minecraft.item.ItemStack; - import forestry.api.apiculture.EnumBeeType; import forestry.api.apiculture.IBee; import forestry.api.apiculture.IBeeGenome; import forestry.core.genetics.IGeneticDefinition; +import net.minecraft.item.ItemStack; public interface IBeeDefinition extends IGeneticDefinition { @Override diff --git a/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java b/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java index bb8277784..872f0582b 100755 --- a/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java +++ b/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java @@ -12,12 +12,11 @@ package forestry.apiculture.genetics; import java.util.List; -import net.minecraft.entity.EntityLiving; - import forestry.api.apiculture.IAlleleBeeSpecies; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.apiculture.genetics.alleles.AlleleEffect; +import net.minecraft.entity.EntityLiving; /** * Hermits will not produce if there are any other living creatures nearby. diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java index 1e9b97f5d..8e98c437d 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java @@ -15,16 +15,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - import com.mojang.authlib.GameProfile; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.apiculture.EnumBeeType; @@ -45,6 +36,12 @@ import forestry.apiculture.genetics.DefaultBeeSpriteColourProvider; import forestry.apiculture.genetics.JubilanceDefault; import forestry.core.genetics.alleles.AlleleSpecies; import forestry.core.utils.ItemStackUtil; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpecies, IAlleleBeeSpeciesBuilder { private final Map productChances = new HashMap<>(); @@ -109,7 +106,7 @@ public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpecies nocturnal = true; return this; } - + @Override public IAlleleBeeSpeciesBuilder setCustomBeeModelProvider(IBeeModelProvider beeIconProvider) { this.beeModelProvider = beeIconProvider; @@ -179,10 +176,10 @@ public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpecies public boolean isJubilant(IBeeGenome genome, IBeeHousing housing) { return jubilanceProvider.isJubilant(this, genome, housing); } - + @SideOnly(Side.CLIENT) @Override - public void registerModels(Item item, IModelManager manager){ + public void registerModels(Item item, IModelManager manager) { beeModelProvider.registerModels(item, manager); } diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java index 6a1aa9238..f562b820f 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java @@ -12,14 +12,13 @@ package forestry.apiculture.genetics.alleles; import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.DamageSource; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; import forestry.core.utils.DamageSourceForestry; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; public class AlleleEffectAggressive extends AlleleEffectThrottled { private static final DamageSource damageSourceBeeAggressive = new DamageSourceForestry("bee.aggressive"); diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java index 2547ecc18..cc3635f13 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java @@ -10,20 +10,18 @@ ******************************************************************************/ package forestry.apiculture.genetics.alleles; -import javax.annotation.Nullable; import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; import forestry.core.genetics.EffectData; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.SoundEvents; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class AlleleEffectCreeper extends AlleleEffectThrottled { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectExploration.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectExploration.java index 7624b2bae..78fe19c48 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectExploration.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectExploration.java @@ -12,11 +12,10 @@ package forestry.apiculture.genetics.alleles; import java.util.List; -import net.minecraft.entity.player.EntityPlayer; - import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; +import net.minecraft.entity.player.EntityPlayer; public class AlleleEffectExploration extends AlleleEffectThrottled { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFertile.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFertile.java index a85e1e8a5..c61cb0254 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFertile.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFertile.java @@ -12,20 +12,18 @@ package forestry.apiculture.genetics.alleles; import java.util.Random; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.genetics.IEffectData; import net.minecraft.block.Block; import net.minecraft.block.IGrowable; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3i; import net.minecraft.world.World; - import net.minecraftforge.common.IPlantable; -import forestry.api.apiculture.IBeeGenome; -import forestry.api.apiculture.IBeeHousing; -import forestry.api.genetics.IEffectData; - public class AlleleEffectFertile extends AlleleEffectThrottled { - + private static final int MAX_BLOCK_FIND_TRIES = 5; public AlleleEffectFertile() { @@ -34,16 +32,16 @@ public class AlleleEffectFertile extends AlleleEffectThrottled { @Override public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) { - + World world = housing.getWorldObj(); BlockPos housingCoordinates = housing.getCoordinates(); Vec3i area = getModifiedArea(genome, housing); - + int blockX = getRandomOffset(world.rand, housingCoordinates.getX(), area.getX()); int blockZ = getRandomOffset(world.rand, housingCoordinates.getZ(), area.getZ()); int blockMaxY = housingCoordinates.getY() + area.getY() / 2 + 1; int blockMinY = housingCoordinates.getY() - area.getY() / 2 - 1; - + for (int attempt = 0; attempt < MAX_BLOCK_FIND_TRIES; ++attempt) { if (world.getChunkProvider().getLoadedChunk(blockX >> 4, blockZ >> 4) != null) { if (tryTickColumn(world, blockX, blockZ, blockMaxY, blockMinY)) { @@ -53,10 +51,10 @@ public class AlleleEffectFertile extends AlleleEffectThrottled { blockZ = getRandomOffset(world.rand, housingCoordinates.getZ(), area.getZ()); } } - + return storedData; } - + private static int getRandomOffset(Random random, int centrePos, int offset) { return centrePos + random.nextInt(offset) - offset / 2; } diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java index 45260dfab..66f5f09b1 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java @@ -1,6 +1,5 @@ package forestry.apiculture.genetics.alleles; -import javax.annotation.Nullable; import java.util.List; import forestry.api.apiculture.IBeeGenome; @@ -23,7 +22,7 @@ public class AlleleEffectFungification extends AlleleEffectThrottled { private static final int MAX_BLOCK_FIND_TRIES = 10; private static final int ENTITY_THROTTLE = 6; - + public AlleleEffectFungification() { super("mycophilic", true, 20, false, false); } @@ -41,7 +40,7 @@ public class AlleleEffectFungification extends AlleleEffectThrottled { public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) { doBlockEffect(genome, housing); - + int entityThrottle = storedData.getInteger(1); if (entityThrottle >= ENTITY_THROTTLE) { doEntityEffect(genome, housing); @@ -50,7 +49,7 @@ public class AlleleEffectFungification extends AlleleEffectThrottled { ++entityThrottle; } storedData.setInteger(1, entityThrottle); - + return storedData; } diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java index 20b651845..013374423 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java @@ -10,17 +10,16 @@ ******************************************************************************/ package forestry.apiculture.genetics.alleles; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3i; -import net.minecraft.world.World; - import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.core.EnumTemperature; import forestry.api.genetics.IEffectData; import forestry.core.utils.VectUtil; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3i; +import net.minecraft.world.World; public class AlleleEffectGlacial extends AlleleEffectThrottled { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectHeroic.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectHeroic.java index a4fc69348..a318db918 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectHeroic.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectHeroic.java @@ -12,13 +12,12 @@ package forestry.apiculture.genetics.alleles; import java.util.List; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.util.DamageSource; - import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; import forestry.core.utils.DamageSourceForestry; +import net.minecraft.entity.monster.EntityMob; +import net.minecraft.util.DamageSource; public class AlleleEffectHeroic extends AlleleEffectThrottled { private static final DamageSource damageSourceBeeHeroic = new DamageSourceForestry("bee.heroic"); diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java index 334d8ea75..a78d4600b 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java @@ -12,15 +12,14 @@ package forestry.apiculture.genetics.alleles; import java.util.List; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; import forestry.core.proxy.Proxies; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; public class AlleleEffectIgnition extends AlleleEffectThrottled { private static final int ignitionChance = 50; diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java index d683b0e3a..42430837a 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java @@ -12,14 +12,13 @@ package forestry.apiculture.genetics.alleles; import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.DamageSource; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; import forestry.core.utils.DamageSourceForestry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.DamageSource; public class AlleleEffectMisanthrope extends AlleleEffectThrottled { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java index 55d654501..3aecb2749 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java @@ -14,6 +14,11 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import forestry.api.apiculture.BeeManager; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.genetics.IEffectData; +import forestry.core.proxy.Proxies; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.IMob; import net.minecraft.potion.Potion; @@ -22,12 +27,6 @@ import net.minecraft.potion.PotionUtils; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import forestry.api.apiculture.BeeManager; -import forestry.api.apiculture.IBeeGenome; -import forestry.api.apiculture.IBeeHousing; -import forestry.api.genetics.IEffectData; -import forestry.core.proxy.Proxies; - public class AlleleEffectPotion extends AlleleEffectThrottled { private final Potion potion; diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java index 230759773..9a1d9278e 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java @@ -13,15 +13,6 @@ package forestry.apiculture.genetics.alleles; import java.util.List; import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.DamageSource; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3i; -import net.minecraft.world.World; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; @@ -30,6 +21,14 @@ import forestry.apiculture.blocks.BlockAlveary; import forestry.core.utils.BlockUtil; import forestry.core.utils.DamageSourceForestry; import forestry.core.utils.VectUtil; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.DamageSource; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3i; +import net.minecraft.world.World; public class AlleleEffectRadioactive extends AlleleEffectThrottled { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRepulsion.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRepulsion.java index dbc8c5015..04cfa3afa 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRepulsion.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRepulsion.java @@ -12,13 +12,12 @@ package forestry.apiculture.genetics.alleles; import java.util.List; -import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry; -import net.minecraft.entity.monster.EntityMob; - import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; import forestry.apiculture.entities.AIAvoidPlayers; +import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry; +import net.minecraft.entity.monster.EntityMob; public class AlleleEffectRepulsion extends AlleleEffectThrottled { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectResurrection.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectResurrection.java index 1956ee006..25a649540 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectResurrection.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectResurrection.java @@ -14,6 +14,11 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.genetics.IEffectData; +import forestry.core.utils.EntityUtil; +import forestry.core.utils.ItemStackUtil; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.boss.EntityDragon; import net.minecraft.entity.item.EntityItem; @@ -29,12 +34,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import forestry.api.apiculture.IBeeGenome; -import forestry.api.apiculture.IBeeHousing; -import forestry.api.genetics.IEffectData; -import forestry.core.utils.EntityUtil; -import forestry.core.utils.ItemStackUtil; - public class AlleleEffectResurrection extends AlleleEffectThrottled { public static class Resurrectable { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java index 6a055ea84..0bd5f8ef1 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java @@ -10,6 +10,12 @@ ******************************************************************************/ package forestry.apiculture.genetics.alleles; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.core.EnumTemperature; +import forestry.api.genetics.IEffectData; +import forestry.core.proxy.Proxies; +import forestry.core.utils.VectUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; @@ -18,13 +24,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3i; import net.minecraft.world.World; -import forestry.api.apiculture.IBeeGenome; -import forestry.api.apiculture.IBeeHousing; -import forestry.api.core.EnumTemperature; -import forestry.api.genetics.IEffectData; -import forestry.core.proxy.Proxies; -import forestry.core.utils.VectUtil; - public class AlleleEffectSnowing extends AlleleEffectThrottled { public AlleleEffectSnowing() { diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java index a2e9ec313..6d047ebbc 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.apiculture.genetics.alleles; -import javax.annotation.Nullable; - import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffects.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffects.java index a78125aec..ee279e982 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffects.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffects.java @@ -29,28 +29,28 @@ public class AlleleEffects { public static final IAlleleBeeEffect effectFertile; public static final IAlleleBeeEffect effectMycophilic; private static final List beeEffects; - + static { beeEffects = Arrays.asList( - effectNone = new AlleleEffectNone("none", true), - effectAggressive = new AlleleEffectAggressive(), - effectHeroic = new AlleleEffectHeroic(), - effectBeatific = new AlleleEffectPotion("beatific", false, MobEffects.REGENERATION, 100), - effectMiasmic = new AlleleEffectPotion("miasmic", false, MobEffects.POISON, 600, 100, 0.1f), - effectMisanthrope = new AlleleEffectMisanthrope(), - effectGlacial = new AlleleEffectGlacial(), - effectRadioactive = new AlleleEffectRadioactive(), - effectCreeper = new AlleleEffectCreeper(), - effectIgnition = new AlleleEffectIgnition(), - effectExploration = new AlleleEffectExploration(), - effectFestiveEaster = new AlleleEffectNone("festiveEaster", true), - effectSnowing = new AlleleEffectSnowing(), - effectDrunkard = new AlleleEffectPotion("drunkard", false, MobEffects.NAUSEA, 100), - effectReanimation = new AlleleEffectResurrection("reanimation", AlleleEffectResurrection.getReanimationList()), - effectResurrection = new AlleleEffectResurrection("resurrection", AlleleEffectResurrection.getResurrectionList()), - effectRepulsion = new AlleleEffectRepulsion(), - effectFertile = new AlleleEffectFertile(), - effectMycophilic = new AlleleEffectFungification() + effectNone = new AlleleEffectNone("none", true), + effectAggressive = new AlleleEffectAggressive(), + effectHeroic = new AlleleEffectHeroic(), + effectBeatific = new AlleleEffectPotion("beatific", false, MobEffects.REGENERATION, 100), + effectMiasmic = new AlleleEffectPotion("miasmic", false, MobEffects.POISON, 600, 100, 0.1f), + effectMisanthrope = new AlleleEffectMisanthrope(), + effectGlacial = new AlleleEffectGlacial(), + effectRadioactive = new AlleleEffectRadioactive(), + effectCreeper = new AlleleEffectCreeper(), + effectIgnition = new AlleleEffectIgnition(), + effectExploration = new AlleleEffectExploration(), + effectFestiveEaster = new AlleleEffectNone("festiveEaster", true), + effectSnowing = new AlleleEffectSnowing(), + effectDrunkard = new AlleleEffectPotion("drunkard", false, MobEffects.NAUSEA, 100), + effectReanimation = new AlleleEffectResurrection("reanimation", AlleleEffectResurrection.getReanimationList()), + effectResurrection = new AlleleEffectResurrection("resurrection", AlleleEffectResurrection.getResurrectionList()), + effectRepulsion = new AlleleEffectRepulsion(), + effectFertile = new AlleleEffectFertile(), + effectMycophilic = new AlleleEffectFungification() ); } diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java index 3e08fe43f..d4439fd6f 100644 --- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java +++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java @@ -27,7 +27,7 @@ public class AlleleFlowers extends AlleleCategorized implements IAlleleFlowers { public IFlowerProvider getProvider() { return provider; } - + @Override public String getName() { return getProvider().getDescription(); diff --git a/src/main/java/forestry/apiculture/gui/ContainerAlveary.java b/src/main/java/forestry/apiculture/gui/ContainerAlveary.java index 31a86432b..6b9fbdaf0 100755 --- a/src/main/java/forestry/apiculture/gui/ContainerAlveary.java +++ b/src/main/java/forestry/apiculture/gui/ContainerAlveary.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.multiblock.TileAlveary; import forestry.core.gui.ContainerTile; import forestry.core.network.IForestryPacketClient; import forestry.core.network.packets.PacketGuiUpdate; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerAlveary extends ContainerTile { diff --git a/src/main/java/forestry/apiculture/gui/ContainerAlvearyHygroregulator.java b/src/main/java/forestry/apiculture/gui/ContainerAlvearyHygroregulator.java index 87d639bdc..295398031 100755 --- a/src/main/java/forestry/apiculture/gui/ContainerAlvearyHygroregulator.java +++ b/src/main/java/forestry/apiculture/gui/ContainerAlvearyHygroregulator.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.inventory.InventoryHygroregulator; import forestry.apiculture.multiblock.TileAlvearyHygroregulator; import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.slots.SlotLiquidIn; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerAlvearyHygroregulator extends ContainerLiquidTanks { diff --git a/src/main/java/forestry/apiculture/gui/ContainerAlvearySieve.java b/src/main/java/forestry/apiculture/gui/ContainerAlvearySieve.java index eab1b48d1..d91d6f7d2 100755 --- a/src/main/java/forestry/apiculture/gui/ContainerAlvearySieve.java +++ b/src/main/java/forestry/apiculture/gui/ContainerAlvearySieve.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.inventory.InventoryAlvearySieve; import forestry.apiculture.multiblock.TileAlvearySieve; import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotOutput; import forestry.core.inventory.watchers.ISlotPickupWatcher; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerAlvearySieve extends ContainerTile { diff --git a/src/main/java/forestry/apiculture/gui/ContainerAlvearySwarmer.java b/src/main/java/forestry/apiculture/gui/ContainerAlvearySwarmer.java index 469256b11..3bdaa2273 100755 --- a/src/main/java/forestry/apiculture/gui/ContainerAlvearySwarmer.java +++ b/src/main/java/forestry/apiculture/gui/ContainerAlvearySwarmer.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.multiblock.TileAlvearySwarmer; import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotFiltered; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerAlvearySwarmer extends ContainerTile { diff --git a/src/main/java/forestry/apiculture/gui/ContainerBeeHelper.java b/src/main/java/forestry/apiculture/gui/ContainerBeeHelper.java index a630aee76..31bb7c942 100644 --- a/src/main/java/forestry/apiculture/gui/ContainerBeeHelper.java +++ b/src/main/java/forestry/apiculture/gui/ContainerBeeHelper.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.inventory.IInventory; - import forestry.apiculture.InventoryBeeHousing; import forestry.apiculture.inventory.InventoryApiary; import forestry.core.gui.ContainerForestry; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotOutput; import forestry.core.tiles.IFilterSlotDelegate; +import net.minecraft.inventory.IInventory; public abstract class ContainerBeeHelper { public static void addSlots(ContainerForestry container, T inventory, boolean hasFrames) { diff --git a/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java b/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java index 84f1ab145..483a01fb9 100644 --- a/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java +++ b/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.tiles.TileBeeHousingBase; import forestry.core.gui.ContainerTile; import forestry.core.network.IForestryPacketClient; import forestry.core.network.packets.PacketGuiUpdate; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerBeeHousing extends ContainerTile implements IContainerBeeHousing { diff --git a/src/main/java/forestry/apiculture/gui/ContainerHabitatLocator.java b/src/main/java/forestry/apiculture/gui/ContainerHabitatLocator.java index a5a57de0a..e83f5fbdf 100755 --- a/src/main/java/forestry/apiculture/gui/ContainerHabitatLocator.java +++ b/src/main/java/forestry/apiculture/gui/ContainerHabitatLocator.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.EntityPlayer; - import forestry.apiculture.inventory.ItemInventoryHabitatLocator; import forestry.core.gui.ContainerItemInventory; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotOutput; +import net.minecraft.entity.player.EntityPlayer; public class ContainerHabitatLocator extends ContainerItemInventory { diff --git a/src/main/java/forestry/apiculture/gui/ContainerMinecartBeehouse.java b/src/main/java/forestry/apiculture/gui/ContainerMinecartBeehouse.java index 2be98f700..1abe47b39 100644 --- a/src/main/java/forestry/apiculture/gui/ContainerMinecartBeehouse.java +++ b/src/main/java/forestry/apiculture/gui/ContainerMinecartBeehouse.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.entities.EntityMinecartBeeHousingBase; import forestry.core.gui.ContainerEntity; import forestry.core.network.IForestryPacketClient; import forestry.core.network.packets.PacketGuiUpdateEntity; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerMinecartBeehouse extends ContainerEntity implements IContainerBeeHousing { public ContainerMinecartBeehouse(InventoryPlayer player, EntityMinecartBeeHousingBase entity, boolean hasFrames) { diff --git a/src/main/java/forestry/apiculture/gui/GuiAlveary.java b/src/main/java/forestry/apiculture/gui/GuiAlveary.java index 629f43637..821b2dc86 100755 --- a/src/main/java/forestry/apiculture/gui/GuiAlveary.java +++ b/src/main/java/forestry/apiculture/gui/GuiAlveary.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.multiblock.IAlvearyControllerInternal; import forestry.apiculture.multiblock.TileAlveary; import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.render.EnumTankLevel; +import net.minecraft.entity.player.InventoryPlayer; public class GuiAlveary extends GuiForestryTitled { diff --git a/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java b/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java index 96c5806ca..4644e4f0e 100755 --- a/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java +++ b/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.multiblock.TileAlvearyHygroregulator; import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.TankWidget; +import net.minecraft.entity.player.InventoryPlayer; public class GuiAlvearyHygroregulator extends GuiForestryTitled { diff --git a/src/main/java/forestry/apiculture/gui/GuiAlvearySieve.java b/src/main/java/forestry/apiculture/gui/GuiAlvearySieve.java index 50ebe2a03..0b7ec13c5 100755 --- a/src/main/java/forestry/apiculture/gui/GuiAlvearySieve.java +++ b/src/main/java/forestry/apiculture/gui/GuiAlvearySieve.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.multiblock.TileAlvearySieve; import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; +import net.minecraft.entity.player.InventoryPlayer; public class GuiAlvearySieve extends GuiForestryTitled { diff --git a/src/main/java/forestry/apiculture/gui/GuiAlvearySwarmer.java b/src/main/java/forestry/apiculture/gui/GuiAlvearySwarmer.java index 8d159a1cc..5a1f1844f 100755 --- a/src/main/java/forestry/apiculture/gui/GuiAlvearySwarmer.java +++ b/src/main/java/forestry/apiculture/gui/GuiAlvearySwarmer.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.apiculture.multiblock.TileAlvearySwarmer; import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; +import net.minecraft.entity.player.InventoryPlayer; public class GuiAlvearySwarmer extends GuiForestryTitled { diff --git a/src/main/java/forestry/apiculture/gui/GuiBeeHousing.java b/src/main/java/forestry/apiculture/gui/GuiBeeHousing.java index 45d62dd9c..81965678d 100644 --- a/src/main/java/forestry/apiculture/gui/GuiBeeHousing.java +++ b/src/main/java/forestry/apiculture/gui/GuiBeeHousing.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.apiculture.gui; -import net.minecraft.inventory.Container; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.render.EnumTankLevel; +import net.minecraft.inventory.Container; public class GuiBeeHousing extends GuiForestryTitled { diff --git a/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java b/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java index de37d8878..fec225523 100644 --- a/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java +++ b/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java @@ -10,11 +10,12 @@ ******************************************************************************/ package forestry.apiculture.gui; +import forestry.core.tiles.ITitled; import net.minecraft.inventory.IInventory; -import forestry.core.tiles.ITitled; - public interface IGuiBeeHousingInventory extends ITitled, IInventory { - /** Returns scaled queen health or breeding progress */ + /** + * Returns scaled queen health or breeding progress + */ int getHealthScaled(int i); } diff --git a/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java b/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java index 74e048c73..951b0e35b 100644 --- a/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java +++ b/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.inventory; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - import forestry.apiculture.multiblock.TileAlvearySieve; import forestry.core.PluginCore; import forestry.core.inventory.InventoryAdapterTile; import forestry.core.inventory.watchers.ISlotPickupWatcher; import forestry.core.utils.ItemStackUtil; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class InventoryAlvearySieve extends InventoryAdapterTile implements ISlotPickupWatcher { public static final int SLOT_POLLEN_1 = 0; diff --git a/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java b/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java index 9f580e4ef..b93f1f3c7 100644 --- a/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java +++ b/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java @@ -10,13 +10,11 @@ ******************************************************************************/ package forestry.apiculture.inventory; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidUtil; - import forestry.apiculture.multiblock.TileAlvearyHygroregulator; import forestry.core.inventory.InventoryAdapterTile; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidUtil; public class InventoryHygroregulator extends InventoryAdapterTile { public static final short SLOT_INPUT = 0; diff --git a/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java b/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java index 5e2f2bccd..eee5fc103 100644 --- a/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java +++ b/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.apiculture.inventory; -import net.minecraft.item.ItemStack; - import forestry.api.apiculture.BeeManager; import forestry.apiculture.multiblock.TileAlvearySwarmer; import forestry.core.inventory.InventoryAdapterTile; import forestry.core.utils.ItemStackUtil; +import net.minecraft.item.ItemStack; public class InventorySwarmer extends InventoryAdapterTile { public InventorySwarmer(TileAlvearySwarmer alvearySwarmer) { diff --git a/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java b/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java index 2abed4b82..0e3f4e163 100644 --- a/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java +++ b/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java @@ -10,16 +10,10 @@ ******************************************************************************/ package forestry.apiculture.inventory; -import com.google.common.collect.ImmutableSet; - import java.util.List; import java.util.Set; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.biome.Biome; - +import com.google.common.collect.ImmutableSet; import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBee; import forestry.api.core.IErrorSource; @@ -31,6 +25,10 @@ import forestry.core.config.Config; import forestry.core.errors.EnumErrorCode; import forestry.core.gui.IHintSource; import forestry.core.inventory.ItemInventory; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.biome.Biome; public class ItemInventoryHabitatLocator extends ItemInventory implements IErrorSource, IHintSource { diff --git a/src/main/java/forestry/apiculture/items/ItemBlockCandle.java b/src/main/java/forestry/apiculture/items/ItemBlockCandle.java index e50a16d16..16aa94451 100644 --- a/src/main/java/forestry/apiculture/items/ItemBlockCandle.java +++ b/src/main/java/forestry/apiculture/items/ItemBlockCandle.java @@ -10,16 +10,14 @@ ******************************************************************************/ package forestry.apiculture.items; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.apiculture.blocks.BlockCandle; import forestry.core.items.IColoredItem; import forestry.core.items.ItemBlockForestry; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemBlockCandle extends ItemBlockForestry implements IColoredItem { diff --git a/src/main/java/forestry/apiculture/items/ItemHiveFrame.java b/src/main/java/forestry/apiculture/items/ItemHiveFrame.java index 984d33fcf..1c6566e20 100755 --- a/src/main/java/forestry/apiculture/items/ItemHiveFrame.java +++ b/src/main/java/forestry/apiculture/items/ItemHiveFrame.java @@ -13,9 +13,6 @@ package forestry.apiculture.items; import javax.annotation.Nullable; import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - import forestry.api.apiculture.DefaultBeeModifier; import forestry.api.apiculture.IBee; import forestry.api.apiculture.IBeeGenome; @@ -25,6 +22,8 @@ import forestry.api.apiculture.IHiveFrame; import forestry.api.core.Tabs; import forestry.core.items.ItemForestry; import forestry.core.utils.Translator; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class ItemHiveFrame extends ItemForestry implements IHiveFrame { diff --git a/src/main/java/forestry/apiculture/items/ItemImprinter.java b/src/main/java/forestry/apiculture/items/ItemImprinter.java index 76176c2c0..17be9f46b 100644 --- a/src/main/java/forestry/apiculture/items/ItemImprinter.java +++ b/src/main/java/forestry/apiculture/items/ItemImprinter.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.items; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - import forestry.api.core.Tabs; import forestry.apiculture.gui.ContainerImprinter; import forestry.apiculture.gui.GuiImprinter; import forestry.apiculture.inventory.ItemInventoryImprinter; import forestry.core.items.ItemWithGui; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class ItemImprinter extends ItemWithGui { public ItemImprinter() { diff --git a/src/main/java/forestry/apiculture/items/ItemPollenCluster.java b/src/main/java/forestry/apiculture/items/ItemPollenCluster.java index dd08cf65d..a8c25c4cc 100644 --- a/src/main/java/forestry/apiculture/items/ItemPollenCluster.java +++ b/src/main/java/forestry/apiculture/items/ItemPollenCluster.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.apiculture.items; -import net.minecraft.item.ItemStack; - import forestry.api.core.Tabs; import forestry.core.items.ItemOverlay; +import net.minecraft.item.ItemStack; public class ItemPollenCluster extends ItemOverlay { public ItemPollenCluster() { diff --git a/src/main/java/forestry/apiculture/items/ItemPropolis.java b/src/main/java/forestry/apiculture/items/ItemPropolis.java index 585400343..6ecea77d3 100644 --- a/src/main/java/forestry/apiculture/items/ItemPropolis.java +++ b/src/main/java/forestry/apiculture/items/ItemPropolis.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.apiculture.items; -import net.minecraft.item.ItemStack; - import forestry.api.core.Tabs; import forestry.core.items.ItemOverlay; +import net.minecraft.item.ItemStack; public class ItemPropolis extends ItemOverlay { public ItemPropolis() { diff --git a/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java b/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java index 7134996d0..3fee68728 100644 --- a/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java +++ b/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java @@ -10,10 +10,6 @@ ******************************************************************************/ package forestry.apiculture.items; -import net.minecraft.inventory.EntityEquipmentSlot; - -import net.minecraftforge.oredict.OreDictionary; - import forestry.api.apiculture.EnumBeeType; import forestry.api.core.Tabs; import forestry.core.items.ItemForestry; @@ -21,6 +17,8 @@ import forestry.core.items.ItemOverlay; import forestry.core.items.ItemRegistry; import forestry.core.items.ItemScoop; import forestry.core.utils.OreDictUtil; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraftforge.oredict.OreDictionary; public class ItemRegistryApiculture extends ItemRegistry { public final ItemBeeGE beeQueenGE; @@ -59,17 +57,17 @@ public class ItemRegistryApiculture extends ItemRegistry { beeDroneGE = registerItem(new ItemBeeGE(EnumBeeType.DRONE), "beeDroneGE"); beePrincessGE = registerItem(new ItemBeeGE(EnumBeeType.PRINCESS), "beePrincessGE"); beeLarvaeGE = registerItem(new ItemBeeGE(EnumBeeType.LARVAE), "beeLarvaeGE"); - + habitatLocator = registerItem(new ItemHabitatLocator(), "habitatLocator"); imprinter = registerItem(new ItemImprinter(), "imprinter"); - + minecartBeehouse = registerItem(new ItemMinecartBeehouse(), "cart.beehouse"); - + // / COMB FRAMES frameUntreated = registerItem(new ItemHiveFrame(80, 0.9f), "frameUntreated"); frameImpregnated = registerItem(new ItemHiveFrame(240, 0.4f), "frameImpregnated"); frameProven = registerItem(new ItemHiveFrame(720, 0.3f), "frameProven"); - + // / BEE RESOURCES honeyDrop = registerItem(new ItemOverlay(Tabs.tabApiculture, EnumHoneyDrop.VALUES), "honeyDrop"); OreDictionary.registerOre(OreDictUtil.DROP_HONEY, honeyDrop); @@ -84,19 +82,19 @@ public class ItemRegistryApiculture extends ItemRegistry { royalJelly = registerItem(new ItemForestry(Tabs.tabApiculture), "royalJelly"); OreDictionary.registerOre(OreDictUtil.DROP_ROYAL_JELLY, royalJelly); - + waxCast = registerItem(new ItemWaxCast(), "waxCast"); - + // / BEE COMBS beeComb = registerItem(new ItemHoneyComb(), "beeCombs"); OreDictionary.registerOre(OreDictUtil.BEE_COMB, beeComb.getWildcard()); - + // / APIARIST'S CLOTHES apiaristHat = registerItem(new ItemArmorApiarist(EntityEquipmentSlot.HEAD), "apiaristHelmet"); apiaristChest = registerItem(new ItemArmorApiarist(EntityEquipmentSlot.CHEST), "apiaristChest"); apiaristLegs = registerItem(new ItemArmorApiarist(EntityEquipmentSlot.LEGS), "apiaristLegs"); apiaristBoots = registerItem(new ItemArmorApiarist(EntityEquipmentSlot.FEET), "apiaristBoots"); - + // TOOLS scoop = registerItem(new ItemScoop(), "scoop"); scoop.setHarvestLevel("scoop", 3); diff --git a/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java b/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java index 2753518a1..6b7880649 100644 --- a/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java +++ b/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java @@ -11,10 +11,10 @@ package forestry.apiculture.multiblock; import forestry.api.multiblock.IAlvearyController; -import forestry.core.owner.IOwnedTile; import forestry.core.inventory.IInventoryAdapter; import forestry.core.multiblock.IMultiblockControllerInternal; import forestry.core.network.IStreamableGui; +import forestry.core.owner.IOwnedTile; import forestry.core.tiles.IClimatised; public interface IAlvearyControllerInternal extends IAlvearyController, IMultiblockControllerInternal, IClimatised, IOwnedTile, IStreamableGui { diff --git a/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java b/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java index feb5f2b6b..42ae2bf01 100644 --- a/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java +++ b/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.apiculture.multiblock; -import net.minecraft.world.World; - import forestry.api.multiblock.IMultiblockLogicAlveary; import forestry.core.multiblock.MultiblockLogic; +import net.minecraft.world.World; public class MultiblockLogicAlveary extends MultiblockLogic implements IMultiblockLogicAlveary { public MultiblockLogicAlveary() { diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlveary.java b/src/main/java/forestry/apiculture/multiblock/TileAlveary.java index dc98a4253..26ef24247 100644 --- a/src/main/java/forestry/apiculture/multiblock/TileAlveary.java +++ b/src/main/java/forestry/apiculture/multiblock/TileAlveary.java @@ -131,7 +131,7 @@ public abstract class TileAlveary extends MultiblockTileEntityForestry capability, @Nullable EnumFacing facing) { + public boolean hasCapability(Capability capability, @Nullable EnumFacing facing) { return energyManager.hasCapability(capability) || super.hasCapability(capability, facing); } @Override - public T getCapability( Capability capability, @Nullable EnumFacing facing) { + public T getCapability(Capability capability, @Nullable EnumFacing facing) { T energyCapability = energyManager.getCapability(capability); if (energyCapability != null) { return energyCapability; diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java index 7a27344ca..9377475a0 100644 --- a/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java +++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java @@ -19,10 +19,10 @@ import forestry.apiculture.gui.ContainerAlvearyHygroregulator; import forestry.apiculture.gui.GuiAlvearyHygroregulator; import forestry.apiculture.inventory.InventoryHygroregulator; import forestry.core.config.Constants; +import forestry.core.fluids.FilteredTank; import forestry.core.fluids.FluidHelper; import forestry.core.fluids.Fluids; import forestry.core.fluids.TankManager; -import forestry.core.fluids.FilteredTank; import forestry.core.inventory.IInventoryAdapter; import forestry.core.tiles.ILiquidTankTile; import net.minecraft.entity.player.EntityPlayer; @@ -50,7 +50,7 @@ public class TileAlvearyHygroregulator extends TileAlveary implements IInventory super(BlockAlvearyType.HYGRO); this.inventory = new InventoryHygroregulator(this); - + Fluid water = FluidRegistry.WATER; Fluid lava = FluidRegistry.LAVA; Fluid liquidIce = Fluids.ICE.getFluid(); diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java index fa4205855..260041fe7 100644 --- a/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java +++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java @@ -10,9 +10,6 @@ ******************************************************************************/ package forestry.apiculture.multiblock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - import forestry.api.apiculture.DefaultBeeListener; import forestry.api.apiculture.IBeeListener; import forestry.api.arboriculture.EnumGermlingType; @@ -26,6 +23,8 @@ import forestry.apiculture.gui.GuiAlvearySieve; import forestry.apiculture.inventory.InventoryAlvearySieve; import forestry.core.inventory.IInventoryAdapter; import forestry.core.inventory.watchers.ISlotPickupWatcher; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class TileAlvearySieve extends TileAlveary implements IAlvearyComponent.BeeListener { diff --git a/src/main/java/forestry/apiculture/network/packets/PacketAlvearyChange.java b/src/main/java/forestry/apiculture/network/packets/PacketAlvearyChange.java index ae0337da7..3ea029c06 100644 --- a/src/main/java/forestry/apiculture/network/packets/PacketAlvearyChange.java +++ b/src/main/java/forestry/apiculture/network/packets/PacketAlvearyChange.java @@ -12,16 +12,15 @@ package forestry.apiculture.network.packets; import java.io.IOException; +import forestry.api.multiblock.IMultiblockComponent; import forestry.core.network.ForestryPacket; +import forestry.core.network.IForestryPacketClient; import forestry.core.network.IForestryPacketHandlerClient; import forestry.core.network.PacketBufferForestry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; - -import forestry.api.multiblock.IMultiblockComponent; -import forestry.core.network.IForestryPacketClient; import forestry.core.network.PacketIdClient; import forestry.core.proxy.Proxies; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; public class PacketAlvearyChange extends ForestryPacket implements IForestryPacketClient { diff --git a/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActive.java b/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActive.java index e60a175b5..3cd2984e6 100644 --- a/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActive.java +++ b/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActive.java @@ -12,18 +12,17 @@ package forestry.apiculture.network.packets; import java.io.IOException; -import forestry.core.network.ForestryPacket; -import forestry.core.network.IForestryPacketHandlerClient; -import forestry.core.network.PacketBufferForestry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; - import forestry.api.apiculture.IBeeHousing; import forestry.api.apiculture.IBeekeepingLogic; import forestry.apiculture.BeekeepingLogic; +import forestry.core.network.ForestryPacket; import forestry.core.network.IForestryPacketClient; +import forestry.core.network.IForestryPacketHandlerClient; +import forestry.core.network.PacketBufferForestry; import forestry.core.network.PacketIdClient; import forestry.core.proxy.Proxies; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; public class PacketBeeLogicActive extends ForestryPacket implements IForestryPacketClient { diff --git a/src/main/java/forestry/apiculture/render/ModelAnalyzer.java b/src/main/java/forestry/apiculture/render/ModelAnalyzer.java index 18ed1aad6..29bcf5a75 100755 --- a/src/main/java/forestry/apiculture/render/ModelAnalyzer.java +++ b/src/main/java/forestry/apiculture/render/ModelAnalyzer.java @@ -10,15 +10,14 @@ ******************************************************************************/ package forestry.apiculture.render; +import forestry.core.proxy.Proxies; +import forestry.core.render.ForestryResource; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; -import forestry.core.proxy.Proxies; -import forestry.core.render.ForestryResource; - public class ModelAnalyzer extends ModelBase { private final ModelRenderer pedestal; diff --git a/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java b/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java index 62f88b4d3..7e4de856f 100644 --- a/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java +++ b/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java @@ -15,7 +15,6 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureUtil; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/forestry/apiculture/tiles/FakeBeeHousingInventory.java b/src/main/java/forestry/apiculture/tiles/FakeBeeHousingInventory.java index 03cb8ed07..ecca6cdeb 100644 --- a/src/main/java/forestry/apiculture/tiles/FakeBeeHousingInventory.java +++ b/src/main/java/forestry/apiculture/tiles/FakeBeeHousingInventory.java @@ -1,8 +1,7 @@ package forestry.apiculture.tiles; -import net.minecraft.item.ItemStack; - import forestry.api.apiculture.IBeeHousingInventory; +import net.minecraft.item.ItemStack; public class FakeBeeHousingInventory implements IBeeHousingInventory { public static final FakeBeeHousingInventory instance = new FakeBeeHousingInventory(); diff --git a/src/main/java/forestry/apiculture/tiles/HiveBeeHousingInventory.java b/src/main/java/forestry/apiculture/tiles/HiveBeeHousingInventory.java index 7dd343438..94296da3e 100644 --- a/src/main/java/forestry/apiculture/tiles/HiveBeeHousingInventory.java +++ b/src/main/java/forestry/apiculture/tiles/HiveBeeHousingInventory.java @@ -2,12 +2,11 @@ package forestry.apiculture.tiles; import javax.annotation.Nullable; -import net.minecraft.item.ItemStack; - import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.EnumBeeType; import forestry.api.apiculture.IBee; import forestry.api.apiculture.IBeeHousingInventory; +import net.minecraft.item.ItemStack; class HiveBeeHousingInventory implements IBeeHousingInventory { @Nullable diff --git a/src/main/java/forestry/apiculture/tiles/TileCandle.java b/src/main/java/forestry/apiculture/tiles/TileCandle.java index c1a6c7340..fd338abc0 100644 --- a/src/main/java/forestry/apiculture/tiles/TileCandle.java +++ b/src/main/java/forestry/apiculture/tiles/TileCandle.java @@ -38,7 +38,7 @@ public class TileCandle extends TileEntity { } @Override - public void handleUpdateTag( NBTTagCompound tag) { + public void handleUpdateTag(NBTTagCompound tag) { super.handleUpdateTag(tag); readFromNBT(tag); } diff --git a/src/main/java/forestry/apiculture/worldgen/Hive.java b/src/main/java/forestry/apiculture/worldgen/Hive.java index 067bec4c7..c1e5c5dd6 100644 --- a/src/main/java/forestry/apiculture/worldgen/Hive.java +++ b/src/main/java/forestry/apiculture/worldgen/Hive.java @@ -15,15 +15,14 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; - import forestry.api.apiculture.IHiveDrop; import forestry.api.apiculture.hives.IHiveDescription; import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; public final class Hive { diff --git a/src/main/java/forestry/apiculture/worldgen/HiveDecorator.java b/src/main/java/forestry/apiculture/worldgen/HiveDecorator.java index acebc0661..520a6c47d 100755 --- a/src/main/java/forestry/apiculture/worldgen/HiveDecorator.java +++ b/src/main/java/forestry/apiculture/worldgen/HiveDecorator.java @@ -14,23 +14,21 @@ import java.util.Collections; import java.util.List; import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; -import net.minecraft.world.chunk.IChunkGenerator; - -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType; -import net.minecraftforge.event.terraingen.TerrainGen; - import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; import forestry.apiculture.PluginApiculture; import forestry.core.config.Config; import forestry.core.config.Constants; import forestry.core.utils.Log; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType; +import net.minecraftforge.event.terraingen.TerrainGen; public abstract class HiveDecorator { diff --git a/src/main/java/forestry/apiculture/worldgen/HiveDescription.java b/src/main/java/forestry/apiculture/worldgen/HiveDescription.java index fa4aa451c..f1aaf2354 100644 --- a/src/main/java/forestry/apiculture/worldgen/HiveDescription.java +++ b/src/main/java/forestry/apiculture/worldgen/HiveDescription.java @@ -15,15 +15,6 @@ import java.util.Collections; import java.util.List; import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; - -import net.minecraftforge.common.BiomeDictionary; - import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.hives.HiveManager; import forestry.api.apiculture.hives.IHiveDescription; @@ -37,6 +28,13 @@ import forestry.api.genetics.EnumTolerance; import forestry.apiculture.PluginApiculture; import forestry.apiculture.genetics.BeeDefinition; import forestry.core.config.Constants; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraftforge.common.BiomeDictionary; public enum HiveDescription implements IHiveDescription { diff --git a/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java b/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java index bebcfff19..00df923b4 100644 --- a/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java +++ b/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java @@ -14,14 +14,6 @@ import java.util.Arrays; import java.util.List; import java.util.Random; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; - import forestry.api.apiculture.hives.IHiveDescription; import forestry.api.apiculture.hives.IHiveGen; import forestry.api.apiculture.hives.IHiveRegistry; @@ -29,6 +21,13 @@ import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; import forestry.apiculture.PluginApiculture; import forestry.apiculture.tiles.TileHive; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; public class HiveDescriptionSwarmer implements IHiveDescription { diff --git a/src/main/java/forestry/apiculture/worldgen/HiveGen.java b/src/main/java/forestry/apiculture/worldgen/HiveGen.java index 867dc92f9..107c664c1 100644 --- a/src/main/java/forestry/apiculture/worldgen/HiveGen.java +++ b/src/main/java/forestry/apiculture/worldgen/HiveGen.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.apiculture.worldgen; +import forestry.api.apiculture.hives.IHiveGen; +import forestry.core.utils.BlockUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.apiculture.hives.IHiveGen; -import forestry.core.utils.BlockUtil; - public abstract class HiveGen implements IHiveGen { public static boolean isTreeBlock(IBlockState blockState, World world, BlockPos pos) { diff --git a/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java b/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java index 20fa75831..bc9379ac5 100644 --- a/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java +++ b/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java @@ -59,6 +59,6 @@ public class HiveGenGround extends HiveGen { blockState = world.getBlockState(pos); } - return pos.up(); + return pos.up(); } } diff --git a/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java b/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java index a253b3950..c14fdce30 100644 --- a/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java +++ b/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.apiculture.worldgen; -import net.minecraft.block.Block; - import forestry.api.apiculture.hives.IHiveGen; import forestry.api.apiculture.hives.IHiveGenHelper; +import net.minecraft.block.Block; public class HiveGenHelper implements IHiveGenHelper { diff --git a/src/main/java/forestry/apiculture/worldgen/VillageApiaristHouse.java b/src/main/java/forestry/apiculture/worldgen/VillageApiaristHouse.java index cd35e92df..c4f519356 100644 --- a/src/main/java/forestry/apiculture/worldgen/VillageApiaristHouse.java +++ b/src/main/java/forestry/apiculture/worldgen/VillageApiaristHouse.java @@ -189,7 +189,7 @@ public class VillageApiaristHouse extends StructureVillagePieces.House1 { setBlockState(world, planks, 0, 2, 4, structBoundingBox); setBlockState(world, planks, 8, 2, 1, structBoundingBox); setBlockState(world, planks, 8, 2, 4, structBoundingBox); - + IBlockState glassPaneState = Blocks.GLASS_PANE.getDefaultState(); // Windows on east side diff --git a/src/main/java/forestry/arboriculture/FruitProviderPod.java b/src/main/java/forestry/arboriculture/FruitProviderPod.java index 5a9ce44c3..f937bc6ba 100755 --- a/src/main/java/forestry/arboriculture/FruitProviderPod.java +++ b/src/main/java/forestry/arboriculture/FruitProviderPod.java @@ -17,19 +17,18 @@ import java.util.Locale; import java.util.Map; import java.util.Random; -import net.minecraft.item.ItemStack; -import net.minecraft.util.NonNullList; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - import forestry.api.arboriculture.EnumTreeChromosome; import forestry.api.arboriculture.IAlleleFruit; import forestry.api.arboriculture.ITreeGenome; import forestry.api.arboriculture.TreeManager; import forestry.api.genetics.IFruitFamily; import forestry.core.utils.BlockUtil; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; public class FruitProviderPod extends FruitProviderNone { @@ -42,7 +41,7 @@ public class FruitProviderPod extends FruitProviderNone { } private final EnumPodType type; - + private final Map drops; public FruitProviderPod(String unlocalizedDescription, IFruitFamily family, EnumPodType type, ItemStack... dropOnMature) { @@ -90,7 +89,7 @@ public class FruitProviderPod extends FruitProviderNone { return TreeManager.treeRoot.setFruitBlock(world, genome, activeAllele, genome.getSappiness(), pos); } } - + @Override public ResourceLocation getSprite(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) { return null; @@ -100,7 +99,7 @@ public class FruitProviderPod extends FruitProviderNone { public ResourceLocation getDecorativeSprite() { return null; } - + @Override public Map getProducts() { return Collections.unmodifiableMap(drops); @@ -109,7 +108,7 @@ public class FruitProviderPod extends FruitProviderNone { @Override public void registerSprites() { } - + @Override public String getModelName() { return type.getModelName(); diff --git a/src/main/java/forestry/arboriculture/FruitProviderRandom.java b/src/main/java/forestry/arboriculture/FruitProviderRandom.java index 34acd6865..81fd22f27 100755 --- a/src/main/java/forestry/arboriculture/FruitProviderRandom.java +++ b/src/main/java/forestry/arboriculture/FruitProviderRandom.java @@ -15,16 +15,15 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; +import forestry.api.arboriculture.ITreeGenome; +import forestry.api.arboriculture.TreeManager; +import forestry.api.genetics.IFruitFamily; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import forestry.api.arboriculture.ITreeGenome; -import forestry.api.arboriculture.TreeManager; -import forestry.api.genetics.IFruitFamily; - /** * Simple fruit provider which drops from any leaf block according to yield and either marks all leave blocks as fruit leaves or none. */ diff --git a/src/main/java/forestry/arboriculture/FruitProviderRipening.java b/src/main/java/forestry/arboriculture/FruitProviderRipening.java index 50b4fa450..005532c75 100755 --- a/src/main/java/forestry/arboriculture/FruitProviderRipening.java +++ b/src/main/java/forestry/arboriculture/FruitProviderRipening.java @@ -15,16 +15,15 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; +import forestry.api.arboriculture.ITreeGenome; +import forestry.api.arboriculture.TreeManager; +import forestry.api.genetics.IFruitFamily; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import forestry.api.arboriculture.ITreeGenome; -import forestry.api.arboriculture.TreeManager; -import forestry.api.genetics.IFruitFamily; - public class FruitProviderRipening extends FruitProviderNone { private final Map products = new HashMap<>(); private int colourCallow = 0xffffff; @@ -78,7 +77,7 @@ public class FruitProviderRipening extends FruitProviderNone { return product; } - + @Override public Map getProducts() { return Collections.unmodifiableMap(products); diff --git a/src/main/java/forestry/arboriculture/IWoodTyped.java b/src/main/java/forestry/arboriculture/IWoodTyped.java index a24fe4f3f..4163bc543 100755 --- a/src/main/java/forestry/arboriculture/IWoodTyped.java +++ b/src/main/java/forestry/arboriculture/IWoodTyped.java @@ -11,6 +11,7 @@ package forestry.arboriculture; import java.util.Collection; + import forestry.api.arboriculture.IWoodType; import forestry.api.arboriculture.WoodBlockKind; @@ -20,6 +21,6 @@ public interface IWoodTyped { boolean isFireproof(); IWoodType getWoodType(int meta); - + Collection getWoodTypes(); } diff --git a/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java b/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java index 34e540c64..c05590e66 100644 --- a/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java +++ b/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java @@ -75,9 +75,9 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi public BlockForestryLeaves() { setCreativeTab(Tabs.tabArboriculture); - setDefaultState(this.blockState.getBaseState().withProperty(CHECK_DECAY, false).withProperty(DECAYABLE, true)); + setDefaultState(this.blockState.getBaseState().withProperty(CHECK_DECAY, false).withProperty(DECAYABLE, true)); } - + @Override public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { return ((IExtendedBlockState) super.getExtendedState(state, world, pos)).withProperty(UnlistedBlockPos.POS, pos) @@ -88,8 +88,8 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi protected BlockStateContainer createBlockState() { return new ExtendedBlockState(this, new IProperty[]{DECAYABLE, CHECK_DECAY}, new IUnlistedProperty[]{UnlistedBlockPos.POS, UnlistedBlockAccess.BLOCKACCESS}); } - - @Override + + @Override public int getMetaFromState(IBlockState state) { int i = 0; if (!state.getValue(DECAYABLE)) { @@ -147,7 +147,7 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi List leafDrops = getLeafDrop(world, playerProfile, pos, saplingModifier, fortune); drops.set(leafDrops); } - + @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { List ret = drops.get(); @@ -190,7 +190,7 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi return prod; } - + @Override public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) { TileLeaves leaves = TileUtil.getTile(world, pos, TileLeaves.class); @@ -236,14 +236,14 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi } return super.getCollisionBoundingBox(blockState, worldIn, pos); } - + @Override public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { super.onEntityCollidedWithBlock(worldIn, pos, state, entityIn); entityIn.motionX *= 0.4D; entityIn.motionZ *= 0.4D; } - + @Override public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { LeafDecayHelper.leafDecay(this, world, pos); @@ -278,7 +278,7 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi public BlockPlanks.EnumType getWoodType(int meta) { return BlockPlanks.EnumType.OAK; } - + /* MODELS */ @Override @SideOnly(Side.CLIENT) @@ -335,7 +335,7 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi public boolean canUseBonemeal(World worldIn, Random rand, BlockPos pos, IBlockState state) { return true; } - + @Override public void grow(World world, Random rand, BlockPos pos, IBlockState state) { TileLeaves leafTile = TileUtil.getTile(world, pos, TileLeaves.class); diff --git a/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java b/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java index 7121011e3..11ac0454d 100644 --- a/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java +++ b/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java @@ -15,7 +15,15 @@ import java.util.Collections; import java.util.List; import java.util.Random; +import forestry.api.arboriculture.IAlleleFruit; +import forestry.api.core.IStateMapperRegister; import forestry.arboriculture.genetics.alleles.AlleleFruits; +import forestry.arboriculture.render.FruitPodStateMapper; +import forestry.arboriculture.tiles.TileFruitPod; +import forestry.core.proxy.Proxies; +import forestry.core.tiles.TileUtil; +import forestry.core.utils.BlockUtil; +import forestry.core.utils.ItemStackUtil; import net.minecraft.block.BlockCocoa; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.state.IBlockState; @@ -27,19 +35,9 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.arboriculture.IAlleleFruit; -import forestry.api.core.IStateMapperRegister; -import forestry.arboriculture.render.FruitPodStateMapper; -import forestry.arboriculture.tiles.TileFruitPod; -import forestry.core.proxy.Proxies; -import forestry.core.tiles.TileUtil; -import forestry.core.utils.BlockUtil; -import forestry.core.utils.ItemStackUtil; - public class BlockFruitPod extends BlockCocoa implements IStateMapperRegister, ITileEntityProvider { public static List create() { @@ -53,10 +51,10 @@ public class BlockFruitPod extends BlockCocoa implements IStateMapperRegister, I private final IAlleleFruit fruit; - private BlockFruitPod( IAlleleFruit fruit) { + private BlockFruitPod(IAlleleFruit fruit) { this.fruit = fruit; } - + public IAlleleFruit getFruit() { return fruit; } @@ -99,18 +97,18 @@ public class BlockFruitPod extends BlockCocoa implements IStateMapperRegister, I return super.removedByPlayer(state, world, pos, player, willHarvest); } - + @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { return Collections.emptyList(); } - + @Override public boolean canBlockStay(World world, BlockPos pos, IBlockState state) { EnumFacing facing = state.getValue(FACING); return BlockUtil.isValidPodLocation(world, pos, facing); } - + @Override public void breakBlock(World world, BlockPos pos, IBlockState state) { world.removeTileEntity(pos); @@ -121,7 +119,7 @@ public class BlockFruitPod extends BlockCocoa implements IStateMapperRegister, I public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileFruitPod(); } - + @SideOnly(Side.CLIENT) @Override public void registerStateMapper() { diff --git a/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java b/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java index 0fb2b78b2..83af44674 100644 --- a/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java +++ b/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java @@ -18,15 +18,12 @@ import java.util.Locale; import java.util.Map; import java.util.Map.Entry; -import forestry.arboriculture.genetics.alleles.AlleleFruits; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemStack; - import forestry.api.arboriculture.EnumForestryWoodType; import forestry.api.arboriculture.EnumPileType; import forestry.api.arboriculture.EnumVanillaWoodType; import forestry.api.arboriculture.IAlleleFruit; import forestry.arboriculture.genetics.TreeDefinition; +import forestry.arboriculture.genetics.alleles.AlleleFruits; import forestry.arboriculture.items.ItemBlockDecorativeLeaves; import forestry.arboriculture.items.ItemBlockLeaves; import forestry.arboriculture.items.ItemBlockPile; @@ -36,6 +33,8 @@ import forestry.arboriculture.items.ItemBlockWoodSlab; import forestry.core.blocks.BlockRegistry; import forestry.core.items.ItemBlockForestry; import forestry.core.utils.OreDictUtil; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.ItemStack; public class BlockRegistryArboriculture extends BlockRegistry { public final List logs; @@ -155,7 +154,7 @@ public class BlockRegistryArboriculture extends BlockRegistry { registerBlock(block, new ItemBlockWood(block), "fences.vanilla.fireproof." + block.getBlockNumber()); registerOreDictWildcard(OreDictUtil.FENCE_WOOD, block); } - + fenceGates = new ArrayList<>(); fenceGatesFireproof = new ArrayList<>(); for (EnumForestryWoodType woodType : EnumForestryWoodType.VALUES) { @@ -224,13 +223,13 @@ public class BlockRegistryArboriculture extends BlockRegistry { registerOreDictWildcard(OreDictUtil.DOOR_WOOD, door); doors.add(door); } - + // Saplings TreeDefinition.preInit(); saplingGE = new BlockSapling(); registerBlock(saplingGE, new ItemBlockForestry(saplingGE), "saplingGE"); registerOreDictWildcard(OreDictUtil.TREE_SAPLING, saplingGE); - + // Leaves leaves = new BlockForestryLeaves(); registerBlock(leaves, new ItemBlockLeaves(leaves), "leaves"); @@ -249,12 +248,12 @@ public class BlockRegistryArboriculture extends BlockRegistry { speciesToLeavesDecorative.put(speciesUid, new ItemStack(leaves, 1, meta)); } } - + piles = BlockPile.create(); - for(Entry pile : piles.entrySet()){ + for (Entry pile : piles.entrySet()) { registerBlock(pile.getValue(), new ItemBlockPile(pile.getValue()), "pile_" + pile.getKey().name().toLowerCase(Locale.ENGLISH)); } - + // Pods AlleleFruits.registerAlleles(); podsMap = new HashMap<>(); diff --git a/src/main/java/forestry/arboriculture/blocks/BlockSapling.java b/src/main/java/forestry/arboriculture/blocks/BlockSapling.java index dbf556c8e..e38b47ac8 100644 --- a/src/main/java/forestry/arboriculture/blocks/BlockSapling.java +++ b/src/main/java/forestry/arboriculture/blocks/BlockSapling.java @@ -15,6 +15,18 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; +import forestry.api.arboriculture.EnumGermlingType; +import forestry.api.arboriculture.ITree; +import forestry.api.arboriculture.TreeManager; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; +import forestry.api.core.IStateMapperRegister; +import forestry.arboriculture.genetics.TreeDefinition; +import forestry.arboriculture.render.SaplingStateMapper; +import forestry.arboriculture.tiles.TileSapling; +import forestry.core.proxy.Proxies; +import forestry.core.tiles.TileUtil; +import forestry.core.utils.ItemStackUtil; import net.minecraft.block.Block; import net.minecraft.block.IGrowable; import net.minecraft.block.SoundType; @@ -31,23 +43,9 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.arboriculture.EnumGermlingType; -import forestry.api.arboriculture.ITree; -import forestry.api.arboriculture.TreeManager; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.api.core.IStateMapperRegister; -import forestry.arboriculture.genetics.TreeDefinition; -import forestry.arboriculture.render.SaplingStateMapper; -import forestry.arboriculture.tiles.TileSapling; -import forestry.core.proxy.Proxies; -import forestry.core.tiles.TileUtil; -import forestry.core.utils.ItemStackUtil; - public class BlockSapling extends BlockTreeContainer implements IGrowable, IStateMapperRegister, IItemModelRegister { protected static final AxisAlignedBB SAPLING_AABB = new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.800000011920929D, 0.8999999761581421D); /* PROPERTYS */ @@ -64,8 +62,7 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable, IStat } @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return SAPLING_AABB; } @@ -93,40 +90,40 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable, IStat public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) { return false; } - + @Override public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } - + /* STATES */ @Override public int getMetaFromState(IBlockState state) { return 0; } - + @Override public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) { TileSapling sapling = getSaplingTile(world, pos); - if(sapling != null && sapling.getTree() != null){ + if (sapling != null && sapling.getTree() != null) { state = state.withProperty(TREE, sapling.getTree().getGenome().getPrimary()); - }else{ + } else { state = state.withProperty(TREE, TreeDefinition.Oak.getGenome().getPrimary()); } return state; } - + @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, TREE); } - + @Override @SideOnly(Side.CLIENT) public void registerStateMapper() { Proxies.render.registerStateMapper(this, new SaplingStateMapper()); } - + /* MODELS */ @SideOnly(Side.CLIENT) @Override @@ -203,7 +200,7 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable, IStat TileSapling saplingTile = getSaplingTile(world, pos); return saplingTile == null || saplingTile.canAcceptBoneMeal(rand); } - + @Override public boolean canGrow(World world, BlockPos pos, IBlockState state, boolean isClient) { return true; diff --git a/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java b/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java index 1fccf3b5f..1fbba7d9e 100644 --- a/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java +++ b/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java @@ -12,6 +12,8 @@ package forestry.arboriculture.blocks; import java.util.Random; +import forestry.arboriculture.tiles.TileTreeContainer; +import forestry.core.tiles.TileUtil; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -19,16 +21,13 @@ import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.arboriculture.tiles.TileTreeContainer; -import forestry.core.tiles.TileUtil; - public abstract class BlockTreeContainer extends BlockContainer { protected BlockTreeContainer(Material material) { super(material); setTickRandomly(true); } - + @Override public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { diff --git a/src/main/java/forestry/arboriculture/blocks/PropertyTree.java b/src/main/java/forestry/arboriculture/blocks/PropertyTree.java index 590c2eb85..b81f07330 100644 --- a/src/main/java/forestry/arboriculture/blocks/PropertyTree.java +++ b/src/main/java/forestry/arboriculture/blocks/PropertyTree.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.arboriculture.blocks; -import com.google.common.base.Objects; - import java.util.ArrayList; import java.util.List; import java.util.Locale; +import com.google.common.base.Objects; import forestry.api.arboriculture.IAlleleTreeSpecies; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAllele; @@ -58,5 +57,5 @@ public class PropertyTree extends PropertyAllele { public String getName(IAlleleTreeSpecies value) { return value.getUID().replace(Constants.MOD_ID + ".tree", "").toLowerCase(Locale.ENGLISH); } - + } diff --git a/src/main/java/forestry/arboriculture/blocks/TreeTypePredicate.java b/src/main/java/forestry/arboriculture/blocks/TreeTypePredicate.java index 59bd9e8cd..ae0bec5b6 100644 --- a/src/main/java/forestry/arboriculture/blocks/TreeTypePredicate.java +++ b/src/main/java/forestry/arboriculture/blocks/TreeTypePredicate.java @@ -1,9 +1,8 @@ package forestry.arboriculture.blocks; -import com.google.common.base.Predicate; - import javax.annotation.Nullable; +import com.google.common.base.Predicate; import forestry.arboriculture.genetics.TreeDefinition; public class TreeTypePredicate implements Predicate { diff --git a/src/main/java/forestry/arboriculture/blocks/WoodTypePredicate.java b/src/main/java/forestry/arboriculture/blocks/WoodTypePredicate.java index 3eb175c0d..8f89a72f9 100644 --- a/src/main/java/forestry/arboriculture/blocks/WoodTypePredicate.java +++ b/src/main/java/forestry/arboriculture/blocks/WoodTypePredicate.java @@ -3,7 +3,6 @@ package forestry.arboriculture.blocks; import javax.annotation.Nullable; import com.google.common.base.Predicate; - import forestry.api.arboriculture.IWoodType; public class WoodTypePredicate implements Predicate { diff --git a/src/main/java/forestry/arboriculture/blocks/WoodTypeStateMapper.java b/src/main/java/forestry/arboriculture/blocks/WoodTypeStateMapper.java index e28cc0d22..b6df3a589 100644 --- a/src/main/java/forestry/arboriculture/blocks/WoodTypeStateMapper.java +++ b/src/main/java/forestry/arboriculture/blocks/WoodTypeStateMapper.java @@ -31,30 +31,30 @@ public class WoodTypeStateMapper extends StateMapperBase implements IWoodStateMa private final PropertyWoodType propertyWoodType; private final List propertiesToRemove = new ArrayList<>(); - public WoodTypeStateMapper( IWoodTyped woodTyped, @Nullable PropertyWoodType propertyWoodType) { + public WoodTypeStateMapper(IWoodTyped woodTyped, @Nullable PropertyWoodType propertyWoodType) { this.woodTyped = woodTyped; this.blockPath = woodTyped.getBlockKind().toString(); this.propertyWoodType = propertyWoodType; } - public WoodTypeStateMapper( IWoodTyped woodTyped, String blockPath, @Nullable PropertyWoodType propertyWoodType) { + public WoodTypeStateMapper(IWoodTyped woodTyped, String blockPath, @Nullable PropertyWoodType propertyWoodType) { this.woodTyped = woodTyped; this.blockPath = blockPath; this.propertyWoodType = propertyWoodType; } - - public WoodTypeStateMapper addPropertyToRemove(IProperty property){ + + public WoodTypeStateMapper addPropertyToRemove(IProperty property) { this.propertiesToRemove.add(property); return this; } - + @Override public ModelResourceLocation getModelLocation(IBlockState state) { return getModelResourceLocation(state); } - + @Override - protected ModelResourceLocation getModelResourceLocation( IBlockState state) { + protected ModelResourceLocation getModelResourceLocation(IBlockState state) { final Map, Comparable> properties; if (propertyWoodType != null) { properties = Maps.newLinkedHashMap(state.getProperties()); @@ -71,16 +71,16 @@ public class WoodTypeStateMapper extends StateMapperBase implements IWoodStateMa int meta = block.getMetaFromState(state); IWoodType woodType = woodTyped.getWoodType(meta); if (woodType instanceof EnumForestryWoodType) { - if(WoodModelLoader.INSTANCE.isRegistered){ + if (WoodModelLoader.INSTANCE.isRegistered) { return getForestryModelResourceLocation(woodType, properties); - }else{ + } else { return getDefaultModelResourceLocation(state); } } else { return getVanillaModelResourceLocation(block, woodType, properties); } } - + @Override public ModelResourceLocation getDefaultModelResourceLocation(IBlockState state) { final Map, Comparable> properties; diff --git a/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java b/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java index 7b848b1d2..fad00508d 100644 --- a/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java +++ b/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java @@ -15,14 +15,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.apache.commons.lang3.StringUtils; - -import net.minecraft.command.ICommandSender; -import net.minecraft.command.PlayerNotFoundException; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.math.BlockPos; - import forestry.api.arboriculture.IAlleleTreeSpecies; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAllele; @@ -30,6 +22,12 @@ import forestry.core.commands.CommandHelpers; import forestry.core.commands.SpeciesNotFoundException; import forestry.core.commands.SubCommand; import forestry.core.commands.TemplateNotFoundException; +import net.minecraft.command.ICommandSender; +import net.minecraft.command.PlayerNotFoundException; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.math.BlockPos; +import org.apache.commons.lang3.StringUtils; public final class CommandTreeSpawn extends SubCommand { diff --git a/src/main/java/forestry/arboriculture/commands/ForestSpawner.java b/src/main/java/forestry/arboriculture/commands/ForestSpawner.java index 3522b163c..044208ac6 100644 --- a/src/main/java/forestry/arboriculture/commands/ForestSpawner.java +++ b/src/main/java/forestry/arboriculture/commands/ForestSpawner.java @@ -10,15 +10,14 @@ ******************************************************************************/ package forestry.arboriculture.commands; +import forestry.core.commands.SpeciesNotFoundException; +import forestry.core.commands.TemplateNotFoundException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.gen.feature.WorldGenerator; -import forestry.core.commands.SpeciesNotFoundException; -import forestry.core.commands.TemplateNotFoundException; - public class ForestSpawner implements ITreeSpawner { @Override diff --git a/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java b/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java index a53cad904..70064277a 100644 --- a/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java +++ b/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.arboriculture.commands; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; - import forestry.core.commands.SpeciesNotFoundException; import forestry.core.commands.TemplateNotFoundException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; public interface ITreeSpawner { diff --git a/src/main/java/forestry/arboriculture/commands/TreeSpawner.java b/src/main/java/forestry/arboriculture/commands/TreeSpawner.java index a36ea4f54..bff720739 100644 --- a/src/main/java/forestry/arboriculture/commands/TreeSpawner.java +++ b/src/main/java/forestry/arboriculture/commands/TreeSpawner.java @@ -10,15 +10,14 @@ ******************************************************************************/ package forestry.arboriculture.commands; +import forestry.core.commands.SpeciesNotFoundException; +import forestry.core.commands.TemplateNotFoundException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.gen.feature.WorldGenerator; -import forestry.core.commands.SpeciesNotFoundException; -import forestry.core.commands.TemplateNotFoundException; - public class TreeSpawner implements ITreeSpawner { @Override diff --git a/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java b/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java index 7424a66e5..6dc1694f3 100644 --- a/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java +++ b/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java @@ -13,10 +13,7 @@ package forestry.arboriculture.commands; import java.util.ArrayList; import java.util.Collection; -import net.minecraft.world.World; - import com.mojang.authlib.GameProfile; - import forestry.api.arboriculture.IAlleleTreeSpecies; import forestry.api.arboriculture.TreeManager; import forestry.api.genetics.AlleleManager; @@ -24,6 +21,7 @@ import forestry.api.genetics.IAllele; import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IBreedingTracker; import forestry.core.commands.IStatsSaveHelper; +import net.minecraft.world.World; public class TreeStatsSaveHelper implements IStatsSaveHelper { diff --git a/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java b/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java index b7cc80630..a0a9e4ad0 100755 --- a/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java +++ b/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java @@ -10,17 +10,18 @@ ******************************************************************************/ package forestry.arboriculture.genetics; -import net.minecraft.entity.player.EntityPlayer; - import forestry.api.arboriculture.IArboristTracker; import forestry.api.arboriculture.TreeManager; import forestry.api.genetics.IBreedingTracker; import forestry.api.genetics.IIndividual; import forestry.core.genetics.BreedingTracker; +import net.minecraft.entity.player.EntityPlayer; public class ArboristTracker extends BreedingTracker implements IArboristTracker { - /** Required for creation from map storage */ + /** + * Required for creation from map storage + */ public ArboristTracker(String s) { super(s); } diff --git a/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java b/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java index 85e54654e..2c4e2bcd6 100644 --- a/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java +++ b/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.arboriculture.genetics; -import net.minecraft.item.ItemStack; - import forestry.api.arboriculture.EnumGermlingType; import forestry.api.arboriculture.ITree; import forestry.api.arboriculture.ITreeGenome; import forestry.core.genetics.IGeneticDefinition; +import net.minecraft.item.ItemStack; public interface ITreeDefinition extends IGeneticDefinition { @Override diff --git a/src/main/java/forestry/arboriculture/genetics/TreeAlyzerPlugin.java b/src/main/java/forestry/arboriculture/genetics/TreeAlyzerPlugin.java index b737ffe3a..8ff4749f7 100644 --- a/src/main/java/forestry/arboriculture/genetics/TreeAlyzerPlugin.java +++ b/src/main/java/forestry/arboriculture/genetics/TreeAlyzerPlugin.java @@ -59,7 +59,7 @@ public class TreeAlyzerPlugin implements IAlyzerPlugin { @SideOnly(Side.CLIENT) @Override public void drawAnalyticsPage1(GuiScreen gui, ItemStack itemStack) { - if(gui instanceof GuiAlyzer){ + if (gui instanceof GuiAlyzer) { GuiAlyzer guiAlyzer = (GuiAlyzer) gui; ITree tree = TreeManager.treeRoot.getMember(itemStack); if (tree == null) { @@ -69,47 +69,47 @@ public class TreeAlyzerPlugin implements IAlyzerPlugin { if (type == null) { return; } - + TextLayoutHelper textLayout = guiAlyzer.getTextLayout(); - + textLayout.startPage(GuiAlyzer.COLUMN_0, GuiAlyzer.COLUMN_1, GuiAlyzer.COLUMN_2); - + textLayout.drawLine(Translator.translateToLocal("for.gui.active"), GuiAlyzer.COLUMN_1); textLayout.drawLine(Translator.translateToLocal("for.gui.inactive"), GuiAlyzer.COLUMN_2); - + textLayout.newLine(); textLayout.newLine(); - + { String customPrimaryTreeKey = "trees.custom.treealyzer." + type.getName() + "." + tree.getGenome().getPrimary().getUnlocalizedName().replace("trees.species.", ""); String customSecondaryTreeKey = "trees.custom.treealyzer." + type.getName() + "." + tree.getGenome().getSecondary().getUnlocalizedName().replace("trees.species.", ""); - + guiAlyzer.drawSpeciesRow(Translator.translateToLocal("for.gui.species"), tree, EnumTreeChromosome.SPECIES, GuiAlyzer.checkCustomName(customPrimaryTreeKey), GuiAlyzer.checkCustomName(customSecondaryTreeKey)); textLayout.newLine(); } - + guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.saplings"), tree, EnumTreeChromosome.FERTILITY); textLayout.newLineCompressed(); guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.maturity"), tree, EnumTreeChromosome.MATURATION); textLayout.newLineCompressed(); guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.height"), tree, EnumTreeChromosome.HEIGHT); textLayout.newLineCompressed(); - + IAlleleInteger activeGirth = (IAlleleInteger) tree.getGenome().getActiveAllele(EnumTreeChromosome.GIRTH); IAlleleInteger inactiveGirth = (IAlleleInteger) tree.getGenome().getInactiveAllele(EnumTreeChromosome.GIRTH); textLayout.drawLine(Translator.translateToLocal("for.gui.girth"), GuiAlyzer.COLUMN_0); guiAlyzer.drawLine(String.format("%sx%s", activeGirth.getValue(), activeGirth.getValue()), GuiAlyzer.COLUMN_1, tree, EnumTreeChromosome.GIRTH, false); guiAlyzer.drawLine(String.format("%sx%s", inactiveGirth.getValue(), inactiveGirth.getValue()), GuiAlyzer.COLUMN_2, tree, EnumTreeChromosome.GIRTH, true); - + textLayout.newLineCompressed(); - + guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.yield"), tree, EnumTreeChromosome.YIELD); textLayout.newLineCompressed(); guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.sappiness"), tree, EnumTreeChromosome.SAPPINESS); textLayout.newLineCompressed(); - + guiAlyzer.drawChromosomeRow(Translator.translateToLocal("for.gui.effect"), tree, EnumTreeChromosome.EFFECT); - + textLayout.endPage(); } } @@ -117,69 +117,69 @@ public class TreeAlyzerPlugin implements IAlyzerPlugin { @SideOnly(Side.CLIENT) @Override public void drawAnalyticsPage2(GuiScreen gui, ItemStack itemStack) { - if(gui instanceof GuiAlyzer){ + if (gui instanceof GuiAlyzer) { GuiAlyzer guiAlyzer = (GuiAlyzer) gui; ITree tree = TreeManager.treeRoot.getMember(itemStack); if (tree == null) { return; } - + TextLayoutHelper textLayout = guiAlyzer.getTextLayout(); - + textLayout.startPage(); - + int speciesDominance0 = guiAlyzer.getColorCoding(tree.getGenome().getPrimary().isDominant()); int speciesDominance1 = guiAlyzer.getColorCoding(tree.getGenome().getSecondary().isDominant()); - + textLayout.drawLine(Translator.translateToLocal("for.gui.active"), GuiAlyzer.COLUMN_1); textLayout.drawLine(Translator.translateToLocal("for.gui.inactive"), GuiAlyzer.COLUMN_2); - + textLayout.newLine(); textLayout.newLine(); - + IAlleleTreeSpecies activeSpecies = (IAlleleTreeSpecies) tree.getGenome().getActiveAllele(EnumTreeChromosome.SPECIES); IAlleleTreeSpecies inActiveSpecies = (IAlleleTreeSpecies) tree.getGenome().getInactiveAllele(EnumTreeChromosome.SPECIES); - + int activeCarbonization = activeSpecies.getWoodProvider().getCarbonization(); int inactiveCarbonization = inActiveSpecies.getWoodProvider().getCarbonization(); textLayout.drawLine(Translator.translateToLocal("for.gui.carbonization"), GuiAlyzer.COLUMN_0); guiAlyzer.drawLine(Integer.toString(activeCarbonization), GuiAlyzer.COLUMN_1, tree, EnumTreeChromosome.SPECIES, false); guiAlyzer.drawLine(Integer.toString(inactiveCarbonization), GuiAlyzer.COLUMN_2, tree, EnumTreeChromosome.SPECIES, true); textLayout.newLine(); - + textLayout.drawLine(Translator.translateToLocal("for.gui.native"), GuiAlyzer.COLUMN_0); textLayout.drawLine(Translator.translateToLocal("for.gui." + tree.getGenome().getPrimary().getPlantType().toString().toLowerCase(Locale.ENGLISH)), GuiAlyzer.COLUMN_1, speciesDominance0); textLayout.drawLine(Translator.translateToLocal("for.gui." + tree.getGenome().getSecondary().getPlantType().toString().toLowerCase(Locale.ENGLISH)), GuiAlyzer.COLUMN_2, speciesDominance1); - + textLayout.newLine(); - + // FRUITS textLayout.drawLine(Translator.translateToLocal("for.gui.supports"), GuiAlyzer.COLUMN_0); List families0 = new ArrayList<>(tree.getGenome().getPrimary().getSuitableFruit()); List families1 = new ArrayList<>(tree.getGenome().getSecondary().getSuitableFruit()); - + int max = Math.max(families0.size(), families1.size()); for (int i = 0; i < max; i++) { if (i > 0) { textLayout.newLineCompressed(); } - + if (families0.size() > i) { textLayout.drawLine(families0.get(i).getName(), GuiAlyzer.COLUMN_1, speciesDominance0); } if (families1.size() > i) { textLayout.drawLine(families1.get(i).getName(), GuiAlyzer.COLUMN_2, speciesDominance1); } - + } - + textLayout.newLine(); - + int fruitDominance0 = guiAlyzer.getColorCoding(tree.getGenome().getActiveAllele(EnumTreeChromosome.FRUITS).isDominant()); int fruitDominance1 = guiAlyzer.getColorCoding(tree.getGenome().getInactiveAllele(EnumTreeChromosome.FRUITS).isDominant()); - + textLayout.drawLine(Translator.translateToLocal("for.gui.fruits"), GuiAlyzer.COLUMN_0); String strike = ""; IAllele fruit0 = tree.getGenome().getActiveAllele(EnumTreeChromosome.FRUITS); @@ -187,27 +187,27 @@ public class TreeAlyzerPlugin implements IAlyzerPlugin { strike = TextFormatting.STRIKETHROUGH.toString(); } textLayout.drawLine(strike + tree.getGenome().getFruitProvider().getDescription(), GuiAlyzer.COLUMN_1, fruitDominance0); - + strike = ""; IAlleleFruit fruit1 = (IAlleleFruit) tree.getGenome().getInactiveAllele(EnumTreeChromosome.FRUITS); if (!tree.getGenome().getSecondary().getSuitableFruit().contains(fruit1.getProvider().getFamily()) && fruit1 != AlleleFruits.fruitNone) { strike = TextFormatting.STRIKETHROUGH.toString(); } textLayout.drawLine(strike + fruit1.getProvider().getDescription(), GuiAlyzer.COLUMN_2, fruitDominance1); - + textLayout.newLine(); - + textLayout.drawLine(Translator.translateToLocal("for.gui.family"), GuiAlyzer.COLUMN_0); IFruitFamily primary = tree.getGenome().getFruitProvider().getFamily(); IFruitFamily secondary = ((IAlleleFruit) tree.getGenome().getInactiveAllele(EnumTreeChromosome.FRUITS)).getProvider().getFamily(); - + if (primary != null) { textLayout.drawLine(primary.getName(), GuiAlyzer.COLUMN_1, fruitDominance0); } if (secondary != null) { textLayout.drawLine(secondary.getName(), GuiAlyzer.COLUMN_2, fruitDominance1); } - + textLayout.endPage(); } } @@ -215,21 +215,21 @@ public class TreeAlyzerPlugin implements IAlyzerPlugin { @SideOnly(Side.CLIENT) @Override public void drawAnalyticsPage3(GuiScreen gui, ItemStack itemStack) { - if(gui instanceof GuiAlyzer){ + if (gui instanceof GuiAlyzer) { GuiAlyzer guiAlyzer = (GuiAlyzer) gui; ITree tree = TreeManager.treeRoot.getMember(itemStack); if (tree == null) { return; } - + TextLayoutHelper textLayout = guiAlyzer.getTextLayout(); WidgetManager widgetManager = guiAlyzer.getWidgetManager(); - + textLayout.startPage(GuiAlyzer.COLUMN_0, GuiAlyzer.COLUMN_1, GuiAlyzer.COLUMN_2); - + textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.produce") + ":", GuiAlyzer.COLUMN_0); textLayout.newLine(); - + int x = GuiAlyzer.COLUMN_0; for (ItemStack stack : tree.getProducts().keySet()) { widgetManager.add(new ItemStackWidget(widgetManager, x, textLayout.getLineY(), stack)); @@ -239,15 +239,15 @@ public class TreeAlyzerPlugin implements IAlyzerPlugin { textLayout.newLine(); } } - + textLayout.newLine(); textLayout.newLine(); textLayout.newLine(); textLayout.newLine(); - + textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.specialty") + ":", GuiAlyzer.COLUMN_0); textLayout.newLine(); - + x = GuiAlyzer.COLUMN_0; for (ItemStack stack : tree.getSpecialties().keySet()) { Proxies.common.getClientInstance().getRenderItem().renderItemIntoGUI(stack, guiAlyzer.getGuiLeft() + x, guiAlyzer.getGuiTop() + textLayout.getLineY()); @@ -257,7 +257,7 @@ public class TreeAlyzerPlugin implements IAlyzerPlugin { textLayout.newLine(); } } - + textLayout.endPage(); } } diff --git a/src/main/java/forestry/arboriculture/genetics/TreeMutation.java b/src/main/java/forestry/arboriculture/genetics/TreeMutation.java index 7783d07bd..7b402f0d5 100755 --- a/src/main/java/forestry/arboriculture/genetics/TreeMutation.java +++ b/src/main/java/forestry/arboriculture/genetics/TreeMutation.java @@ -10,30 +10,29 @@ ******************************************************************************/ package forestry.arboriculture.genetics; -import forestry.api.core.ForestryAPI; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.arboriculture.IAlleleTreeSpecies; import forestry.api.arboriculture.ITreeGenome; import forestry.api.arboriculture.ITreeMutation; import forestry.api.arboriculture.ITreeMutationBuilder; import forestry.api.arboriculture.ITreeRoot; import forestry.api.arboriculture.TreeManager; +import forestry.api.core.ForestryAPI; import forestry.api.genetics.IAllele; import forestry.core.genetics.mutations.Mutation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class TreeMutation extends Mutation implements ITreeMutation, ITreeMutationBuilder { public TreeMutation(IAlleleTreeSpecies allele0, IAlleleTreeSpecies allele1, IAllele[] template, int chance) { super(allele0, allele1, template, chance); } - + @Override public ITreeMutation build() { return this; } - + @Override public ITreeRoot getRoot() { return TreeManager.treeRoot; diff --git a/src/main/java/forestry/arboriculture/genetics/WoodProviderVanilla.java b/src/main/java/forestry/arboriculture/genetics/WoodProviderVanilla.java index b04aa78a7..847e657f5 100644 --- a/src/main/java/forestry/arboriculture/genetics/WoodProviderVanilla.java +++ b/src/main/java/forestry/arboriculture/genetics/WoodProviderVanilla.java @@ -31,7 +31,7 @@ public class WoodProviderVanilla implements IWoodProvider { public WoodProviderVanilla(EnumVanillaWoodType woodType) { this.woodType = woodType; } - + @Override public void registerSprites(Item item, ITextureManager manager) { String name; @@ -62,7 +62,7 @@ public class WoodProviderVanilla implements IWoodProvider { woodTop = textureMap.registerSprite(new ResourceLocation("minecraft", "blocks/log_" + name + "_top")); woodBark = textureMap.registerSprite(new ResourceLocation("minecraft", "blocks/log_" + name)); } - + @Override public TextureAtlasSprite getSprite(boolean isTop) { if (isTop) { @@ -71,14 +71,14 @@ public class WoodProviderVanilla implements IWoodProvider { return woodBark; } } - + @Override public ItemStack getWoodStack() { return TreeManager.woodAccess.getStack(woodType, WoodBlockKind.LOG, false); } - + @Override - public float getCharcoalChance(int numberOfCharcoal){ + public float getCharcoalChance(int numberOfCharcoal) { return woodType.getCharcoalChance(numberOfCharcoal); } diff --git a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java index bdc290107..b4c397346 100644 --- a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java +++ b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java @@ -10,16 +10,13 @@ ******************************************************************************/ package forestry.arboriculture.genetics.alleles; -import javax.annotation.Nullable; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.arboriculture.IAlleleLeafEffect; import forestry.api.arboriculture.ITreeGenome; import forestry.api.genetics.IEffectData; import forestry.core.config.Constants; import forestry.core.genetics.alleles.AlleleCategorized; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class AlleleLeafEffect extends AlleleCategorized implements IAlleleLeafEffect { diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java b/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java index d95e15fcd..ba1402c7c 100644 --- a/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java +++ b/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java @@ -10,14 +10,6 @@ ******************************************************************************/ package forestry.arboriculture.items; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.arboriculture.PluginArboriculture; import forestry.arboriculture.blocks.BlockForestryLeaves; import forestry.arboriculture.tiles.TileLeaves; @@ -25,6 +17,13 @@ import forestry.core.items.IColoredItem; import forestry.core.items.ItemBlockForestry; import forestry.core.proxy.Proxies; import forestry.core.utils.Translator; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class ItemBlockLeaves extends ItemBlockForestry implements IColoredItem { @@ -66,7 +65,7 @@ public class ItemBlockLeaves extends ItemBlockForestry impl TileLeaves tileLeaves = new TileLeaves(); tileLeaves.readFromNBT(itemStack.getTagCompound()); - + if (renderPass == 0) { EntityPlayer player = Proxies.common.getPlayer(); return tileLeaves.getFoliageColour(player); @@ -74,7 +73,7 @@ public class ItemBlockLeaves extends ItemBlockForestry impl return tileLeaves.getFruitColour(); } } - + @Override public boolean placeBlockAt(ItemStack itemStack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) { return false; diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockPile.java b/src/main/java/forestry/arboriculture/items/ItemBlockPile.java index 0735daa7c..c41c70608 100644 --- a/src/main/java/forestry/arboriculture/items/ItemBlockPile.java +++ b/src/main/java/forestry/arboriculture/items/ItemBlockPile.java @@ -44,10 +44,10 @@ public class ItemBlockPile extends ItemBlockForestry { public int getMetadata(int i) { return i; } - + @Override public String getItemStackDisplayName(ItemStack itemstack) { - if(block == PluginArboriculture.blocks.piles.get(EnumPileType.WOOD)){ + if (block == PluginArboriculture.blocks.piles.get(EnumPileType.WOOD)) { if (itemstack.getTagCompound() == null) { return "Unknown"; } @@ -62,7 +62,7 @@ public class ItemBlockPile extends ItemBlockForestry { } String typeString = Translator.translateToLocal("for.trees.grammar.pile.type"); return Translator.translateToLocal("for.trees.grammar.pile").replaceAll("%SPECIES", species.getName()).replaceAll("%TYPE", typeString); - }else{ + } else { return Translator.translateToLocal("for.trees.pile.dirt"); } } diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java index 3f788c19f..9b715eb41 100644 --- a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java +++ b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.arboriculture.items; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - import forestry.api.arboriculture.IWoodType; import forestry.arboriculture.IWoodTyped; import forestry.arboriculture.WoodHelper; import forestry.core.items.ItemBlockForestry; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; public class ItemBlockWood extends ItemBlockForestry { public ItemBlockWood(Block block) { diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java b/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java index 61e928749..7800f31d0 100644 --- a/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java +++ b/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java @@ -1,11 +1,10 @@ package forestry.arboriculture.items; -import net.minecraft.item.ItemSlab; -import net.minecraft.item.ItemStack; - import forestry.api.arboriculture.IWoodType; import forestry.arboriculture.WoodHelper; import forestry.arboriculture.blocks.BlockForestrySlab; +import net.minecraft.item.ItemSlab; +import net.minecraft.item.ItemStack; public class ItemBlockWoodSlab extends ItemSlab { public ItemBlockWoodSlab(BlockForestrySlab block, BlockForestrySlab slab, BlockForestrySlab doubleSlab) { diff --git a/src/main/java/forestry/arboriculture/items/ItemGrafter.java b/src/main/java/forestry/arboriculture/items/ItemGrafter.java index 03ed48523..de18ba460 100755 --- a/src/main/java/forestry/arboriculture/items/ItemGrafter.java +++ b/src/main/java/forestry/arboriculture/items/ItemGrafter.java @@ -12,6 +12,9 @@ package forestry.arboriculture.items; import java.util.List; +import forestry.api.arboriculture.IToolGrafter; +import forestry.api.core.Tabs; +import forestry.core.items.ItemForestryTool; import forestry.core.utils.Translator; import net.minecraft.block.Block; import net.minecraft.block.BlockLeaves; @@ -23,10 +26,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.arboriculture.IToolGrafter; -import forestry.api.core.Tabs; -import forestry.core.items.ItemForestryTool; - public class ItemGrafter extends ItemForestryTool implements IToolGrafter { public ItemGrafter(int maxDamage) { super(ItemStack.EMPTY); diff --git a/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java b/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java index e8d857968..ecc814a22 100644 --- a/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java +++ b/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.arboriculture.items; -import net.minecraftforge.oredict.OreDictionary; - import forestry.api.arboriculture.EnumGermlingType; import forestry.core.items.ItemRegistry; import forestry.core.utils.OreDictUtil; +import net.minecraftforge.oredict.OreDictionary; public class ItemRegistryArboriculture extends ItemRegistry { public final ItemGermlingGE sapling; @@ -25,7 +24,7 @@ public class ItemRegistryArboriculture extends ItemRegistry { public ItemRegistryArboriculture() { sapling = registerItem(new ItemGermlingGE(EnumGermlingType.SAPLING), "sapling"); OreDictionary.registerOre(OreDictUtil.TREE_SAPLING, sapling.getWildcard()); - + pollenFertile = registerItem(new ItemGermlingGE(EnumGermlingType.POLLEN), "pollenFertile"); grafter = registerItem(new ItemGrafter(9), "grafter"); diff --git a/src/main/java/forestry/arboriculture/multiblock/EnumPilePosition.java b/src/main/java/forestry/arboriculture/multiblock/EnumPilePosition.java index 830642e94..b2a64f26d 100644 --- a/src/main/java/forestry/arboriculture/multiblock/EnumPilePosition.java +++ b/src/main/java/forestry/arboriculture/multiblock/EnumPilePosition.java @@ -4,15 +4,15 @@ import java.util.Locale; import net.minecraft.util.IStringSerializable; -public enum EnumPilePosition implements IStringSerializable{ +public enum EnumPilePosition implements IStringSerializable { INTERIOR, - FRONT, - BACK, - SIDE_RIGHT, - SIDE_LEFT, - CORNER_FRONT_LEFT, - CORNER_FRONT_RIGHT, - CORNER_BACK_LEFT, + FRONT, + BACK, + SIDE_RIGHT, + SIDE_LEFT, + CORNER_FRONT_LEFT, + CORNER_FRONT_RIGHT, + CORNER_BACK_LEFT, CORNER_BACK_RIGHT; @Override diff --git a/src/main/java/forestry/arboriculture/multiblock/FakeCharcoalPileController.java b/src/main/java/forestry/arboriculture/multiblock/FakeCharcoalPileController.java index 49ec8486a..67328b5f6 100644 --- a/src/main/java/forestry/arboriculture/multiblock/FakeCharcoalPileController.java +++ b/src/main/java/forestry/arboriculture/multiblock/FakeCharcoalPileController.java @@ -6,10 +6,10 @@ import net.minecraft.util.math.BlockPos; public class FakeCharcoalPileController extends FakeMultiblockController implements ICharcoalPileControllerInternal { public static final FakeCharcoalPileController instance = new FakeCharcoalPileController(); - + private FakeCharcoalPileController() { } - + @Override public String getUnlocalizedType() { return "for.multiblock.charcoalpile.type"; @@ -19,7 +19,7 @@ public class FakeCharcoalPileController extends FakeMultiblockController impleme public boolean isActive() { return false; } - + @Override public void setActive(boolean active) { } diff --git a/src/main/java/forestry/arboriculture/multiblock/ICharcoalPileControllerInternal.java b/src/main/java/forestry/arboriculture/multiblock/ICharcoalPileControllerInternal.java index 1987d4a63..4dc1fe8c3 100644 --- a/src/main/java/forestry/arboriculture/multiblock/ICharcoalPileControllerInternal.java +++ b/src/main/java/forestry/arboriculture/multiblock/ICharcoalPileControllerInternal.java @@ -6,9 +6,9 @@ import forestry.core.tiles.IActivatable; import net.minecraft.util.math.BlockPos; public interface ICharcoalPileControllerInternal extends IMultiblockControllerInternal, ICharcoalPileController, IActivatable { - + BlockPos getMinimumCoord(); - + BlockPos getMaximumCoord(); } diff --git a/src/main/java/forestry/arboriculture/multiblock/MultiblockLogicCharcoalPile.java b/src/main/java/forestry/arboriculture/multiblock/MultiblockLogicCharcoalPile.java index a0a4bc865..cadd2c97b 100644 --- a/src/main/java/forestry/arboriculture/multiblock/MultiblockLogicCharcoalPile.java +++ b/src/main/java/forestry/arboriculture/multiblock/MultiblockLogicCharcoalPile.java @@ -10,9 +10,9 @@ ******************************************************************************/ package forestry.arboriculture.multiblock; -import net.minecraft.world.World; import forestry.api.multiblock.IMultiblockLogicCharcoalPile; import forestry.core.multiblock.MultiblockLogic; +import net.minecraft.world.World; public class MultiblockLogicCharcoalPile extends MultiblockLogic implements IMultiblockLogicCharcoalPile { diff --git a/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java b/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java index 242f9ecb3..270e4d745 100755 --- a/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java +++ b/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java @@ -29,7 +29,7 @@ public class ProxyArboriculture { public int getFoliageColorPine() { return 6396257; } - - public void registerWoodModel(T woodTyped, boolean withVariants){ + + public void registerWoodModel(T woodTyped, boolean withVariants) { } } diff --git a/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java b/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java index ad09136c6..905a1f18e 100644 --- a/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java +++ b/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java @@ -22,8 +22,8 @@ import forestry.api.genetics.IAllele; import forestry.arboriculture.genetics.Tree; import forestry.core.network.IStreamable; import forestry.core.network.PacketBufferForestry; -import forestry.core.owner.IOwnerHandler; import forestry.core.owner.IOwnedTile; +import forestry.core.owner.IOwnerHandler; import forestry.core.owner.OwnerHandler; import forestry.core.utils.NBTUtilForestry; import net.minecraft.block.Block; diff --git a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java index d41d83fb9..18033c0f4 100644 --- a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java +++ b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java @@ -12,14 +12,12 @@ package forestry.arboriculture.worldgen; import javax.annotation.Nullable; +import com.mojang.authlib.GameProfile; +import forestry.api.world.ITreeGenData; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import com.mojang.authlib.GameProfile; - -import forestry.api.world.ITreeGenData; - public class TreeBlockTypeLeaf implements ITreeBlockType { private final ITreeGenData tree; @Nullable diff --git a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java index 3404da4db..a91b96dfd 100644 --- a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java +++ b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.arboriculture.worldgen; +import forestry.api.world.ITreeGenData; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.world.ITreeGenData; - public class TreeBlockTypeLog implements ITreeBlockType { private final ITreeGenData tree; private EnumFacing facing = EnumFacing.UP; diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java index 19dd0a315..1041bf3f1 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java @@ -14,11 +14,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenChestnut extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java index f66bca1cd..744d729c1 100644 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java @@ -14,11 +14,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenCocobolo extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java index d3debb75f..2f321a9c2 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java @@ -12,11 +12,11 @@ package forestry.arboriculture.worldgen; import java.util.List; import java.util.Random; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenDate extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java index da1729df2..d45eaa9e0 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenKapok extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java index c331b16ff..90429c765 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java @@ -12,11 +12,11 @@ package forestry.arboriculture.worldgen; import java.util.List; import java.util.Random; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenLarch extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java index 76083e3db..26d684121 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java @@ -12,11 +12,11 @@ package forestry.arboriculture.worldgen; import java.util.List; import java.util.Random; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenLemon extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java index 1ae07b45b..8a6a6204e 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenMahoe extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java index 4349cca82..458acf641 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenMahogany extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java index 8903b90e6..178a369d8 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenMaple extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java index 095b9ebc6..862b4bb81 100644 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java @@ -15,13 +15,12 @@ import java.util.List; import java.util.Random; import java.util.Set; +import forestry.api.world.ITreeGenData; +import forestry.core.worldgen.WorldGenHelper; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.world.ITreeGenData; -import forestry.core.worldgen.WorldGenHelper; - public class WorldGenPadauk extends WorldGenTree { public WorldGenPadauk(ITreeGenData tree) { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java index 1e72b9e4c..e286cdd8f 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java @@ -14,11 +14,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenPapaya extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java index c0540c21b..a4a57be57 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenPine extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java index bf1309bfb..55d63ad6a 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java @@ -12,11 +12,11 @@ package forestry.arboriculture.worldgen; import java.util.List; import java.util.Random; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenPlum extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java index 071de62f9..d563fca52 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java @@ -12,11 +12,11 @@ package forestry.arboriculture.worldgen; import java.util.List; import java.util.Random; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenPoplar extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java index 6d02d49f3..0bf84095a 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenSequoia extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java index 97d21415b..486c9dc42 100644 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java @@ -14,11 +14,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenSilverLime extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java index c488c8ad8..f1835c80f 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenSpruce extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java index 5d3ab9238..b39606d18 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java @@ -14,11 +14,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenTeak extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java index 95af9c16f..b49595878 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java @@ -16,13 +16,12 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.arboriculture.ITreeModifier; import forestry.api.arboriculture.TreeManager; import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public abstract class WorldGenTree extends WorldGenArboriculture { private static final int minHeight = 4; diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java index ef82df270..70449c7e4 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenWalnut extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java index 28e986335..0aa6b94ab 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenWenge extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java index 9d69cbdc8..8e347c6bd 100755 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java @@ -15,11 +15,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenWillow extends WorldGenTree { diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java index 9b54b093d..faa6eda55 100644 --- a/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java +++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java @@ -14,11 +14,10 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.world.ITreeGenData; import forestry.core.worldgen.WorldGenHelper; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class WorldGenZebrawood extends WorldGenTree { diff --git a/src/main/java/forestry/core/DefaultClimateProvider.java b/src/main/java/forestry/core/DefaultClimateProvider.java index 38f5bfd3a..731ffa6bc 100644 --- a/src/main/java/forestry/core/DefaultClimateProvider.java +++ b/src/main/java/forestry/core/DefaultClimateProvider.java @@ -19,26 +19,26 @@ import net.minecraft.world.World; import net.minecraft.world.biome.Biome; public class DefaultClimateProvider implements IClimateProvider { - private final World world; - private final BlockPos pos; + private final World world; + private final BlockPos pos; - public DefaultClimateProvider(World world, BlockPos pos) { - this.world = world; - this.pos = pos; - } + public DefaultClimateProvider(World world, BlockPos pos) { + this.world = world; + this.pos = pos; + } - @Override - public Biome getBiome() { - return world.getBiome(pos); - } + @Override + public Biome getBiome() { + return world.getBiome(pos); + } - @Override - public EnumTemperature getTemperature() { - return EnumTemperature.getFromBiome(world.getBiome(pos), world, pos); - } + @Override + public EnumTemperature getTemperature() { + return EnumTemperature.getFromBiome(world.getBiome(pos), world, pos); + } - @Override - public EnumHumidity getHumidity() { - return EnumHumidity.getFromValue(ForestryAPI.climateManager.getHumidity(world, pos)); - } + @Override + public EnumHumidity getHumidity() { + return EnumHumidity.getFromValue(ForestryAPI.climateManager.getHumidity(world, pos)); + } } diff --git a/src/main/java/forestry/core/EventHandlerCore.java b/src/main/java/forestry/core/EventHandlerCore.java index 67db81d2b..ba9e7b3cb 100755 --- a/src/main/java/forestry/core/EventHandlerCore.java +++ b/src/main/java/forestry/core/EventHandlerCore.java @@ -12,12 +12,19 @@ package forestry.core; import java.util.Collection; +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IBreedingTracker; +import forestry.api.genetics.ISpeciesRoot; +import forestry.core.config.Constants; +import forestry.core.errors.ErrorStateRegistry; +import forestry.core.loot.LootTableLoader; import forestry.core.models.ModelBlockCached; +import forestry.core.render.TextureManager; +import forestry.plugins.PluginManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.loot.LootPool; import net.minecraft.world.storage.loot.LootTable; - import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.event.LootTableLoadEvent; import net.minecraftforge.event.entity.player.EntityItemPickupEvent; @@ -28,15 +35,6 @@ import net.minecraftforge.fml.common.gameevent.PlayerEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IBreedingTracker; -import forestry.api.genetics.ISpeciesRoot; -import forestry.core.config.Constants; -import forestry.core.errors.ErrorStateRegistry; -import forestry.core.loot.LootTableLoader; -import forestry.core.render.TextureManager; -import forestry.plugins.PluginManager; - public class EventHandlerCore { public EventHandlerCore() { @@ -89,7 +87,7 @@ public class EventHandlerCore { handler.onWorldUnload(event.getWorld()); } } - + @SubscribeEvent @SideOnly(Side.CLIENT) public void handleTextureRemap(TextureStitchEvent.Pre event) { diff --git a/src/main/java/forestry/core/IPickupHandler.java b/src/main/java/forestry/core/IPickupHandler.java index b45d90c50..b6d01daa6 100644 --- a/src/main/java/forestry/core/IPickupHandler.java +++ b/src/main/java/forestry/core/IPickupHandler.java @@ -15,7 +15,9 @@ import net.minecraft.entity.player.EntityPlayer; public interface IPickupHandler { - /** Returns true if the item was picked up completely */ + /** + * Returns true if the item was picked up completely + */ boolean onItemPickup(EntityPlayer entityPlayer, EntityItem item); } diff --git a/src/main/java/forestry/core/PickupHandlerCore.java b/src/main/java/forestry/core/PickupHandlerCore.java index 963b8787c..aa0a30ce2 100755 --- a/src/main/java/forestry/core/PickupHandlerCore.java +++ b/src/main/java/forestry/core/PickupHandlerCore.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.core; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IBreedingTracker; import forestry.api.genetics.IIndividual; import forestry.api.genetics.ISpeciesRoot; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class PickupHandlerCore implements IPickupHandler { diff --git a/src/main/java/forestry/core/PluginFluids.java b/src/main/java/forestry/core/PluginFluids.java index 3cfb6887f..8cc5e0de7 100644 --- a/src/main/java/forestry/core/PluginFluids.java +++ b/src/main/java/forestry/core/PluginFluids.java @@ -13,17 +13,6 @@ package forestry.core; import javax.annotation.Nullable; import com.google.common.base.Preconditions; -import forestry.core.items.ItemRegistryCore; -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.util.ResourceLocation; - -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.common.registry.GameRegistry; - import forestry.api.core.ForestryAPI; import forestry.api.fuels.FuelManager; import forestry.api.fuels.GeneratorFuel; @@ -31,12 +20,21 @@ import forestry.api.recipes.RecipeManagers; import forestry.core.config.Config; import forestry.core.config.Constants; import forestry.core.fluids.Fluids; +import forestry.core.items.ItemRegistryCore; import forestry.core.items.ItemRegistryFluids; import forestry.core.proxy.Proxies; import forestry.core.utils.Log; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fml.common.registry.ForgeRegistries; +import net.minecraftforge.fml.common.registry.GameRegistry; @ForestryPlugin(pluginID = ForestryPluginUids.FLUIDS, name = "Fluids", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.fluids.description") public class PluginFluids extends BlankForestryPlugin { diff --git a/src/main/java/forestry/core/TickHandlerCoreClient.java b/src/main/java/forestry/core/TickHandlerCoreClient.java index dbea461e3..4bd926ca4 100755 --- a/src/main/java/forestry/core/TickHandlerCoreClient.java +++ b/src/main/java/forestry/core/TickHandlerCoreClient.java @@ -10,16 +10,14 @@ ******************************************************************************/ package forestry.core; +import forestry.core.utils.GeneticsUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderGlobal; import net.minecraft.entity.player.EntityPlayer; - import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; -import forestry.core.utils.GeneticsUtil; - public class TickHandlerCoreClient { private boolean hasNaturalistEye; diff --git a/src/main/java/forestry/core/TickHandlerCoreServer.java b/src/main/java/forestry/core/TickHandlerCoreServer.java index 7509bd364..45bc6d98f 100755 --- a/src/main/java/forestry/core/TickHandlerCoreServer.java +++ b/src/main/java/forestry/core/TickHandlerCoreServer.java @@ -10,25 +10,22 @@ ******************************************************************************/ package forestry.core; -import com.google.common.collect.LinkedListMultimap; - import java.util.List; import java.util.Random; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -import net.minecraftforge.event.world.ChunkDataEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; -import net.minecraftforge.fml.common.gameevent.TickEvent.WorldTickEvent; - +import com.google.common.collect.LinkedListMultimap; import forestry.core.config.Config; import forestry.core.config.Constants; import forestry.core.worldgen.WorldGenerator; import forestry.plugins.PluginManager; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.event.world.ChunkDataEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; +import net.minecraftforge.fml.common.gameevent.TickEvent.WorldTickEvent; public class TickHandlerCoreServer { diff --git a/src/main/java/forestry/core/blocks/BlockRegistry.java b/src/main/java/forestry/core/blocks/BlockRegistry.java index cf03694f6..0e525baaa 100644 --- a/src/main/java/forestry/core/blocks/BlockRegistry.java +++ b/src/main/java/forestry/core/blocks/BlockRegistry.java @@ -12,16 +12,14 @@ package forestry.core.blocks; import javax.annotation.Nullable; +import forestry.core.proxy.Proxies; +import forestry.plugins.PluginManager; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; -import forestry.core.proxy.Proxies; -import forestry.plugins.PluginManager; - public abstract class BlockRegistry { protected void registerBlock(T block, @Nullable ItemBlock itemBlock, String name) { if (PluginManager.getStage() != PluginManager.Stage.REGISTER) { diff --git a/src/main/java/forestry/core/blocks/BlockRegistryCore.java b/src/main/java/forestry/core/blocks/BlockRegistryCore.java index 458d8d6a0..fc1bb1707 100644 --- a/src/main/java/forestry/core/blocks/BlockRegistryCore.java +++ b/src/main/java/forestry/core/blocks/BlockRegistryCore.java @@ -10,13 +10,11 @@ ******************************************************************************/ package forestry.core.blocks; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.oredict.OreDictionary; - import forestry.core.items.ItemBlockForestry; import forestry.core.utils.OreDictUtil; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; public class BlockRegistryCore extends BlockRegistry { public final BlockCore analyzer; @@ -35,7 +33,7 @@ public class BlockRegistryCore extends BlockRegistry { escritoire = new BlockCore(BlockTypeCoreTesr.ESCRITOIRE); registerBlock(escritoire, new ItemBlockForestry<>(escritoire), "escritoire"); - + bogEarth = new BlockBogEarth(); registerBlock(bogEarth, new ItemBlockForestry<>(bogEarth), "bogEarth"); bogEarth.setHarvestLevel("shovel", 0); @@ -43,14 +41,14 @@ public class BlockRegistryCore extends BlockRegistry { humus = new BlockHumus(); registerBlock(humus, new ItemBlockForestry<>(humus), "humus"); humus.setHarvestLevel("shovel", 0); - + resources = new BlockResourceOre(); registerBlock(resources, new ItemBlockForestry(resources), "resources"); resources.setHarvestLevel("pickaxe", 1); OreDictionary.registerOre(OreDictUtil.ORE_APATITE, resources.get(EnumResourceType.APATITE, 1)); OreDictionary.registerOre(OreDictUtil.ORE_COPPER, resources.get(EnumResourceType.COPPER, 1)); OreDictionary.registerOre(OreDictUtil.ORE_TIN, resources.get(EnumResourceType.TIN, 1)); - + BlockResourceStorage resourceStorage = new BlockResourceStorage(); registerBlock(resourceStorage, new ItemBlockForestry(resourceStorage), "resourceStorage"); resourceStorage.setHarvestLevel("pickaxe", 0); diff --git a/src/main/java/forestry/core/blocks/BlockStructure.java b/src/main/java/forestry/core/blocks/BlockStructure.java index 547866bec..34423f621 100644 --- a/src/main/java/forestry/core/blocks/BlockStructure.java +++ b/src/main/java/forestry/core/blocks/BlockStructure.java @@ -10,6 +10,13 @@ ******************************************************************************/ package forestry.core.blocks; +import com.mojang.authlib.GameProfile; +import forestry.api.multiblock.IMultiblockComponent; +import forestry.api.multiblock.IMultiblockController; +import forestry.core.circuits.ISocketable; +import forestry.core.multiblock.MultiblockTileEntityForestry; +import forestry.core.multiblock.MultiblockUtil; +import forestry.core.utils.InventoryUtil; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; @@ -24,15 +31,6 @@ import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.World; -import com.mojang.authlib.GameProfile; - -import forestry.api.multiblock.IMultiblockComponent; -import forestry.api.multiblock.IMultiblockController; -import forestry.core.circuits.ISocketable; -import forestry.core.multiblock.MultiblockTileEntityForestry; -import forestry.core.multiblock.MultiblockUtil; -import forestry.core.utils.InventoryUtil; - public abstract class BlockStructure extends BlockForestry { protected BlockStructure(Material material) { diff --git a/src/main/java/forestry/core/blocks/EnumResourceType.java b/src/main/java/forestry/core/blocks/EnumResourceType.java index a42fda0ae..b2c3ebf45 100644 --- a/src/main/java/forestry/core/blocks/EnumResourceType.java +++ b/src/main/java/forestry/core/blocks/EnumResourceType.java @@ -19,7 +19,7 @@ public enum EnumResourceType implements IStringSerializable { COPPER(1, true), TIN(2, true), BRONZE(3, false); - + public static final EnumResourceType[] VALUES = values(); private final int meta; @@ -33,7 +33,7 @@ public enum EnumResourceType implements IStringSerializable { public int getMeta() { return meta; } - + public boolean hasOre() { return hasOre; } diff --git a/src/main/java/forestry/core/blocks/IBlockRotatable.java b/src/main/java/forestry/core/blocks/IBlockRotatable.java index 47b185c61..9ba815ae6 100644 --- a/src/main/java/forestry/core/blocks/IBlockRotatable.java +++ b/src/main/java/forestry/core/blocks/IBlockRotatable.java @@ -8,5 +8,5 @@ import net.minecraft.world.World; public interface IBlockRotatable { void rotateAfterPlacement(EntityPlayer player, World world, BlockPos pos, EnumFacing side); - + } diff --git a/src/main/java/forestry/core/blocks/IBlockTypeCustom.java b/src/main/java/forestry/core/blocks/IBlockTypeCustom.java index e0f6132c5..0b3674c03 100644 --- a/src/main/java/forestry/core/blocks/IBlockTypeCustom.java +++ b/src/main/java/forestry/core/blocks/IBlockTypeCustom.java @@ -1,5 +1,5 @@ package forestry.core.blocks; -public interface IBlockTypeCustom extends IBlockType{ - +public interface IBlockTypeCustom extends IBlockType { + } diff --git a/src/main/java/forestry/core/blocks/IBlockWithMeta.java b/src/main/java/forestry/core/blocks/IBlockWithMeta.java index 83b59b02f..3057386af 100644 --- a/src/main/java/forestry/core/blocks/IBlockWithMeta.java +++ b/src/main/java/forestry/core/blocks/IBlockWithMeta.java @@ -13,5 +13,5 @@ package forestry.core.blocks; public interface IBlockWithMeta { String getNameFromMeta(int meta); - + } diff --git a/src/main/java/forestry/core/blocks/IMachineProperties.java b/src/main/java/forestry/core/blocks/IMachineProperties.java index bd1e90ef0..7bbd1db50 100644 --- a/src/main/java/forestry/core/blocks/IMachineProperties.java +++ b/src/main/java/forestry/core/blocks/IMachineProperties.java @@ -12,6 +12,8 @@ package forestry.core.blocks; import javax.annotation.Nullable; +import forestry.api.core.IModelManager; +import forestry.core.tiles.TileForestry; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; @@ -23,12 +25,9 @@ import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import forestry.api.core.IModelManager; -import forestry.core.tiles.TileForestry; - public interface IMachineProperties extends IStringSerializable { String getTeIdent(); - + Class getTeClass(); /** @@ -40,14 +39,14 @@ public interface IMachineProperties extends IStringSeria TileEntity createTileEntity(); - void setBlock( Block block); + void setBlock(Block block); @Nullable Block getBlock(); - + boolean isFullCube(IBlockState state); - AxisAlignedBB getBoundingBox( BlockPos pos, IBlockState state); - - RayTraceResult collisionRayTrace( World world, BlockPos pos, Vec3d startVec, Vec3d endVec); + AxisAlignedBB getBoundingBox(BlockPos pos, IBlockState state); + + RayTraceResult collisionRayTrace(World world, BlockPos pos, Vec3d startVec, Vec3d endVec); } diff --git a/src/main/java/forestry/core/blocks/IMachinePropertiesTesr.java b/src/main/java/forestry/core/blocks/IMachinePropertiesTesr.java index c61b3eea1..6dbe0a436 100644 --- a/src/main/java/forestry/core/blocks/IMachinePropertiesTesr.java +++ b/src/main/java/forestry/core/blocks/IMachinePropertiesTesr.java @@ -12,17 +12,16 @@ package forestry.core.blocks; import javax.annotation.Nullable; +import forestry.core.tiles.TileForestry; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import forestry.core.tiles.TileForestry; - public interface IMachinePropertiesTesr extends IMachineProperties { - + /** * @return The renderer from the machine */ @Nullable TileEntitySpecialRenderer getRenderer(); - + String getParticleTextureLocation(); } diff --git a/src/main/java/forestry/core/blocks/properties/PropertyAllele.java b/src/main/java/forestry/core/blocks/properties/PropertyAllele.java index c0a3f32ab..3fa516a1c 100644 --- a/src/main/java/forestry/core/blocks/properties/PropertyAllele.java +++ b/src/main/java/forestry/core/blocks/properties/PropertyAllele.java @@ -10,15 +10,13 @@ ******************************************************************************/ package forestry.core.blocks.properties; -import com.google.common.base.Optional; - -import net.minecraft.block.properties.IProperty; - import java.util.List; +import com.google.common.base.Optional; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAllele; import forestry.api.genetics.IAlleleProperty; +import net.minecraft.block.properties.IProperty; public abstract class PropertyAllele> implements IProperty { protected final String name; @@ -54,8 +52,8 @@ public abstract class PropertyAllele> implements IP return false; } } - + @Override public abstract List getAllowedValues(); - + } diff --git a/src/main/java/forestry/core/blocks/properties/UnlistedBlockAccess.java b/src/main/java/forestry/core/blocks/properties/UnlistedBlockAccess.java index 8df4f1d7a..7ce9b207a 100644 --- a/src/main/java/forestry/core/blocks/properties/UnlistedBlockAccess.java +++ b/src/main/java/forestry/core/blocks/properties/UnlistedBlockAccess.java @@ -11,7 +11,6 @@ package forestry.core.blocks.properties; import net.minecraft.world.IBlockAccess; - import net.minecraftforge.common.property.IUnlistedProperty; public final class UnlistedBlockAccess implements IUnlistedProperty { diff --git a/src/main/java/forestry/core/blocks/properties/UnlistedBlockPos.java b/src/main/java/forestry/core/blocks/properties/UnlistedBlockPos.java index 9a967f0cc..7b5758bf6 100644 --- a/src/main/java/forestry/core/blocks/properties/UnlistedBlockPos.java +++ b/src/main/java/forestry/core/blocks/properties/UnlistedBlockPos.java @@ -11,7 +11,6 @@ package forestry.core.blocks.properties; import net.minecraft.util.math.BlockPos; - import net.minecraftforge.common.property.IUnlistedProperty; public final class UnlistedBlockPos implements IUnlistedProperty { diff --git a/src/main/java/forestry/core/circuits/CircuitBoard.java b/src/main/java/forestry/core/circuits/CircuitBoard.java index 72cafa94b..5938bdf15 100755 --- a/src/main/java/forestry/core/circuits/CircuitBoard.java +++ b/src/main/java/forestry/core/circuits/CircuitBoard.java @@ -15,9 +15,6 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.text.TextFormatting; - import forestry.api.circuits.ChipsetManager; import forestry.api.circuits.ICircuit; import forestry.api.circuits.ICircuitBoard; @@ -25,6 +22,8 @@ import forestry.api.circuits.ICircuitLayout; import forestry.api.circuits.ICircuitSocketType; import forestry.core.proxy.Proxies; import forestry.core.utils.Translator; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.text.TextFormatting; public class CircuitBoard implements ICircuitBoard { diff --git a/src/main/java/forestry/core/circuits/CircuitLibrary.java b/src/main/java/forestry/core/circuits/CircuitLibrary.java index 0cf13b9fc..3b95e0295 100755 --- a/src/main/java/forestry/core/circuits/CircuitLibrary.java +++ b/src/main/java/forestry/core/circuits/CircuitLibrary.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.core.circuits; +import forestry.api.circuits.ICircuitLibrary; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.WorldSavedData; -import forestry.api.circuits.ICircuitLibrary; - public class CircuitLibrary extends WorldSavedData implements ICircuitLibrary { public CircuitLibrary(String par1Str) { diff --git a/src/main/java/forestry/core/circuits/CircuitRecipe.java b/src/main/java/forestry/core/circuits/CircuitRecipe.java index 17dc0721f..e5c236cb9 100644 --- a/src/main/java/forestry/core/circuits/CircuitRecipe.java +++ b/src/main/java/forestry/core/circuits/CircuitRecipe.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.core.circuits; -import net.minecraft.item.ItemStack; - import forestry.api.circuits.ICircuit; import forestry.api.circuits.ICircuitLayout; +import net.minecraft.item.ItemStack; public class CircuitRecipe { diff --git a/src/main/java/forestry/core/circuits/CircuitRegistry.java b/src/main/java/forestry/core/circuits/CircuitRegistry.java index 75b86b87f..a2633945b 100755 --- a/src/main/java/forestry/core/circuits/CircuitRegistry.java +++ b/src/main/java/forestry/core/circuits/CircuitRegistry.java @@ -13,10 +13,6 @@ package forestry.core.circuits; import java.util.LinkedHashMap; import java.util.Map; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - import forestry.api.circuits.CircuitSocketType; import forestry.api.circuits.ICircuit; import forestry.api.circuits.ICircuitBoard; @@ -24,6 +20,9 @@ import forestry.api.circuits.ICircuitLayout; import forestry.api.circuits.ICircuitLibrary; import forestry.api.circuits.ICircuitRegistry; import forestry.core.PluginCore; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; public class CircuitRegistry implements ICircuitRegistry { diff --git a/src/main/java/forestry/core/circuits/ContainerSolderingIron.java b/src/main/java/forestry/core/circuits/ContainerSolderingIron.java index 40807b65c..7577cfb27 100755 --- a/src/main/java/forestry/core/circuits/ContainerSolderingIron.java +++ b/src/main/java/forestry/core/circuits/ContainerSolderingIron.java @@ -10,9 +10,6 @@ ******************************************************************************/ package forestry.core.circuits; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; - import forestry.api.circuits.ICircuitLayout; import forestry.core.gui.ContainerItemInventory; import forestry.core.gui.IGuiSelectable; @@ -24,6 +21,8 @@ import forestry.core.network.IForestryPacketServer; import forestry.core.network.packets.PacketGuiLayoutSelect; import forestry.core.network.packets.PacketGuiSelectRequest; import forestry.core.proxy.Proxies; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; public class ContainerSolderingIron extends ContainerItemInventory implements IGuiSelectable { diff --git a/src/main/java/forestry/core/circuits/EnumCircuitBoardType.java b/src/main/java/forestry/core/circuits/EnumCircuitBoardType.java index 8bc802981..fd0a6171a 100755 --- a/src/main/java/forestry/core/circuits/EnumCircuitBoardType.java +++ b/src/main/java/forestry/core/circuits/EnumCircuitBoardType.java @@ -32,11 +32,11 @@ public enum EnumCircuitBoardType { @SideOnly(Side.CLIENT) public int getPrimaryColor() { - return ColourProperties.INSTANCE.get("item.circuit." + name().toLowerCase() + ".primary"); + return ColourProperties.INSTANCE.get("item.circuit." + name().toLowerCase() + ".primary"); } @SideOnly(Side.CLIENT) public int getSecondaryColor() { - return ColourProperties.INSTANCE.get("item.circuit." + name().toLowerCase() + ".secondary"); + return ColourProperties.INSTANCE.get("item.circuit." + name().toLowerCase() + ".secondary"); } } diff --git a/src/main/java/forestry/core/circuits/GuiSolderingIron.java b/src/main/java/forestry/core/circuits/GuiSolderingIron.java index 7acdd839e..0f78853ec 100755 --- a/src/main/java/forestry/core/circuits/GuiSolderingIron.java +++ b/src/main/java/forestry/core/circuits/GuiSolderingIron.java @@ -13,10 +13,6 @@ package forestry.core.circuits; import java.io.IOException; import java.util.Locale; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - import forestry.api.circuits.CircuitSocketType; import forestry.api.circuits.ICircuitLayout; import forestry.api.circuits.ICircuitSocketType; @@ -26,6 +22,9 @@ import forestry.core.gui.GuiForestry; import forestry.core.inventory.ItemInventorySolderingIron; import forestry.core.render.ColourProperties; import forestry.core.utils.Translator; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class GuiSolderingIron extends GuiForestry { diff --git a/src/main/java/forestry/core/circuits/ISocketable.java b/src/main/java/forestry/core/circuits/ISocketable.java index 714f07c6f..7aeb444cc 100644 --- a/src/main/java/forestry/core/circuits/ISocketable.java +++ b/src/main/java/forestry/core/circuits/ISocketable.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.circuits; -import net.minecraft.item.ItemStack; - import forestry.api.circuits.ICircuitSocketType; +import net.minecraft.item.ItemStack; public interface ISocketable { int getSocketCount(); diff --git a/src/main/java/forestry/core/circuits/ItemCircuitBoard.java b/src/main/java/forestry/core/circuits/ItemCircuitBoard.java index c6ee0e866..ce7fd717f 100755 --- a/src/main/java/forestry/core/circuits/ItemCircuitBoard.java +++ b/src/main/java/forestry/core/circuits/ItemCircuitBoard.java @@ -44,7 +44,7 @@ public class ItemCircuitBoard extends ItemForestry implements IColoredItem { subItems.add(createCircuitboard(EnumCircuitBoardType.REFINED, null, new ICircuit[]{})); subItems.add(createCircuitboard(EnumCircuitBoardType.INTRICATE, null, new ICircuit[]{})); } - + /* MODELS*/ @SideOnly(Side.CLIENT) @Override diff --git a/src/main/java/forestry/core/circuits/SolderManager.java b/src/main/java/forestry/core/circuits/SolderManager.java index ae6571aa2..5e9a4651b 100644 --- a/src/main/java/forestry/core/circuits/SolderManager.java +++ b/src/main/java/forestry/core/circuits/SolderManager.java @@ -14,11 +14,10 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import net.minecraft.item.ItemStack; - import forestry.api.circuits.ICircuit; import forestry.api.circuits.ICircuitLayout; import forestry.api.circuits.ISolderManager; +import net.minecraft.item.ItemStack; public class SolderManager implements ISolderManager { private static final List recipes = new ArrayList<>(); diff --git a/src/main/java/forestry/core/climate/BiomeClimateControl.java b/src/main/java/forestry/core/climate/BiomeClimateControl.java index e3bb7d21d..c97bc9564 100644 --- a/src/main/java/forestry/core/climate/BiomeClimateControl.java +++ b/src/main/java/forestry/core/climate/BiomeClimateControl.java @@ -9,20 +9,20 @@ import net.minecraft.world.biome.Biome; public class BiomeClimateControl extends DefaultClimateControl { private static final Map climateControls = new HashMap<>(); - - public static BiomeClimateControl getControl(Biome biome){ - if(!climateControls.containsKey(biome)){ + + public static BiomeClimateControl getControl(Biome biome) { + if (!climateControls.containsKey(biome)) { climateControls.put(biome, new BiomeClimateControl(biome)); } return climateControls.get(biome); } - + private final Biome biome; - + private BiomeClimateControl(Biome biome) { this.biome = biome; } - + @Override public float getControlTemperature() { return biome.getTemperature(); diff --git a/src/main/java/forestry/core/climate/ClimateSource.java b/src/main/java/forestry/core/climate/ClimateSource.java index d46f669a7..b8e78a17c 100644 --- a/src/main/java/forestry/core/climate/ClimateSource.java +++ b/src/main/java/forestry/core/climate/ClimateSource.java @@ -20,11 +20,11 @@ public abstract class ClimateSource

implements @Nullable protected P provider; protected final int ticksForChange; - + public ClimateSource(int ticksForChange) { this.ticksForChange = ticksForChange; } - + public void setProvider(P provider) { this.provider = provider; } diff --git a/src/main/java/forestry/core/climate/ClimatiserDefinition.java b/src/main/java/forestry/core/climate/ClimatiserDefinition.java index 63f2d559f..763cd646f 100644 --- a/src/main/java/forestry/core/climate/ClimatiserDefinition.java +++ b/src/main/java/forestry/core/climate/ClimatiserDefinition.java @@ -20,14 +20,14 @@ public class ClimatiserDefinition implements IClimatiserDefinition { protected final EnumClimatiserModes mode; protected final double range; protected final EnumClimatiserTypes type; - + public ClimatiserDefinition(float change, EnumClimatiserModes mode, double range, EnumClimatiserTypes type) { this.change = change; this.mode = mode; this.range = range; this.type = type; } - + @Override public float getChange() { return change; @@ -42,7 +42,7 @@ public class ClimatiserDefinition implements IClimatiserDefinition { public EnumClimatiserTypes getType() { return type; } - + @Override public EnumClimatiserModes getMode() { return mode; diff --git a/src/main/java/forestry/core/commands/CommandHelpers.java b/src/main/java/forestry/core/commands/CommandHelpers.java index a1777a013..791676761 100644 --- a/src/main/java/forestry/core/commands/CommandHelpers.java +++ b/src/main/java/forestry/core/commands/CommandHelpers.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import forestry.core.utils.Translator; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; @@ -26,8 +27,6 @@ import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.util.text.TextFormatting; -import forestry.core.utils.Translator; - /** * @author CovertJaguar */ @@ -46,7 +45,7 @@ public class CommandHelpers { /** * Avoid using this function if at all possible. Commands are processed on the server, * which has no localization information. - * + *

* StringUtil.localize() is NOT a valid alternative for sendLocalizedChatMessage(). * Messages will not be localized properly if you use StringUtil.localize(). */ diff --git a/src/main/java/forestry/core/commands/CommandModeInfo.java b/src/main/java/forestry/core/commands/CommandModeInfo.java index 1214b1e25..63516b969 100644 --- a/src/main/java/forestry/core/commands/CommandModeInfo.java +++ b/src/main/java/forestry/core/commands/CommandModeInfo.java @@ -13,8 +13,6 @@ package forestry.core.commands; import javax.annotation.Nullable; import java.util.List; -import org.apache.commons.lang3.StringUtils; - import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; @@ -22,6 +20,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.Style; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; +import org.apache.commons.lang3.StringUtils; public class CommandModeInfo extends SubCommand { private final String[] modeStringArr; diff --git a/src/main/java/forestry/core/commands/CommandPlugins.java b/src/main/java/forestry/core/commands/CommandPlugins.java index 9e953ee02..fd80dfd22 100644 --- a/src/main/java/forestry/core/commands/CommandPlugins.java +++ b/src/main/java/forestry/core/commands/CommandPlugins.java @@ -10,15 +10,14 @@ ******************************************************************************/ package forestry.core.commands; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextFormatting; - import forestry.core.utils.Translator; import forestry.plugins.ForestryPlugin; import forestry.plugins.IForestryPlugin; import forestry.plugins.PluginManager; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.text.TextFormatting; /** * @author CovertJaguar diff --git a/src/main/java/forestry/core/commands/CommandSaveStats.java b/src/main/java/forestry/core/commands/CommandSaveStats.java index a8c7414df..724039b98 100644 --- a/src/main/java/forestry/core/commands/CommandSaveStats.java +++ b/src/main/java/forestry/core/commands/CommandSaveStats.java @@ -22,14 +22,6 @@ import java.util.Collection; import java.util.Date; import java.util.List; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IBreedingTracker; @@ -38,6 +30,13 @@ import forestry.core.proxy.Proxies; import forestry.core.utils.Log; import forestry.core.utils.StringUtil; import forestry.core.utils.Translator; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public final class CommandSaveStats extends SubCommand { diff --git a/src/main/java/forestry/core/commands/IStatsSaveHelper.java b/src/main/java/forestry/core/commands/IStatsSaveHelper.java index 192b26b3c..f0314fb9c 100644 --- a/src/main/java/forestry/core/commands/IStatsSaveHelper.java +++ b/src/main/java/forestry/core/commands/IStatsSaveHelper.java @@ -12,12 +12,10 @@ package forestry.core.commands; import java.util.Collection; -import net.minecraft.world.World; - import com.mojang.authlib.GameProfile; - import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IBreedingTracker; +import net.minecraft.world.World; public interface IStatsSaveHelper { diff --git a/src/main/java/forestry/core/commands/RootCommand.java b/src/main/java/forestry/core/commands/RootCommand.java index 0e418e99b..17f646c58 100644 --- a/src/main/java/forestry/core/commands/RootCommand.java +++ b/src/main/java/forestry/core/commands/RootCommand.java @@ -16,14 +16,13 @@ import java.util.List; import java.util.SortedSet; import java.util.TreeSet; +import forestry.core.config.Constants; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos; -import forestry.core.config.Constants; - /** * @author CovertJaguar */ diff --git a/src/main/java/forestry/core/commands/SubCommand.java b/src/main/java/forestry/core/commands/SubCommand.java index 54b6fea4e..fd106ee27 100644 --- a/src/main/java/forestry/core/commands/SubCommand.java +++ b/src/main/java/forestry/core/commands/SubCommand.java @@ -19,7 +19,6 @@ import java.util.TreeSet; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; -import net.minecraft.command.WrongUsageException; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/forestry/core/commands/TemplateNotFoundException.java b/src/main/java/forestry/core/commands/TemplateNotFoundException.java index 92b66dc0a..b269cb834 100644 --- a/src/main/java/forestry/core/commands/TemplateNotFoundException.java +++ b/src/main/java/forestry/core/commands/TemplateNotFoundException.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.commands; -import net.minecraft.command.CommandException; - import forestry.api.genetics.IAlleleSpecies; +import net.minecraft.command.CommandException; public class TemplateNotFoundException extends CommandException { diff --git a/src/main/java/forestry/core/config/Config.java b/src/main/java/forestry/core/config/Config.java index ef03803e5..728359e6c 100755 --- a/src/main/java/forestry/core/config/Config.java +++ b/src/main/java/forestry/core/config/Config.java @@ -242,7 +242,7 @@ public class Config { private static void loadConfigFluids(File configFile) { configFluid = new LocalizedConfiguration(configFile, "1.0.0"); - + for (Fluids fluid : Fluids.values()) { String fluidName = Translator.translateToLocal("fluid." + fluid.getTag()); diff --git a/src/main/java/forestry/core/config/ForestryGuiConfig.java b/src/main/java/forestry/core/config/ForestryGuiConfig.java index 814862e02..2cea34f1e 100644 --- a/src/main/java/forestry/core/config/ForestryGuiConfig.java +++ b/src/main/java/forestry/core/config/ForestryGuiConfig.java @@ -15,7 +15,6 @@ import java.util.Arrays; import java.util.List; import net.minecraft.client.gui.GuiScreen; - import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.fml.client.config.GuiConfig; diff --git a/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java b/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java index 0b417f32e..d6f8ef336 100644 --- a/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java +++ b/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java @@ -14,7 +14,6 @@ import java.util.Set; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; - import net.minecraftforge.fml.client.IModGuiFactory; public class ForestryGuiConfigFactory implements IModGuiFactory { diff --git a/src/main/java/forestry/core/config/LocalizedConfiguration.java b/src/main/java/forestry/core/config/LocalizedConfiguration.java index 00a255f8e..f91185309 100644 --- a/src/main/java/forestry/core/config/LocalizedConfiguration.java +++ b/src/main/java/forestry/core/config/LocalizedConfiguration.java @@ -13,11 +13,10 @@ package forestry.core.config; import java.io.File; import java.util.Arrays; +import forestry.core.utils.Translator; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; -import forestry.core.utils.Translator; - public class LocalizedConfiguration extends Configuration { public LocalizedConfiguration(File file, String configVersion) { diff --git a/src/main/java/forestry/core/config/SessionVars.java b/src/main/java/forestry/core/config/SessionVars.java index c5fc599d5..1b5e3b9e2 100755 --- a/src/main/java/forestry/core/config/SessionVars.java +++ b/src/main/java/forestry/core/config/SessionVars.java @@ -15,7 +15,7 @@ import java.util.HashMap; import java.util.Map; public class SessionVars { - + private static final Map stringVars = new HashMap<>(); @Nullable @@ -29,7 +29,7 @@ public class SessionVars { public static Class getOpenedLedger() { return openedLedger; } - + public static void setStringVar(String ident, String val) { stringVars.put(ident, val); } @@ -38,7 +38,7 @@ public class SessionVars { public static String getStringVar(String ident) { return stringVars.get(ident); } - + public static void clearStringVar(String ident) { stringVars.remove(ident); } diff --git a/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java b/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java index 70e9ebc88..4825d1f35 100644 --- a/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java +++ b/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java @@ -10,6 +10,9 @@ ******************************************************************************/ package forestry.core.entities; +import forestry.core.inventory.IInventoryAdapter; +import forestry.core.tiles.IFilterSlotDelegate; +import forestry.core.utils.InventoryUtil; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; @@ -20,10 +23,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.text.ITextComponent; import net.minecraft.world.World; -import forestry.core.inventory.IInventoryAdapter; -import forestry.core.tiles.IFilterSlotDelegate; -import forestry.core.utils.InventoryUtil; - public abstract class EntityMinecartContainerForestry extends EntityMinecartForestry implements ISidedInventory, IFilterSlotDelegate { /** * When set to true, the minecart will drop all items when setDead() is called. When false (such as when travelling @@ -101,7 +100,7 @@ public abstract class EntityMinecartContainerForestry extends EntityMinecartFore public ItemStack decrStackSize(int slotIndex, int amount) { return getInternalInventory().decrStackSize(slotIndex, amount); } - + @Override public ItemStack removeStackFromSlot(int slotIndex) { return getInternalInventory().removeStackFromSlot(slotIndex); @@ -126,12 +125,12 @@ public abstract class EntityMinecartContainerForestry extends EntityMinecartFore public final void closeInventory(EntityPlayer player) { getInternalInventory().closeInventory(player); } - + @Override public ITextComponent getDisplayName() { return getInternalInventory().getDisplayName(); } - + @Override public boolean hasCustomName() { return false; @@ -151,7 +150,7 @@ public abstract class EntityMinecartContainerForestry extends EntityMinecartFore public boolean isLocked(int slotIndex) { return getInternalInventory().isLocked(slotIndex); } - + @Override public int[] getSlotsForFace(EnumFacing side) { return getInternalInventory().getSlotsForFace(side); diff --git a/src/main/java/forestry/core/entities/EntityMinecartForestry.java b/src/main/java/forestry/core/entities/EntityMinecartForestry.java index 2c353a820..801ed7d9c 100644 --- a/src/main/java/forestry/core/entities/EntityMinecartForestry.java +++ b/src/main/java/forestry/core/entities/EntityMinecartForestry.java @@ -61,7 +61,7 @@ public abstract class EntityMinecartForestry extends EntityMinecart implements I public boolean canBeRidden() { return false; } - + @Override public boolean isPoweredCart() { return false; @@ -101,7 +101,7 @@ public abstract class EntityMinecartForestry extends EntityMinecart implements I ItemStack cartItem = getCartItem(); return cartItem.getUnlocalizedName() + ".name"; } - + @Override public int getIdOfEntity() { return getEntityId(); diff --git a/src/main/java/forestry/core/entities/ParticleColoredDripParticle.java b/src/main/java/forestry/core/entities/ParticleColoredDripParticle.java index 9ed1dc91d..01ff58165 100644 --- a/src/main/java/forestry/core/entities/ParticleColoredDripParticle.java +++ b/src/main/java/forestry/core/entities/ParticleColoredDripParticle.java @@ -28,7 +28,7 @@ public class ParticleColoredDripParticle extends Particle { public ParticleColoredDripParticle(World world, double x, double y, double z, float red, float green, float blue) { super(world, x, y, z, 0.0D, 0.0D, 0.0D); this.motionX = this.motionY = this.motionZ = 0.0D; - + this.particleRed = red; this.particleGreen = green; this.particleBlue = blue; @@ -76,20 +76,20 @@ public class ParticleColoredDripParticle extends Particle { this.motionX *= 0.699999988079071D; this.motionZ *= 0.699999988079071D; } - + BlockPos blockpos = new BlockPos(this.posX, this.posY, this.posZ); IBlockState iblockstate = this.world.getBlockState(blockpos); Material material = iblockstate.getMaterial(); - + if (material.isLiquid() || material.isSolid()) { double d0 = 0.0D; - + if (iblockstate.getBlock() instanceof BlockLiquid) { d0 = BlockLiquid.getLiquidHeightPercent(iblockstate.getValue(BlockLiquid.LEVEL)); } - + double d1 = MathHelper.floor(this.posY) + 1 - d0; - + if (this.posY < d1) { this.setExpired(); } diff --git a/src/main/java/forestry/core/entities/ParticleIgnition.java b/src/main/java/forestry/core/entities/ParticleIgnition.java index f332a61ac..97ef80eb7 100644 --- a/src/main/java/forestry/core/entities/ParticleIgnition.java +++ b/src/main/java/forestry/core/entities/ParticleIgnition.java @@ -15,7 +15,6 @@ import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.entity.Entity; import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/forestry/core/entities/ParticleSmoke.java b/src/main/java/forestry/core/entities/ParticleSmoke.java index ffa2d1c46..26a2d9852 100644 --- a/src/main/java/forestry/core/entities/ParticleSmoke.java +++ b/src/main/java/forestry/core/entities/ParticleSmoke.java @@ -15,7 +15,6 @@ import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.entity.Entity; import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/forestry/core/errors/ErrorLogic.java b/src/main/java/forestry/core/errors/ErrorLogic.java index b06595358..366a080c0 100644 --- a/src/main/java/forestry/core/errors/ErrorLogic.java +++ b/src/main/java/forestry/core/errors/ErrorLogic.java @@ -10,12 +10,10 @@ ******************************************************************************/ package forestry.core.errors; -import com.google.common.collect.ImmutableSet; - -import java.io.IOException; import java.util.HashSet; import java.util.Set; +import com.google.common.collect.ImmutableSet; import forestry.api.core.ForestryAPI; import forestry.api.core.IErrorLogic; import forestry.api.core.IErrorState; diff --git a/src/main/java/forestry/core/errors/ErrorStateRegistry.java b/src/main/java/forestry/core/errors/ErrorStateRegistry.java index aaaae4a13..ec59f3b75 100644 --- a/src/main/java/forestry/core/errors/ErrorStateRegistry.java +++ b/src/main/java/forestry/core/errors/ErrorStateRegistry.java @@ -10,23 +10,20 @@ ******************************************************************************/ package forestry.core.errors; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; - import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; import forestry.api.core.IErrorLogic; import forestry.api.core.IErrorState; import forestry.api.core.IErrorStateRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; /** - * * @author CovertJaguar */ public class ErrorStateRegistry implements IErrorStateRegistry { diff --git a/src/main/java/forestry/core/errors/FakeErrorLogic.java b/src/main/java/forestry/core/errors/FakeErrorLogic.java index 86b72060d..5e5997ce3 100644 --- a/src/main/java/forestry/core/errors/FakeErrorLogic.java +++ b/src/main/java/forestry/core/errors/FakeErrorLogic.java @@ -11,9 +11,6 @@ package forestry.core.errors; import com.google.common.collect.ImmutableSet; - -import java.io.IOException; - import forestry.api.core.IErrorLogic; import forestry.api.core.IErrorState; import net.minecraft.network.PacketBuffer; diff --git a/src/main/java/forestry/core/errors/FakeErrorSource.java b/src/main/java/forestry/core/errors/FakeErrorSource.java index 4952014d1..de8953378 100644 --- a/src/main/java/forestry/core/errors/FakeErrorSource.java +++ b/src/main/java/forestry/core/errors/FakeErrorSource.java @@ -11,7 +11,6 @@ package forestry.core.errors; import com.google.common.collect.ImmutableSet; - import forestry.api.core.IErrorSource; import forestry.api.core.IErrorState; diff --git a/src/main/java/forestry/core/fluids/BlockForestryFluid.java b/src/main/java/forestry/core/fluids/BlockForestryFluid.java index fb697d8bd..b23326d80 100644 --- a/src/main/java/forestry/core/fluids/BlockForestryFluid.java +++ b/src/main/java/forestry/core/fluids/BlockForestryFluid.java @@ -14,6 +14,9 @@ import javax.annotation.Nullable; import java.awt.Color; import java.util.Random; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; +import forestry.core.entities.ParticleColoredDripParticle; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; @@ -29,7 +32,6 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; @@ -37,10 +39,6 @@ import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.core.entities.ParticleColoredDripParticle; - public class BlockForestryFluid extends BlockFluidClassic implements IItemModelRegister { private final boolean flammable; @@ -120,7 +118,7 @@ public class BlockForestryFluid extends BlockFluidClassic implements IItemModelR double px = d0 + rand.nextFloat(); double py = d1 - 1.05D; double pz = d2 + rand.nextFloat(); - + Particle fx = new ParticleColoredDripParticle(worldIn, px, py, pz, color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f); FMLClientHandler.instance().getClient().effectRenderer.addEffect(fx); } @@ -133,7 +131,7 @@ public class BlockForestryFluid extends BlockFluidClassic implements IItemModelR return !blockState.getMaterial().isLiquid() && super.canDisplace(world, pos); } - + @Override public boolean displaceIfPossible(World world, BlockPos pos) { IBlockState blockState = world.getBlockState(pos); @@ -181,17 +179,17 @@ public class BlockForestryFluid extends BlockFluidClassic implements IItemModelR return super.getMaterial(state); } } - + @SideOnly(Side.CLIENT) @Override public void registerModel(Item item, IModelManager manager) { - + } @Override public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { super.updateTick(world, pos, state, rand); - + int x = pos.getX(); int y = pos.getY(); int z = pos.getZ(); diff --git a/src/main/java/forestry/core/fluids/FakeTankManager.java b/src/main/java/forestry/core/fluids/FakeTankManager.java index 0e0da346b..b6c776510 100644 --- a/src/main/java/forestry/core/fluids/FakeTankManager.java +++ b/src/main/java/forestry/core/fluids/FakeTankManager.java @@ -15,7 +15,6 @@ import java.util.List; import net.minecraft.inventory.Container; import net.minecraft.inventory.IContainerListener; - import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.fluids.capability.templates.EmptyFluidHandler; diff --git a/src/main/java/forestry/core/fluids/FilteredTank.java b/src/main/java/forestry/core/fluids/FilteredTank.java index 0cb63ebc0..3a072a052 100644 --- a/src/main/java/forestry/core/fluids/FilteredTank.java +++ b/src/main/java/forestry/core/fluids/FilteredTank.java @@ -15,16 +15,14 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; +import forestry.core.proxy.Proxies; +import forestry.core.utils.Translator; import net.minecraft.item.EnumRarity; import net.minecraft.util.text.TextFormatting; - import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import forestry.core.proxy.Proxies; -import forestry.core.utils.Translator; - /** * @author CovertJaguar */ diff --git a/src/main/java/forestry/core/fluids/ITankManager.java b/src/main/java/forestry/core/fluids/ITankManager.java index 233037c87..af9465b7a 100644 --- a/src/main/java/forestry/core/fluids/ITankManager.java +++ b/src/main/java/forestry/core/fluids/ITankManager.java @@ -15,7 +15,6 @@ import java.util.List; import net.minecraft.inventory.Container; import net.minecraft.inventory.IContainerListener; - import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.fluids.capability.IFluidHandler; diff --git a/src/main/java/forestry/core/genetics/EffectData.java b/src/main/java/forestry/core/genetics/EffectData.java index b6c0e02cb..9bc4f2882 100755 --- a/src/main/java/forestry/core/genetics/EffectData.java +++ b/src/main/java/forestry/core/genetics/EffectData.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.genetics; -import net.minecraft.nbt.NBTTagCompound; - import forestry.api.genetics.IEffectData; +import net.minecraft.nbt.NBTTagCompound; public class EffectData implements IEffectData { diff --git a/src/main/java/forestry/core/genetics/GenericRatings.java b/src/main/java/forestry/core/genetics/GenericRatings.java index fceae5c18..0a0d32352 100755 --- a/src/main/java/forestry/core/genetics/GenericRatings.java +++ b/src/main/java/forestry/core/genetics/GenericRatings.java @@ -38,7 +38,7 @@ public class GenericRatings { if (neverSleeps) { active = StringUtil.append(", ", active, naturalNocturnal ? Translator.translateToLocal("for.gui.diurnal") : Translator.translateToLocal("for.gui.nocturnal")); } - + return active; } } diff --git a/src/main/java/forestry/core/genetics/ItemGE.java b/src/main/java/forestry/core/genetics/ItemGE.java index f881e201e..5c52cd980 100755 --- a/src/main/java/forestry/core/genetics/ItemGE.java +++ b/src/main/java/forestry/core/genetics/ItemGE.java @@ -12,16 +12,15 @@ package forestry.core.genetics; import java.util.List; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.text.TextFormatting; - import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IIndividual; import forestry.core.items.ItemForestry; import forestry.core.proxy.Proxies; import forestry.core.utils.Translator; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.TextFormatting; public abstract class ItemGE extends ItemForestry { protected ItemGE(CreativeTabs creativeTab) { @@ -47,7 +46,7 @@ public abstract class ItemGE extends ItemForestry { public boolean getShareTag() { return true; } - + @Override public boolean hasEffect(ItemStack stack) { IAlleleSpecies species = getSpecies(stack); diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleArea.java b/src/main/java/forestry/core/genetics/alleles/AlleleArea.java index 9b22aa989..5ff24351f 100644 --- a/src/main/java/forestry/core/genetics/alleles/AlleleArea.java +++ b/src/main/java/forestry/core/genetics/alleles/AlleleArea.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.genetics.alleles; -import net.minecraft.util.math.Vec3i; - import forestry.api.genetics.IAlleleArea; +import net.minecraft.util.math.Vec3i; public class AlleleArea extends AlleleCategorized implements IAlleleArea { @@ -22,7 +21,7 @@ public class AlleleArea extends AlleleCategorized implements IAlleleArea { super(modId, category, name, isDominant); this.area = value; } - + @Override public Vec3i getValue() { return area; diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java b/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java index 74ad37831..736b01647 100644 --- a/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java +++ b/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java @@ -1,13 +1,12 @@ package forestry.core.genetics.alleles; -import org.apache.commons.lang3.text.WordUtils; - import forestry.core.utils.Translator; +import org.apache.commons.lang3.text.WordUtils; /** * Alleles that have a category with several values inherit from this class. * For example, temperature tolerances or speeds are categories with several values. - * + *

* This class helps localization by allowing specific names like * forestry.allele.speed.fast * and can fall back on generic names like diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java b/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java index fb7d1cb47..f53200fcf 100644 --- a/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java +++ b/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.core.genetics.alleles; -import net.minecraft.util.math.Vec3i; - import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAlleleArea; import forestry.api.genetics.IAlleleBoolean; @@ -22,6 +20,7 @@ import forestry.api.genetics.IAlleleInteger; import forestry.api.genetics.IChromosomeType; import forestry.api.genetics.IFlowerProvider; import forestry.apiculture.genetics.alleles.AlleleFlowers; +import net.minecraft.util.math.Vec3i; public class AlleleFactory implements IAlleleFactory { diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java b/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java index 448abb6e3..2041b9627 100644 --- a/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java +++ b/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java @@ -17,8 +17,6 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; -import net.minecraft.util.math.Vec3i; - import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.arboriculture.EnumTreeChromosome; import forestry.api.core.ForestryAPI; @@ -33,6 +31,7 @@ import forestry.api.lepidopterology.EnumButterflyChromosome; import forestry.apiculture.flowers.FlowerProvider; import forestry.core.config.Constants; import forestry.plugins.ForestryPluginUids; +import net.minecraft.util.math.Vec3i; public class AlleleHelper implements IAlleleHelper { diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java b/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java index 41d82e916..0c3734472 100644 --- a/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java +++ b/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java @@ -11,9 +11,6 @@ package forestry.core.genetics.alleles; import javax.annotation.Nullable; - -import com.google.common.collect.HashMultimap; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -22,10 +19,8 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; -import net.minecraft.item.ItemStack; - +import com.google.common.collect.HashMultimap; import com.mojang.authlib.GameProfile; - import forestry.api.genetics.IAllele; import forestry.api.genetics.IAlleleHandler; import forestry.api.genetics.IAlleleRegistry; @@ -40,6 +35,7 @@ import forestry.api.genetics.ISpeciesRoot; import forestry.core.PluginCore; import forestry.core.genetics.Classification; import forestry.core.genetics.ItemResearchNote.EnumNoteType; +import net.minecraft.item.ItemStack; public class AlleleRegistry implements IAlleleRegistry { diff --git a/src/main/java/forestry/core/genetics/alleles/EnumAllele.java b/src/main/java/forestry/core/genetics/alleles/EnumAllele.java index ce7699e8f..1e9c46d12 100644 --- a/src/main/java/forestry/core/genetics/alleles/EnumAllele.java +++ b/src/main/java/forestry/core/genetics/alleles/EnumAllele.java @@ -2,11 +2,10 @@ package forestry.core.genetics.alleles; import java.util.Locale; -import net.minecraft.util.math.Vec3i; - import forestry.api.apiculture.FlowerManager; import forestry.api.genetics.EnumTolerance; import forestry.apiculture.flowers.FlowerProvider; +import net.minecraft.util.math.Vec3i; public class EnumAllele { public enum Fertility implements IAlleleValue { diff --git a/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java b/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java index 4ab285610..8e02349cb 100644 --- a/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java +++ b/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java @@ -14,11 +14,11 @@ public enum EnumMutateChance { NONE(0xffffff), LOWEST(0xffba77), LOW(0xfffd77), NORMAL(0xfffd77), HIGH(0xfffd77), HIGHER(0xbeff77), HIGHEST(0x7bff77); public final int colour; - + EnumMutateChance(int colour) { this.colour = colour; } - + public static EnumMutateChance rateChance(float percent) { if (percent >= 20) { diff --git a/src/main/java/forestry/core/genetics/mutations/Mutation.java b/src/main/java/forestry/core/genetics/mutations/Mutation.java index 4a83b042a..1b767d606 100644 --- a/src/main/java/forestry/core/genetics/mutations/Mutation.java +++ b/src/main/java/forestry/core/genetics/mutations/Mutation.java @@ -14,11 +14,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import net.minecraftforge.common.BiomeDictionary; import forestry.api.climate.IClimateProvider; import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; @@ -28,6 +23,10 @@ import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutation; import forestry.api.genetics.IMutationBuilder; import forestry.api.genetics.IMutationCondition; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.BiomeDictionary; public abstract class Mutation implements IMutation, IMutationBuilder { diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java index 8f5a4be4b..9b7fe6bd7 100644 --- a/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java +++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java @@ -14,16 +14,15 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; - -import net.minecraftforge.common.BiomeDictionary; import forestry.api.climate.IClimateProvider; import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutationCondition; import forestry.core.utils.Translator; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraftforge.common.BiomeDictionary; public class MutationConditionBiome implements IMutationCondition { diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java index 6b9fd3ffa..65dba602f 100644 --- a/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java +++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java @@ -10,13 +10,13 @@ ******************************************************************************/ package forestry.core.genetics.mutations; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.climate.IClimateProvider; import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutationCondition; import forestry.core.utils.Translator; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class MutationConditionDaytime implements IMutationCondition { diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java index 6837e5e05..a87be38c3 100644 --- a/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java +++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.core.genetics.mutations; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.climate.IClimateProvider; import forestry.api.core.EnumHumidity; import forestry.api.genetics.AlleleManager; @@ -19,6 +17,8 @@ import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutationCondition; import forestry.core.utils.Translator; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class MutationConditionHumidity implements IMutationCondition { private final EnumHumidity minHumidity; diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java index 0fbad9cb7..b2f0528b8 100644 --- a/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java +++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java @@ -12,14 +12,14 @@ package forestry.core.genetics.mutations; import java.util.Calendar; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; import forestry.api.climate.IClimateProvider; import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutationCondition; import forestry.core.utils.DayMonth; import forestry.core.utils.Translator; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class MutationConditionTimeLimited implements IMutationCondition { diff --git a/src/main/java/forestry/core/gui/ContainerAlyzer.java b/src/main/java/forestry/core/gui/ContainerAlyzer.java index 5abd5dcfe..8a3195810 100644 --- a/src/main/java/forestry/core/gui/ContainerAlyzer.java +++ b/src/main/java/forestry/core/gui/ContainerAlyzer.java @@ -1,9 +1,8 @@ package forestry.core.gui; -import net.minecraft.entity.player.EntityPlayer; - import forestry.core.gui.slots.SlotFiltered; import forestry.core.inventory.ItemInventoryAlyzer; +import net.minecraft.entity.player.EntityPlayer; public class ContainerAlyzer extends ContainerItemInventory { diff --git a/src/main/java/forestry/core/gui/ContainerAnalyzer.java b/src/main/java/forestry/core/gui/ContainerAnalyzer.java index 8fc01ecd1..d200e48ee 100755 --- a/src/main/java/forestry/core/gui/ContainerAnalyzer.java +++ b/src/main/java/forestry/core/gui/ContainerAnalyzer.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.core.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotLiquidIn; import forestry.core.gui.slots.SlotOutput; import forestry.core.gui.slots.SlotWorking; import forestry.core.inventory.InventoryAnalyzer; import forestry.core.tiles.TileAnalyzer; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerAnalyzer extends ContainerLiquidTanks { diff --git a/src/main/java/forestry/core/gui/ContainerEscritoire.java b/src/main/java/forestry/core/gui/ContainerEscritoire.java index a428ec706..aa2660b82 100755 --- a/src/main/java/forestry/core/gui/ContainerEscritoire.java +++ b/src/main/java/forestry/core/gui/ContainerEscritoire.java @@ -10,15 +10,14 @@ ******************************************************************************/ package forestry.core.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; - import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotOutput; import forestry.core.inventory.InventoryEscritoire; import forestry.core.network.packets.PacketGuiUpdate; import forestry.core.tiles.EscritoireGame; import forestry.core.tiles.TileEscritoire; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; public class ContainerEscritoire extends ContainerTile implements IGuiSelectable { private long lastUpdate; diff --git a/src/main/java/forestry/core/gui/ContainerItemInventory.java b/src/main/java/forestry/core/gui/ContainerItemInventory.java index 6e4639b55..3ab811d98 100755 --- a/src/main/java/forestry/core/gui/ContainerItemInventory.java +++ b/src/main/java/forestry/core/gui/ContainerItemInventory.java @@ -10,15 +10,14 @@ ******************************************************************************/ package forestry.core.gui; +import forestry.core.gui.slots.SlotLocked; +import forestry.core.inventory.ItemInventory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ClickType; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import forestry.core.gui.slots.SlotLocked; -import forestry.core.inventory.ItemInventory; - public abstract class ContainerItemInventory extends ContainerForestry { protected final I inventory; @@ -53,12 +52,12 @@ public abstract class ContainerItemInventory extends Co @Override public ItemStack slotClick(int slotId, int dragType_or_button, ClickType clickTypeIn, EntityPlayer player) { ItemStack result = super.slotClick(slotId, dragType_or_button, clickTypeIn, player); - if(slotId > 0){ + if (slotId > 0) { inventory.onSlotClick(inventorySlots.get(slotId).getSlotIndex(), player); } return result; } - + public I getItemInventory() { return inventory; } diff --git a/src/main/java/forestry/core/gui/ContainerLiquidTanks.java b/src/main/java/forestry/core/gui/ContainerLiquidTanks.java index c8a3bcb7d..9806fe828 100755 --- a/src/main/java/forestry/core/gui/ContainerLiquidTanks.java +++ b/src/main/java/forestry/core/gui/ContainerLiquidTanks.java @@ -10,16 +10,14 @@ ******************************************************************************/ package forestry.core.gui; +import forestry.core.tiles.ILiquidTankTile; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IContainerListener; import net.minecraft.tileentity.TileEntity; - import net.minecraftforge.fluids.IFluidTank; -import forestry.core.tiles.ILiquidTankTile; - public abstract class ContainerLiquidTanks extends ContainerTile implements IContainerLiquidTanks { private final ContainerLiquidTanksHelper helper; @@ -44,7 +42,7 @@ public abstract class ContainerLiquidTanks implements IContainerLiquidTanks { diff --git a/src/main/java/forestry/core/gui/ContainerLiquidTanksSocketed.java b/src/main/java/forestry/core/gui/ContainerLiquidTanksSocketed.java index efc8a4b02..f9585720b 100644 --- a/src/main/java/forestry/core/gui/ContainerLiquidTanksSocketed.java +++ b/src/main/java/forestry/core/gui/ContainerLiquidTanksSocketed.java @@ -10,18 +10,16 @@ ******************************************************************************/ package forestry.core.gui; +import forestry.core.circuits.ISocketable; +import forestry.core.tiles.ILiquidTankTile; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IContainerListener; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; - import net.minecraftforge.fluids.IFluidTank; -import forestry.core.circuits.ISocketable; -import forestry.core.tiles.ILiquidTankTile; - public abstract class ContainerLiquidTanksSocketed extends ContainerTile implements IContainerSocketed, IContainerLiquidTanks { private final ContainerSocketedHelper socketedHelper; @@ -49,7 +47,7 @@ public abstract class ContainerLiquidTanksSocketed extends ContainerTile implements IContainerSocketed { private final ContainerSocketedHelper helper; diff --git a/src/main/java/forestry/core/gui/ContainerSocketedHelper.java b/src/main/java/forestry/core/gui/ContainerSocketedHelper.java index 715aae94a..b5bfc5e6f 100644 --- a/src/main/java/forestry/core/gui/ContainerSocketedHelper.java +++ b/src/main/java/forestry/core/gui/ContainerSocketedHelper.java @@ -10,10 +10,6 @@ ******************************************************************************/ package forestry.core.gui; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - import forestry.api.circuits.ChipsetManager; import forestry.api.circuits.ICircuitBoard; import forestry.core.circuits.ISocketable; @@ -22,6 +18,9 @@ import forestry.core.network.packets.PacketSocketUpdate; import forestry.core.network.packets.PacketSolderingIronClick; import forestry.core.proxy.Proxies; import forestry.core.utils.InventoryUtil; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; public class ContainerSocketedHelper implements IContainerSocketed { diff --git a/src/main/java/forestry/core/gui/GuiAnalyzer.java b/src/main/java/forestry/core/gui/GuiAnalyzer.java index 675c22b46..cb3a9e341 100755 --- a/src/main/java/forestry/core/gui/GuiAnalyzer.java +++ b/src/main/java/forestry/core/gui/GuiAnalyzer.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.core.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.widgets.TankWidget; import forestry.core.render.EnumTankLevel; import forestry.core.tiles.TileAnalyzer; +import net.minecraft.entity.player.InventoryPlayer; public class GuiAnalyzer extends GuiForestryTitled { diff --git a/src/main/java/forestry/core/gui/GuiCamouflageSprayCan.java b/src/main/java/forestry/core/gui/GuiCamouflageSprayCan.java index a8cef7122..a878c90d6 100644 --- a/src/main/java/forestry/core/gui/GuiCamouflageSprayCan.java +++ b/src/main/java/forestry/core/gui/GuiCamouflageSprayCan.java @@ -11,10 +11,10 @@ public class GuiCamouflageSprayCan extends GuiForestry { private final ItemStack LEVEL_ITEM = new ItemStack(Items.PAPER); diff --git a/src/main/java/forestry/core/gui/GuiForestryTitled.java b/src/main/java/forestry/core/gui/GuiForestryTitled.java index 53cf3551c..994bd4e2f 100644 --- a/src/main/java/forestry/core/gui/GuiForestryTitled.java +++ b/src/main/java/forestry/core/gui/GuiForestryTitled.java @@ -10,11 +10,11 @@ ******************************************************************************/ package forestry.core.gui; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; import forestry.core.render.ColourProperties; import forestry.core.tiles.ITitled; import forestry.core.utils.Translator; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; public abstract class GuiForestryTitled extends GuiForestry { diff --git a/src/main/java/forestry/core/gui/GuiUtil.java b/src/main/java/forestry/core/gui/GuiUtil.java index ae4811af0..86ef38873 100644 --- a/src/main/java/forestry/core/gui/GuiUtil.java +++ b/src/main/java/forestry/core/gui/GuiUtil.java @@ -13,18 +13,16 @@ package forestry.core.gui; import java.util.Collection; import java.util.List; +import forestry.core.gui.tooltips.IToolTipProvider; +import forestry.core.gui.tooltips.ToolTip; +import forestry.core.proxy.Proxies; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderItem; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.client.config.GuiUtils; -import forestry.core.gui.tooltips.IToolTipProvider; -import forestry.core.gui.tooltips.ToolTip; -import forestry.core.proxy.Proxies; - public class GuiUtil { public static void drawItemStack(GuiForestry gui, ItemStack stack, int xPos, int yPos) { FontRenderer font = null; diff --git a/src/main/java/forestry/core/gui/IContainerLiquidTanks.java b/src/main/java/forestry/core/gui/IContainerLiquidTanks.java index 87e6749cc..90c84e5d2 100644 --- a/src/main/java/forestry/core/gui/IContainerLiquidTanks.java +++ b/src/main/java/forestry/core/gui/IContainerLiquidTanks.java @@ -12,7 +12,6 @@ package forestry.core.gui; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; - import net.minecraftforge.fluids.IFluidTank; public interface IContainerLiquidTanks { diff --git a/src/main/java/forestry/core/gui/IGuiHandlerTile.java b/src/main/java/forestry/core/gui/IGuiHandlerTile.java index 2381fd4d9..a79819d5b 100644 --- a/src/main/java/forestry/core/gui/IGuiHandlerTile.java +++ b/src/main/java/forestry/core/gui/IGuiHandlerTile.java @@ -13,7 +13,6 @@ package forestry.core.gui; import javax.annotation.Nullable; import forestry.api.core.ILocatable; - import net.minecraft.entity.player.EntityPlayer; public interface IGuiHandlerTile extends IGuiHandlerForestry, ILocatable { diff --git a/src/main/java/forestry/core/gui/TextLayoutHelper.java b/src/main/java/forestry/core/gui/TextLayoutHelper.java index c96db30d3..2e490e7bd 100644 --- a/src/main/java/forestry/core/gui/TextLayoutHelper.java +++ b/src/main/java/forestry/core/gui/TextLayoutHelper.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.gui; -import net.minecraft.client.renderer.GlStateManager; - import forestry.core.render.ColourProperties; +import net.minecraft.client.renderer.GlStateManager; public class TextLayoutHelper { private static final int LINE_HEIGHT = 12; @@ -29,12 +28,12 @@ public class TextLayoutHelper { this.guiForestry = guiForestry; this.defaultFontColor = fontColour.get("gui.screen"); } - + public void startPage() { line = LINE_HEIGHT; GlStateManager.pushMatrix(); } - + public void startPage(int column0, int column1, int column2) { this.column0 = column0; @@ -43,37 +42,37 @@ public class TextLayoutHelper { startPage(); } - + public int getLineY() { return line; } - + public void newLine() { line += LINE_HEIGHT; } - + public void newLineCompressed() { line += LINE_HEIGHT - 2; } - + public void newLine(int lineHeight) { line += lineHeight; } - + public void endPage() { GlStateManager.popMatrix(); } - + public void drawRow(String text0, String text1, String text2, int colour0, int colour1, int colour2) { drawLine(text0, column0, colour0); drawLine(text1, column1, colour1); drawLine(text2, column2, colour2); } - + public void drawLine(String text, int x) { drawLine(text, x, defaultFontColor); } - + public void drawSplitLine(String text, int x, int maxWidth) { drawSplitLine(text, x, maxWidth, defaultFontColor); } diff --git a/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java b/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java index 7e0a84a0e..676d4c8e9 100755 --- a/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java +++ b/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java @@ -12,20 +12,18 @@ package forestry.core.gui.buttons; import javax.annotation.Nullable; +import forestry.core.config.Constants; +import forestry.core.gui.tooltips.IToolTipProvider; +import forestry.core.gui.tooltips.ToolTip; +import forestry.core.render.ForestryResource; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.core.config.Constants; -import forestry.core.gui.tooltips.IToolTipProvider; -import forestry.core.gui.tooltips.ToolTip; -import forestry.core.render.ForestryResource; - @SideOnly(Side.CLIENT) public class GuiBetterButton extends GuiButton implements IToolTipProvider { diff --git a/src/main/java/forestry/core/gui/ledgers/HintLedger.java b/src/main/java/forestry/core/gui/ledgers/HintLedger.java index 85dc2fbb5..2b6c7c9db 100644 --- a/src/main/java/forestry/core/gui/ledgers/HintLedger.java +++ b/src/main/java/forestry/core/gui/ledgers/HintLedger.java @@ -13,13 +13,12 @@ package forestry.core.gui.ledgers; import java.util.List; import java.util.Random; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; - import forestry.core.gui.IHintSource; import forestry.core.proxy.Proxies; import forestry.core.render.TextureManager; import forestry.core.utils.Translator; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; public class HintLedger extends Ledger { diff --git a/src/main/java/forestry/core/gui/ledgers/Ledger.java b/src/main/java/forestry/core/gui/ledgers/Ledger.java index 03a83ebfa..ae0ac3fac 100644 --- a/src/main/java/forestry/core/gui/ledgers/Ledger.java +++ b/src/main/java/forestry/core/gui/ledgers/Ledger.java @@ -38,7 +38,7 @@ public abstract class Ledger { private static final ResourceLocation ledgerTextureRight = new ForestryResource(Constants.TEXTURE_PATH_GUI + "/ledger.png"); private static final ResourceLocation ledgerTextureLeft = new ForestryResource(Constants.TEXTURE_PATH_GUI + "/ledgerLeft.png"); - + private final LedgerManager manager; private final int fontColorHeader; diff --git a/src/main/java/forestry/core/gui/slots/SlotCraftMatrix.java b/src/main/java/forestry/core/gui/slots/SlotCraftMatrix.java index 372efca03..f11deac3d 100644 --- a/src/main/java/forestry/core/gui/slots/SlotCraftMatrix.java +++ b/src/main/java/forestry/core/gui/slots/SlotCraftMatrix.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.gui.slots; -import net.minecraft.inventory.IInventory; - import forestry.core.gui.IContainerCrafting; +import net.minecraft.inventory.IInventory; /** * Informs the passed container of slot changes. Contains a dummy itemstack. diff --git a/src/main/java/forestry/core/gui/slots/SlotEmptyLiquidContainerIn.java b/src/main/java/forestry/core/gui/slots/SlotEmptyLiquidContainerIn.java index 9071a93a4..36c8080cf 100644 --- a/src/main/java/forestry/core/gui/slots/SlotEmptyLiquidContainerIn.java +++ b/src/main/java/forestry/core/gui/slots/SlotEmptyLiquidContainerIn.java @@ -1,8 +1,7 @@ package forestry.core.gui.slots; -import net.minecraft.inventory.IInventory; - import forestry.core.tiles.IFilterSlotDelegate; +import net.minecraft.inventory.IInventory; public class SlotEmptyLiquidContainerIn extends SlotFiltered { public SlotEmptyLiquidContainerIn(T inventory, int slotIndex, int xPos, int yPos) { diff --git a/src/main/java/forestry/core/gui/slots/SlotFiltered.java b/src/main/java/forestry/core/gui/slots/SlotFiltered.java index 2daf45a91..1d03e8639 100644 --- a/src/main/java/forestry/core/gui/slots/SlotFiltered.java +++ b/src/main/java/forestry/core/gui/slots/SlotFiltered.java @@ -12,16 +12,14 @@ package forestry.core.gui.slots; import javax.annotation.Nullable; +import forestry.core.render.TextureManager; +import forestry.core.tiles.IFilterSlotDelegate; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.core.render.TextureManager; -import forestry.core.tiles.IFilterSlotDelegate; - /** * Slot which only takes specific items, specified by the IFilterSlotDelegate. */ diff --git a/src/main/java/forestry/core/gui/slots/SlotFilteredInventory.java b/src/main/java/forestry/core/gui/slots/SlotFilteredInventory.java index 6b01c45ed..9a15dd671 100644 --- a/src/main/java/forestry/core/gui/slots/SlotFilteredInventory.java +++ b/src/main/java/forestry/core/gui/slots/SlotFilteredInventory.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.gui.slots; -import net.minecraft.inventory.IInventory; - import forestry.core.tiles.IFilterSlotDelegate; +import net.minecraft.inventory.IInventory; /** * Useful for InventoryTweaks. Works like SlotFiltered but allows InventoryTweaks to sort it. diff --git a/src/main/java/forestry/core/gui/slots/SlotLiquidIn.java b/src/main/java/forestry/core/gui/slots/SlotLiquidIn.java index ddb12b1db..e8560f8e8 100644 --- a/src/main/java/forestry/core/gui/slots/SlotLiquidIn.java +++ b/src/main/java/forestry/core/gui/slots/SlotLiquidIn.java @@ -1,8 +1,7 @@ package forestry.core.gui.slots; -import net.minecraft.inventory.IInventory; - import forestry.core.tiles.IFilterSlotDelegate; +import net.minecraft.inventory.IInventory; public class SlotLiquidIn extends SlotFiltered { public SlotLiquidIn(T inventory, int slotIndex, int xPos, int yPos) { diff --git a/src/main/java/forestry/core/gui/slots/SlotOutput.java b/src/main/java/forestry/core/gui/slots/SlotOutput.java index 73c3e0bcd..9caab156b 100755 --- a/src/main/java/forestry/core/gui/slots/SlotOutput.java +++ b/src/main/java/forestry/core/gui/slots/SlotOutput.java @@ -15,7 +15,6 @@ import javax.annotation.Nullable; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/forestry/core/gui/widgets/ItemStackWidgetBase.java b/src/main/java/forestry/core/gui/widgets/ItemStackWidgetBase.java index e32ac7f3f..845b29ea8 100644 --- a/src/main/java/forestry/core/gui/widgets/ItemStackWidgetBase.java +++ b/src/main/java/forestry/core/gui/widgets/ItemStackWidgetBase.java @@ -10,16 +10,14 @@ ******************************************************************************/ package forestry.core.gui.widgets; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.core.gui.GuiUtil; import forestry.core.gui.tooltips.ToolTip; import forestry.core.proxy.Proxies; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public abstract class ItemStackWidgetBase extends Widget { public ItemStackWidgetBase(WidgetManager widgetManager, int xPos, int yPos) { diff --git a/src/main/java/forestry/core/gui/widgets/ProbeButton.java b/src/main/java/forestry/core/gui/widgets/ProbeButton.java index 7e1e0d699..2b0a83cfb 100644 --- a/src/main/java/forestry/core/gui/widgets/ProbeButton.java +++ b/src/main/java/forestry/core/gui/widgets/ProbeButton.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.core.gui.widgets; -import net.minecraft.client.renderer.GlStateManager; - import forestry.core.gui.GuiEscritoire; import forestry.core.gui.tooltips.ToolTip; import forestry.core.network.packets.PacketGuiSelectRequest; import forestry.core.proxy.Proxies; import forestry.core.utils.Translator; +import net.minecraft.client.renderer.GlStateManager; public class ProbeButton extends Widget { diff --git a/src/main/java/forestry/core/gui/widgets/SocketWidget.java b/src/main/java/forestry/core/gui/widgets/SocketWidget.java index a8d8b23ec..d95351260 100755 --- a/src/main/java/forestry/core/gui/widgets/SocketWidget.java +++ b/src/main/java/forestry/core/gui/widgets/SocketWidget.java @@ -10,16 +10,6 @@ ******************************************************************************/ package forestry.core.gui.widgets; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.text.TextFormatting; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.core.circuits.ISocketable; import forestry.core.circuits.ISolderingIron; import forestry.core.circuits.ItemCircuitBoard; @@ -27,6 +17,14 @@ import forestry.core.gui.IContainerSocketed; import forestry.core.gui.tooltips.ToolTip; import forestry.core.proxy.Proxies; import forestry.core.utils.Translator; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.TextFormatting; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class SocketWidget extends Widget { diff --git a/src/main/java/forestry/core/gui/widgets/WidgetManager.java b/src/main/java/forestry/core/gui/widgets/WidgetManager.java index d86c56154..75061a594 100644 --- a/src/main/java/forestry/core/gui/widgets/WidgetManager.java +++ b/src/main/java/forestry/core/gui/widgets/WidgetManager.java @@ -14,10 +14,9 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import net.minecraft.client.Minecraft; - import forestry.core.gui.GuiForestry; import forestry.core.proxy.Proxies; +import net.minecraft.client.Minecraft; public class WidgetManager { diff --git a/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java b/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java index 9aec4f509..a046202b9 100644 --- a/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java +++ b/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java @@ -12,13 +12,12 @@ package forestry.core.inventory; import javax.annotation.Nullable; +import forestry.core.config.Constants; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.text.ITextComponent; - -import forestry.core.config.Constants; import net.minecraft.util.text.TextComponentString; public class FakeInventoryAdapter implements IInventoryAdapter { @@ -50,17 +49,17 @@ public class FakeInventoryAdapter implements IInventoryAdapter { public boolean isLocked(int slotIndex) { return false; } - + @Override public int[] getSlotsForFace(EnumFacing side) { return Constants.SLOTS_NONE; } - + @Override public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) { return false; } - + @Override public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) { return false; @@ -80,7 +79,7 @@ public class FakeInventoryAdapter implements IInventoryAdapter { public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { return ItemStack.EMPTY; } - + @Override public ItemStack removeStackFromSlot(int index) { return ItemStack.EMPTY; @@ -90,17 +89,17 @@ public class FakeInventoryAdapter implements IInventoryAdapter { public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { } - + @Override public ITextComponent getDisplayName() { return new TextComponentString(getName()); } - + @Override public String getName() { return ""; } - + @Override public boolean hasCustomName() { return false; diff --git a/src/main/java/forestry/core/inventory/IInventoryAdapter.java b/src/main/java/forestry/core/inventory/IInventoryAdapter.java index b313ef583..9abd4f534 100644 --- a/src/main/java/forestry/core/inventory/IInventoryAdapter.java +++ b/src/main/java/forestry/core/inventory/IInventoryAdapter.java @@ -1,10 +1,9 @@ package forestry.core.inventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.nbt.NBTTagCompound; - import forestry.api.core.INbtWritable; import forestry.core.tiles.IFilterSlotDelegate; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.nbt.NBTTagCompound; public interface IInventoryAdapter extends ISidedInventory, IFilterSlotDelegate, INbtWritable { void readFromNBT(NBTTagCompound nbt); diff --git a/src/main/java/forestry/core/inventory/InvSlot.java b/src/main/java/forestry/core/inventory/InvSlot.java index 1ea2bd8fa..415631e73 100644 --- a/src/main/java/forestry/core/inventory/InvSlot.java +++ b/src/main/java/forestry/core/inventory/InvSlot.java @@ -1,7 +1,6 @@ package forestry.core.inventory; import net.minecraft.item.ItemStack; - import net.minecraftforge.items.IItemHandler; public class InvSlot implements IInvSlot { diff --git a/src/main/java/forestry/core/inventory/InventoryPlain.java b/src/main/java/forestry/core/inventory/InventoryPlain.java index e08528df4..7ef7e4d3f 100644 --- a/src/main/java/forestry/core/inventory/InventoryPlain.java +++ b/src/main/java/forestry/core/inventory/InventoryPlain.java @@ -10,6 +10,9 @@ ******************************************************************************/ package forestry.core.inventory; +import forestry.api.core.INbtReadable; +import forestry.api.core.INbtWritable; +import forestry.core.utils.InventoryUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -18,10 +21,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; -import forestry.api.core.INbtReadable; -import forestry.api.core.INbtWritable; -import forestry.core.utils.InventoryUtil; - public class InventoryPlain implements IInventory, INbtWritable, INbtReadable { private final NonNullList contents; @@ -90,17 +89,17 @@ public class InventoryPlain implements IInventory, INbtWritable, INbtReadable { public boolean isUsableByPlayer(EntityPlayer entityplayer) { return false; } - + @Override public ItemStack removeStackFromSlot(int slotIndex) { return this.getStackInSlot(slotIndex); } - + @Override public boolean hasCustomName() { return true; } - + @Override public ITextComponent getDisplayName() { return new TextComponentString(getName()); @@ -132,7 +131,7 @@ public class InventoryPlain implements IInventory, INbtWritable, INbtReadable { } /* Fields */ - + @Override public int getField(int id) { return 0; diff --git a/src/main/java/forestry/core/inventory/ItemInventoryCamouflageSprayCan.java b/src/main/java/forestry/core/inventory/ItemInventoryCamouflageSprayCan.java index ed4fcfa4b..f150ba250 100644 --- a/src/main/java/forestry/core/inventory/ItemInventoryCamouflageSprayCan.java +++ b/src/main/java/forestry/core/inventory/ItemInventoryCamouflageSprayCan.java @@ -33,9 +33,9 @@ public class ItemInventoryCamouflageSprayCan extends ItemInventory implements IC @Override public boolean setCamouflageBlock(String type, ItemStack camouflageBlock, boolean sendClientUpdate) { - if(!ItemStackUtil.isIdenticalItem(camouflageBlock, getStackInSlot(0))){ + if (!ItemStackUtil.isIdenticalItem(camouflageBlock, getStackInSlot(0))) { setInventorySlotContents(0, camouflageBlock); - + World world = player.world; if (sendClientUpdate && world != null && world.isRemote) { Proxies.net.sendToServer(new PacketCamouflageSelectServer(this, type, CamouflageSelectionType.ITEM)); diff --git a/src/main/java/forestry/core/inventory/ItemInventorySolderingIron.java b/src/main/java/forestry/core/inventory/ItemInventorySolderingIron.java index 537035d13..ab633b7ab 100644 --- a/src/main/java/forestry/core/inventory/ItemInventorySolderingIron.java +++ b/src/main/java/forestry/core/inventory/ItemInventorySolderingIron.java @@ -10,14 +10,9 @@ ******************************************************************************/ package forestry.core.inventory; -import com.google.common.collect.ImmutableSet; - import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - +import com.google.common.collect.ImmutableSet; import forestry.api.circuits.ChipsetManager; import forestry.api.circuits.ICircuit; import forestry.api.circuits.ICircuitLayout; @@ -32,6 +27,9 @@ import forestry.core.config.Config; import forestry.core.errors.EnumErrorCode; import forestry.core.gui.IHintSource; import forestry.core.utils.datastructures.RevolvingList; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; public class ItemInventorySolderingIron extends ItemInventory implements IErrorSource, IHintSource { diff --git a/src/main/java/forestry/core/inventory/wrappers/InvWrapperBase.java b/src/main/java/forestry/core/inventory/wrappers/InvWrapperBase.java index daeaf2faf..0abc8336a 100644 --- a/src/main/java/forestry/core/inventory/wrappers/InvWrapperBase.java +++ b/src/main/java/forestry/core/inventory/wrappers/InvWrapperBase.java @@ -20,114 +20,114 @@ import net.minecraft.util.text.ITextComponent; */ public abstract class InvWrapperBase implements IInventory { - private final IInventory inv; - private boolean checkItems = true; + private final IInventory inv; + private boolean checkItems = true; - public InvWrapperBase(IInventory inv) { - this(inv, true); - } + public InvWrapperBase(IInventory inv) { + this(inv, true); + } - public InvWrapperBase(IInventory inv, boolean checkItems) { - this.inv = inv; - this.checkItems = checkItems; - } + public InvWrapperBase(IInventory inv, boolean checkItems) { + this.inv = inv; + this.checkItems = checkItems; + } - public IInventory getBaseInventory() { - return inv; - } + public IInventory getBaseInventory() { + return inv; + } - @Override - public int getSizeInventory() { - return inv.getSizeInventory(); - } + @Override + public int getSizeInventory() { + return inv.getSizeInventory(); + } - @Override - public ItemStack getStackInSlot(int slot) { - return inv.getStackInSlot(slot); - } + @Override + public ItemStack getStackInSlot(int slot) { + return inv.getStackInSlot(slot); + } - @Override - public ItemStack decrStackSize(int slot, int amount) { - return inv.decrStackSize(slot, amount); - } + @Override + public ItemStack decrStackSize(int slot, int amount) { + return inv.decrStackSize(slot, amount); + } - @Override - public ItemStack removeStackFromSlot(int slot) { - return inv.removeStackFromSlot(slot); - } + @Override + public ItemStack removeStackFromSlot(int slot) { + return inv.removeStackFromSlot(slot); + } - @Override - public void setInventorySlotContents(int slot, ItemStack itemstack) { - inv.setInventorySlotContents(slot, itemstack); - } + @Override + public void setInventorySlotContents(int slot, ItemStack itemstack) { + inv.setInventorySlotContents(slot, itemstack); + } - @Override - public String getName() { - return inv.getName(); - } + @Override + public String getName() { + return inv.getName(); + } - @Override - public ITextComponent getDisplayName() { - return inv.getDisplayName(); - } + @Override + public ITextComponent getDisplayName() { + return inv.getDisplayName(); + } - @Override - public int getInventoryStackLimit() { - return inv.getInventoryStackLimit(); - } + @Override + public int getInventoryStackLimit() { + return inv.getInventoryStackLimit(); + } - @Override - public void markDirty() { - inv.markDirty(); - } + @Override + public void markDirty() { + inv.markDirty(); + } - @Override - public boolean isUsableByPlayer(EntityPlayer entityplayer) { - return inv.isUsableByPlayer(entityplayer); - } + @Override + public boolean isUsableByPlayer(EntityPlayer entityplayer) { + return inv.isUsableByPlayer(entityplayer); + } - @Override - public void openInventory(EntityPlayer player) { - inv.openInventory(player); - } + @Override + public void openInventory(EntityPlayer player) { + inv.openInventory(player); + } - @Override - public void closeInventory(EntityPlayer player) { - inv.closeInventory(player); - } + @Override + public void closeInventory(EntityPlayer player) { + inv.closeInventory(player); + } - @Override - public boolean hasCustomName() { - return inv.hasCustomName(); - } + @Override + public boolean hasCustomName() { + return inv.hasCustomName(); + } - @Override - public boolean isItemValidForSlot(int slot, ItemStack stack) { - return !checkItems || inv.isItemValidForSlot(slot, stack); - } + @Override + public boolean isItemValidForSlot(int slot, ItemStack stack) { + return !checkItems || inv.isItemValidForSlot(slot, stack); + } - @Override - public int getField(int id) { - return inv.getField(id); - } + @Override + public int getField(int id) { + return inv.getField(id); + } - @Override - public void setField(int id, int value) { - inv.setField(id, value); - } + @Override + public void setField(int id, int value) { + inv.setField(id, value); + } - @Override - public int getFieldCount() { - return inv.getFieldCount(); - } + @Override + public int getFieldCount() { + return inv.getFieldCount(); + } - @Override - public void clear() { - inv.clear(); - } + @Override + public void clear() { + inv.clear(); + } - public boolean checkItems() { - return checkItems; - } + public boolean checkItems() { + return checkItems; + } } diff --git a/src/main/java/forestry/core/items/FluidHandlerItemForestry.java b/src/main/java/forestry/core/items/FluidHandlerItemForestry.java index 693003c76..f61f79f5b 100644 --- a/src/main/java/forestry/core/items/FluidHandlerItemForestry.java +++ b/src/main/java/forestry/core/items/FluidHandlerItemForestry.java @@ -1,7 +1,6 @@ package forestry.core.items; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.templates.FluidHandlerItemStackSimple; diff --git a/src/main/java/forestry/core/items/ItemBlockForestry.java b/src/main/java/forestry/core/items/ItemBlockForestry.java index aa87afe96..d8f7fc2db 100644 --- a/src/main/java/forestry/core/items/ItemBlockForestry.java +++ b/src/main/java/forestry/core/items/ItemBlockForestry.java @@ -48,7 +48,7 @@ public class ItemBlockForestry extends ItemBlock { @Override public String getUnlocalizedName(ItemStack itemstack) { Block block = getBlock(); - if(block instanceof IBlockWithMeta){ + if (block instanceof IBlockWithMeta) { IBlockWithMeta blockMeta = (IBlockWithMeta) block; int meta = itemstack.getMetadata(); return block.getUnlocalizedName() + "." + blockMeta.getNameFromMeta(meta); diff --git a/src/main/java/forestry/core/items/ItemRegistry.java b/src/main/java/forestry/core/items/ItemRegistry.java index 556d70b94..646ee873f 100644 --- a/src/main/java/forestry/core/items/ItemRegistry.java +++ b/src/main/java/forestry/core/items/ItemRegistry.java @@ -10,14 +10,12 @@ ******************************************************************************/ package forestry.core.items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.oredict.OreDictionary; - import forestry.core.proxy.Proxies; import forestry.plugins.PluginManager; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; public abstract class ItemRegistry { protected static T registerItem(T item, String name) { diff --git a/src/main/java/forestry/core/items/ItemRegistryCore.java b/src/main/java/forestry/core/items/ItemRegistryCore.java index 303f893d5..96f0f87e9 100644 --- a/src/main/java/forestry/core/items/ItemRegistryCore.java +++ b/src/main/java/forestry/core/items/ItemRegistryCore.java @@ -10,14 +10,12 @@ ******************************************************************************/ package forestry.core.items; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.oredict.OreDictionary; - import forestry.api.core.Tabs; import forestry.core.circuits.ItemCircuitBoard; import forestry.core.genetics.ItemResearchNote; import forestry.core.utils.OreDictUtil; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; public class ItemRegistryCore extends ItemRegistry { /* Fertilizer */ @@ -29,7 +27,7 @@ public class ItemRegistryCore extends ItemRegistry { /* Research */ public final ItemResearchNote researchNote; - + /* Alyzer */ public final ItemAlyzer portableAlyzer; @@ -88,10 +86,10 @@ public class ItemRegistryCore extends ItemRegistry { public final ItemForestry beeswax; public final ItemForestry refractoryWax; public final ItemFruit fruits; - + /* Camouflage */ public final ItemCamouflageSprayCan camouflageSprayCan; - + public ItemRegistryCore() { fertilizerBio = registerItem(new ItemForestry(), "fertilizerBio"); fertilizerCompound = registerItem(new ItemFertilizer(), "fertilizerCompound"); @@ -100,7 +98,7 @@ public class ItemRegistryCore extends ItemRegistry { OreDictionary.registerOre(OreDictUtil.GEM_APATITE, apatite); researchNote = registerItem(new ItemResearchNote(), "researchNote"); - + portableAlyzer = registerItem(new ItemAlyzer(), "portableAlyzer"); ingotCopper = createItemForOreName(OreDictUtil.INGOT_COPPER); @@ -189,7 +187,7 @@ public class ItemRegistryCore extends ItemRegistry { ItemStack fruit = new ItemStack(fruits, 1, def.ordinal()); OreDictionary.registerOre(def.getOreDict(), fruit); } - + // CAMOUFLAGE camouflageSprayCan = registerItem(new ItemCamouflageSprayCan(), "camouflageSprayCan"); } diff --git a/src/main/java/forestry/core/items/ItemRegistryFluids.java b/src/main/java/forestry/core/items/ItemRegistryFluids.java index 0c09c5633..e36d4fbc1 100644 --- a/src/main/java/forestry/core/items/ItemRegistryFluids.java +++ b/src/main/java/forestry/core/items/ItemRegistryFluids.java @@ -13,15 +13,13 @@ package forestry.core.items; import java.util.EnumMap; import java.util.Map; +import forestry.core.fluids.Fluids; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidUtil; import net.minecraftforge.fluids.capability.IFluidHandler; -import forestry.core.fluids.Fluids; - public class ItemRegistryFluids extends ItemRegistry { public final ItemFluidContainerForestry canEmpty; public final ItemFluidContainerForestry waxCapsuleEmpty; @@ -32,7 +30,7 @@ public class ItemRegistryFluids extends ItemRegistry { public ItemStack getContainer(EnumContainerType type, Fluids fluid) { return getContainer(type, fluid.getFluid()); } - + public ItemStack getContainer(EnumContainerType type, Fluid fluid) { ItemStack container = new ItemStack(containers.get(type)); IFluidHandler fluidHandler = FluidUtil.getFluidHandler(container); diff --git a/src/main/java/forestry/core/loot/LootTableLoader.java b/src/main/java/forestry/core/loot/LootTableLoader.java index 609f6a1c7..2175d6aea 100644 --- a/src/main/java/forestry/core/loot/LootTableLoader.java +++ b/src/main/java/forestry/core/loot/LootTableLoader.java @@ -1,16 +1,15 @@ package forestry.core.loot; import javax.annotation.Nullable; +import java.io.IOException; +import java.net.URL; import com.google.common.base.Charsets; import com.google.common.io.Resources; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; - -import java.io.IOException; -import java.net.URL; - +import forestry.core.utils.Log; import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.loot.LootContext; import net.minecraft.world.storage.loot.LootEntry; @@ -23,8 +22,6 @@ import net.minecraft.world.storage.loot.conditions.LootConditionManager; import net.minecraft.world.storage.loot.functions.LootFunction; import net.minecraft.world.storage.loot.functions.LootFunctionManager; -import forestry.core.utils.Log; - /** * Copy of {@link LootTableManager} that can load Forestry's loot table additions. * This is a workaround so I can load loot table jsons that have pools to be added to vanilla's chests. diff --git a/src/main/java/forestry/core/loot/SetSpeciesNBT.java b/src/main/java/forestry/core/loot/SetSpeciesNBT.java index 3a65a0c9a..5849184a4 100644 --- a/src/main/java/forestry/core/loot/SetSpeciesNBT.java +++ b/src/main/java/forestry/core/loot/SetSpeciesNBT.java @@ -1,11 +1,15 @@ package forestry.core.loot; +import java.util.Random; + import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; import com.google.gson.JsonSerializationContext; - -import java.util.Random; - +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IIndividual; +import forestry.api.genetics.ISpeciesRoot; +import forestry.api.genetics.ISpeciesType; import net.minecraft.item.ItemStack; import net.minecraft.util.JsonUtils; import net.minecraft.util.ResourceLocation; @@ -13,12 +17,6 @@ import net.minecraft.world.storage.loot.LootContext; import net.minecraft.world.storage.loot.conditions.LootCondition; import net.minecraft.world.storage.loot.functions.LootFunction; -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.ISpeciesRoot; -import forestry.api.genetics.ISpeciesType; - public class SetSpeciesNBT extends LootFunction { private final String speciesUid; diff --git a/src/main/java/forestry/core/models/BlockModelEntry.java b/src/main/java/forestry/core/models/BlockModelEntry.java index ea235e8ff..7b5d29d04 100644 --- a/src/main/java/forestry/core/models/BlockModelEntry.java +++ b/src/main/java/forestry/core/models/BlockModelEntry.java @@ -28,7 +28,7 @@ public class BlockModelEntry { public BlockModelEntry(ModelResourceLocation blockModelLocation, ModelResourceLocation itemModelLocation, IBakedModel model, Block block) { this(blockModelLocation, itemModelLocation, model, block, true); } - + public BlockModelEntry(ModelResourceLocation blockModelLocation, @Nullable ModelResourceLocation itemModelLocation, IBakedModel model, Block block, boolean addStateMapper) { this.blockModelLocation = blockModelLocation; this.itemModelLocation = itemModelLocation; diff --git a/src/main/java/forestry/core/models/DefaultTextureGetter.java b/src/main/java/forestry/core/models/DefaultTextureGetter.java index ad7364c99..40071f5a6 100644 --- a/src/main/java/forestry/core/models/DefaultTextureGetter.java +++ b/src/main/java/forestry/core/models/DefaultTextureGetter.java @@ -13,7 +13,6 @@ package forestry.core.models; import javax.annotation.Nullable; import com.google.common.base.Function; - import com.google.common.base.Preconditions; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -29,5 +28,5 @@ public class DefaultTextureGetter implements Function getMap(ResourceLocation par1) - { + + public static ImmutableMap getMap(ResourceLocation par1) { return IPerspectiveAwareModel.MapWrapper.getTransforms(getTransformFromJson(par1)); } - - private static Reader getReaderForResource(ResourceLocation location) throws IOException - { + + private static Reader getReaderForResource(ResourceLocation location) throws IOException { ResourceLocation file = new ResourceLocation(location.getResourceDomain(), location.getResourcePath() + ".json"); IResource iresource = Minecraft.getMinecraft().getResourceManager().getResource(file); return new BufferedReader(new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8)); } - - private static ItemCameraTransforms getTransformFromJson(ResourceLocation par1) - { - try - { + + private static ItemCameraTransforms getTransformFromJson(ResourceLocation par1) { + try { return ModelBlock.deserialize(getReaderForResource(par1)).getAllTransforms(); - } - catch(Exception e) - { + } catch (Exception e) { e.printStackTrace(); } return ItemCameraTransforms.DEFAULT; @@ -100,12 +91,12 @@ public class ModelCrate extends BlankModel { private IBakedModel getModel(ItemStack stack) { return Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(stack); } - + @Override public ItemOverrideList createOverrides() { return new CrateOverrideList(); } - + /** * Bake the crate model. */ @@ -119,13 +110,13 @@ public class ModelCrate extends BlankModel { } return models; } - - private class CrateOverrideList extends ItemOverrideList{ - + + private class CrateOverrideList extends ItemOverrideList { + public CrateOverrideList() { super(new ArrayList<>()); } - + /** * Bake the crated model */ @@ -134,18 +125,15 @@ public class ModelCrate extends BlankModel { ItemCrated crated = (ItemCrated) stack.getItem(); String crateUID = ItemStackUtil.getItemNameFromRegistry(crated).getResourcePath(); IBakedModel model = cache.get(crateUID); - if(model == null) - { + if (model == null) { //Fastest list with a unknown quad size List list = new LinkedList<>(); IBakedModel baseBaked = getModel(new ItemStack(PluginStorage.items.crate, 1, 1)); - for(BakedQuad quad : ForgeHooksClient.handleCameraTransforms(baseBaked, TransformType.GROUND, false).getQuads(null, null, 0L)) - { + for (BakedQuad quad : ForgeHooksClient.handleCameraTransforms(baseBaked, TransformType.GROUND, false).getQuads(null, null, 0L)) { list.add(new BakedQuad(quad.getVertexData(), 100, quad.getFace(), quad.getSprite(), quad.shouldApplyDiffuseLighting(), quad.getFormat())); } List textures = bakeModel(crated); - for(IBakedModel bakybake : textures) - { + for (IBakedModel bakybake : textures) { list.addAll(ForgeHooksClient.handleCameraTransforms(bakybake, TransformType.GROUND, false).getQuads(null, null, 0L)); } model = new BakedCrateModel(list); @@ -153,58 +141,48 @@ public class ModelCrate extends BlankModel { } return model; } - + } - - public static class BakedCrateModel extends BlankModel implements IPerspectiveAwareModel - { + + public static class BakedCrateModel extends BlankModel implements IPerspectiveAwareModel { private final BakedCrateModel other; private final boolean gui; private final List quads = new ArrayList<>(); private final List emptyList = new ArrayList<>(); - - public BakedCrateModel(BakedCrateModel noneGui) - { + + public BakedCrateModel(BakedCrateModel noneGui) { gui = true; other = noneGui; - for(BakedQuad quad : other.quads) - { - if(quad.getFace() == EnumFacing.SOUTH) - { + for (BakedQuad quad : other.quads) { + if (quad.getFace() == EnumFacing.SOUTH) { quads.add(quad); } } } - - public BakedCrateModel(List data) - { + + public BakedCrateModel(List data) { quads.addAll(data); gui = false; other = new BakedCrateModel(this); } - + @Override - public List getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) - { + public List getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) { return side == null ? quads : emptyList; } - + @Override - public Pair handlePerspective(TransformType cameraTransformType) - { + public Pair handlePerspective(TransformType cameraTransformType) { Pair pair = IPerspectiveAwareModel.MapWrapper.handlePerspective(this, itemTransforms, cameraTransformType); - if(cameraTransformType == TransformType.GUI && !gui && pair.getRight() == null) - { + if (cameraTransformType == TransformType.GUI && !gui && pair.getRight() == null) { return Pair.of(other, null); - } - else if(cameraTransformType != TransformType.GUI && gui) - { + } else if (cameraTransformType != TransformType.GUI && gui) { return Pair.of(other, pair.getRight()); } return pair; } } - + @Override public boolean isGui3d() { return false; diff --git a/src/main/java/forestry/core/models/ModelEntry.java b/src/main/java/forestry/core/models/ModelEntry.java index e3df7b83d..07e5ce710 100644 --- a/src/main/java/forestry/core/models/ModelEntry.java +++ b/src/main/java/forestry/core/models/ModelEntry.java @@ -12,7 +12,6 @@ package forestry.core.models; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.ModelResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -21,7 +20,7 @@ public class ModelEntry { public final ModelResourceLocation modelLocation; public final IBakedModel model; - + public ModelEntry(ModelResourceLocation modelLocation, IBakedModel model) { this.modelLocation = modelLocation; this.model = model; diff --git a/src/main/java/forestry/core/models/SimpleRetexturedModel.java b/src/main/java/forestry/core/models/SimpleRetexturedModel.java index 97e1f4cd4..0e47d9d55 100644 --- a/src/main/java/forestry/core/models/SimpleRetexturedModel.java +++ b/src/main/java/forestry/core/models/SimpleRetexturedModel.java @@ -17,51 +17,51 @@ import net.minecraft.world.World; import net.minecraftforge.client.model.IModel; public class SimpleRetexturedModel extends BlankModel { - + public final IModel model; @Nullable public IBakedModel bakedModel; - + public SimpleRetexturedModel(IModel model) { this.model = model; } - + @Override public List getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) { return getModel().getQuads(state, side, rand); } - + @Override protected ItemOverrideList createOverrides() { return new RetexturedOverrideList(model.bake(model.getDefaultState(), DefaultVertexFormats.ITEM, new DefaultTextureGetter())); } - + @Override public TextureAtlasSprite getParticleTexture() { return getModel().getParticleTexture(); } - - private IBakedModel getModel(){ - if(bakedModel == null){ + + private IBakedModel getModel() { + if (bakedModel == null) { return bakedModel = model.bake(model.getDefaultState(), DefaultVertexFormats.BLOCK, new DefaultTextureGetter()); } return bakedModel; } - - private static class RetexturedOverrideList extends ItemOverrideList{ + + private static class RetexturedOverrideList extends ItemOverrideList { public final IBakedModel bakedModel; - + public RetexturedOverrideList(IBakedModel bakedModel) { super(Collections.emptyList()); - + this.bakedModel = bakedModel; } - + @Override public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, @Nullable World world, @Nullable EntityLivingBase entity) { return bakedModel; } - + } } diff --git a/src/main/java/forestry/core/models/TRSRBakedModel.java b/src/main/java/forestry/core/models/TRSRBakedModel.java index 0646da764..edf9f4b42 100644 --- a/src/main/java/forestry/core/models/TRSRBakedModel.java +++ b/src/main/java/forestry/core/models/TRSRBakedModel.java @@ -12,10 +12,6 @@ ******************************************************************************/ package forestry.core.models; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Maps; - import javax.annotation.Nullable; import javax.vecmath.Matrix3f; import javax.vecmath.Matrix4f; @@ -24,6 +20,9 @@ import javax.vecmath.Vector4f; import java.util.EnumMap; import java.util.List; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.IBakedModel; @@ -33,7 +32,6 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.renderer.vertex.VertexFormatElement; import net.minecraft.util.EnumFacing; - import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad; import net.minecraftforge.client.model.pipeline.VertexTransformer; import net.minecraftforge.common.model.TRSRTransformation; diff --git a/src/main/java/forestry/core/models/WoodModelEntry.java b/src/main/java/forestry/core/models/WoodModelEntry.java index 33a3b4612..686a6d359 100644 --- a/src/main/java/forestry/core/models/WoodModelEntry.java +++ b/src/main/java/forestry/core/models/WoodModelEntry.java @@ -17,7 +17,7 @@ import net.minecraft.block.Block; * Only to storage data's to register a model later. */ public class WoodModelEntry { - + public final T woodTyped; public final boolean withVariants; diff --git a/src/main/java/forestry/core/models/baker/ModelBakerFace.java b/src/main/java/forestry/core/models/baker/ModelBakerFace.java index 31f8a090b..0c92a11ad 100644 --- a/src/main/java/forestry/core/models/baker/ModelBakerFace.java +++ b/src/main/java/forestry/core/models/baker/ModelBakerFace.java @@ -10,13 +10,11 @@ ******************************************************************************/ package forestry.core.models.baker; -import org.lwjgl.util.vector.Vector3f; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.util.EnumFacing; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.util.vector.Vector3f; /** * A face of a {@link ModelBakerModel } diff --git a/src/main/java/forestry/core/multiblock/IMultiblockSizeLimits.java b/src/main/java/forestry/core/multiblock/IMultiblockSizeLimits.java index 8aa575f4f..4f4d48cee 100644 --- a/src/main/java/forestry/core/multiblock/IMultiblockSizeLimits.java +++ b/src/main/java/forestry/core/multiblock/IMultiblockSizeLimits.java @@ -15,6 +15,7 @@ public interface IMultiblockSizeLimits { * Helper method so we don't check for a whole machine until we have enough blocks * to actually assemble it. This isn't as simple as xmax*ymax*zmax for non-cubic machines * or for machines with hollow/complex interiors. + * * @return The minimum number of blocks connected to the machine for it to be assembled. */ int getMinimumNumberOfBlocksForAssembledMachine(); @@ -22,6 +23,7 @@ public interface IMultiblockSizeLimits { /** * Returns the maximum X dimension size of the machine, or -1 (DIMENSION_UNBOUNDED) to disable * dimension checking in X. (This is not recommended.) + * * @return The maximum X dimension size of the machine, or -1 */ int getMaximumXSize(); @@ -29,6 +31,7 @@ public interface IMultiblockSizeLimits { /** * Returns the maximum Z dimension size of the machine, or -1 (DIMENSION_UNBOUNDED) to disable * dimension checking in X. (This is not recommended.) + * * @return The maximum Z dimension size of the machine, or -1 */ int getMaximumZSize(); @@ -36,24 +39,28 @@ public interface IMultiblockSizeLimits { /** * Returns the maximum Y dimension size of the machine, or -1 (DIMENSION_UNBOUNDED) to disable * dimension checking in X. (This is not recommended.) + * * @return The maximum Y dimension size of the machine, or -1 */ int getMaximumYSize(); /** * Returns the minimum X dimension size of the machine. Must be at least 1, because nothing else makes sense. + * * @return The minimum X dimension size of the machine */ int getMinimumXSize(); /** * Returns the minimum Y dimension size of the machine. Must be at least 1, because nothing else makes sense. + * * @return The minimum Y dimension size of the machine */ int getMinimumYSize(); /** * Returns the minimum Z dimension size of the machine. Must be at least 1, because nothing else makes sense. + * * @return The minimum Z dimension size of the machine */ int getMinimumZSize(); diff --git a/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java b/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java index 8ae490014..e34cea371 100644 --- a/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java +++ b/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java @@ -1,7 +1,6 @@ package forestry.core.multiblock; import net.minecraft.client.Minecraft; - import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; diff --git a/src/main/java/forestry/core/multiblock/MultiblockEventHandler.java b/src/main/java/forestry/core/multiblock/MultiblockEventHandler.java index b9a9a10e1..8da7b96f9 100644 --- a/src/main/java/forestry/core/multiblock/MultiblockEventHandler.java +++ b/src/main/java/forestry/core/multiblock/MultiblockEventHandler.java @@ -2,7 +2,6 @@ package forestry.core.multiblock; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; - import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; diff --git a/src/main/java/forestry/core/multiblock/MultiblockLogic.java b/src/main/java/forestry/core/multiblock/MultiblockLogic.java index 4289e8da0..940fac97c 100644 --- a/src/main/java/forestry/core/multiblock/MultiblockLogic.java +++ b/src/main/java/forestry/core/multiblock/MultiblockLogic.java @@ -12,13 +12,12 @@ package forestry.core.multiblock; import javax.annotation.Nullable; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.multiblock.IMultiblockComponent; import forestry.api.multiblock.IMultiblockLogic; import forestry.core.utils.Log; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public abstract class MultiblockLogic implements IMultiblockLogic { private final Class controllerClass; @@ -60,8 +59,9 @@ public abstract class MultiblockLogic i * been initialized, but any attempts to read data about the world can cause infinite loops - * if you call getTileEntity on this TileEntity's coordinate from within validate(), you will * blow your call stack. - * + *

* TL;DR: Here there be dragons. + * * @see net.minecraft.tileentity.TileEntity#validate() */ @Override @@ -72,6 +72,7 @@ public abstract class MultiblockLogic i /** * Called when a block is removed by game actions, such as a player breaking the block * or the block being changed into another block. + * * @see net.minecraft.tileentity.TileEntity#invalidate() */ @Override @@ -83,6 +84,7 @@ public abstract class MultiblockLogic i * Called from Minecraft's tile entity loop, after all tile entities have been ticked, * as the chunk in which this tile entity is contained is unloading. * Happens before the Forge TickEnd event. + * * @see net.minecraft.tileentity.TileEntity#onChunkUnload() */ @Override @@ -179,6 +181,7 @@ public abstract class MultiblockLogic i * Override this to easily modify the description packet's data without having * to worry about sending the packet itself. * Decode this data in decodeDescriptionPacket. + * * @param packetData An NBT compound tag into which you should write your custom description data. */ @Override @@ -193,6 +196,7 @@ public abstract class MultiblockLogic i /** * Override this to easily read in data from a TileEntity's description packet. * Encoded in encodeDescriptionPacket. + * * @param packetData The NBT data from the tile entity's description packet. */ @Override diff --git a/src/main/java/forestry/core/multiblock/MultiblockLogicFactory.java b/src/main/java/forestry/core/multiblock/MultiblockLogicFactory.java index 3903dca26..ce166d227 100644 --- a/src/main/java/forestry/core/multiblock/MultiblockLogicFactory.java +++ b/src/main/java/forestry/core/multiblock/MultiblockLogicFactory.java @@ -36,7 +36,7 @@ public class MultiblockLogicFactory implements IMultiblockLogicFactory { public IMultiblockLogicGreenhouse createGreenhouseLogic() { return new MultiblockLogicGreenhouse(); } - + @Override public IMultiblockLogicCharcoalPile createCharcoalPileLogic() { return new MultiblockLogicCharcoalPile(); diff --git a/src/main/java/forestry/core/multiblock/MultiblockUtil.java b/src/main/java/forestry/core/multiblock/MultiblockUtil.java index 637c244c3..20d107b9d 100644 --- a/src/main/java/forestry/core/multiblock/MultiblockUtil.java +++ b/src/main/java/forestry/core/multiblock/MultiblockUtil.java @@ -13,21 +13,21 @@ package forestry.core.multiblock; import java.util.ArrayList; import java.util.List; +import forestry.api.multiblock.IMultiblockComponent; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import forestry.api.multiblock.IMultiblockComponent; - public class MultiblockUtil { /** * Returns an array containing references to neighboring IMultiblockComponent tile entities. * Primarily a utility method. Only works after tileentity construction. - * + *

* This method is chunk-safe on the server; it will not query for parts in chunks that are unloaded. * Note that no method is chunk-safe on the client, because ChunkProviderClient is stupid. + * * @return An array of references to neighboring IMultiblockComponent tile entities. */ public static List getNeighboringParts(World world, IMultiblockComponent part) { diff --git a/src/main/java/forestry/core/multiblock/MultiblockValidationException.java b/src/main/java/forestry/core/multiblock/MultiblockValidationException.java index b0cda81f1..0ba1260cd 100644 --- a/src/main/java/forestry/core/multiblock/MultiblockValidationException.java +++ b/src/main/java/forestry/core/multiblock/MultiblockValidationException.java @@ -3,6 +3,7 @@ package forestry.core.multiblock; /** * An exception thrown when trying to validate a multiblock. Requires a string describing why the multiblock * could not assemble. + * * @author Erogenous Beef */ public class MultiblockValidationException extends Exception { diff --git a/src/main/java/forestry/core/multiblock/RectangularMultiblockControllerBase.java b/src/main/java/forestry/core/multiblock/RectangularMultiblockControllerBase.java index a0c67bd46..89a039e0f 100644 --- a/src/main/java/forestry/core/multiblock/RectangularMultiblockControllerBase.java +++ b/src/main/java/forestry/core/multiblock/RectangularMultiblockControllerBase.java @@ -1,12 +1,11 @@ package forestry.core.multiblock; +import forestry.api.multiblock.IMultiblockComponent; import forestry.core.utils.Translator; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.multiblock.IMultiblockComponent; - public abstract class RectangularMultiblockControllerBase extends MultiblockControllerForestry { private final IMultiblockSizeLimits sizeLimits; @@ -25,15 +24,15 @@ public abstract class RectangularMultiblockControllerBase extends MultiblockCont if (connectedParts.size() < sizeLimits.getMinimumNumberOfBlocksForAssembledMachine()) { throw new MultiblockValidationException(Translator.translateToLocalFormatted("for.multiblock.error.small", minX, minY, minZ)); } - + BlockPos maximumCoord = getMaximumCoord(); BlockPos minimumCoord = getMinimumCoord(); - + // Quickly check for exceeded dimensions int deltaX = maximumCoord.getX() - minimumCoord.getX() + 1; int deltaY = maximumCoord.getY() - minimumCoord.getY() + 1; int deltaZ = maximumCoord.getZ() - minimumCoord.getZ() + 1; - + int maxX = sizeLimits.getMaximumXSize(); int maxY = sizeLimits.getMaximumYSize(); int maxZ = sizeLimits.getMaximumZSize(); @@ -71,7 +70,7 @@ public abstract class RectangularMultiblockControllerBase extends MultiblockCont te = this.world.getTileEntity(pos); if (te instanceof IMultiblockComponent) { part = (IMultiblockComponent) te; - + // Ensure this part should actually be allowed within a cube of this controller's type if (!myClass.equals(part.getMultiblockLogic().getController().getClass())) { throw new MultiblockValidationException(Translator.translateToLocalFormatted("for.multiblock.error.invalid.part", Translator.translateToLocal(getUnlocalizedType()))); @@ -80,7 +79,7 @@ public abstract class RectangularMultiblockControllerBase extends MultiblockCont // This is permitted so that we can incorporate certain non-multiblock parts inside interiors part = null; } - + // Validate block type against both part-level and material-level validators. int extremes = 0; @@ -93,7 +92,7 @@ public abstract class RectangularMultiblockControllerBase extends MultiblockCont if (z == minimumCoord.getZ()) { extremes++; } - + if (x == maximumCoord.getX()) { extremes++; } @@ -103,7 +102,7 @@ public abstract class RectangularMultiblockControllerBase extends MultiblockCont if (z == maximumCoord.getZ()) { extremes++; } - + if (extremes >= 1) { // Side int exteriorLevel = y - minimumCoord.getY(); @@ -123,7 +122,7 @@ public abstract class RectangularMultiblockControllerBase extends MultiblockCont } } } - + protected IMultiblockSizeLimits getSizeLimits() { return sizeLimits; } diff --git a/src/main/java/forestry/core/network/IForestryPacket.java b/src/main/java/forestry/core/network/IForestryPacket.java index 08d47fea0..74f66c8b7 100644 --- a/src/main/java/forestry/core/network/IForestryPacket.java +++ b/src/main/java/forestry/core/network/IForestryPacket.java @@ -14,5 +14,6 @@ import net.minecraftforge.fml.common.network.internal.FMLProxyPacket; public interface IForestryPacket { FMLProxyPacket getPacket(); + IPacketId getPacketId(); } diff --git a/src/main/java/forestry/core/network/PacketHandler.java b/src/main/java/forestry/core/network/PacketHandler.java index 6e596e35f..c5a20db2c 100644 --- a/src/main/java/forestry/core/network/PacketHandler.java +++ b/src/main/java/forestry/core/network/PacketHandler.java @@ -12,12 +12,13 @@ package forestry.core.network; import java.io.IOException; +import forestry.core.proxy.Proxies; +import forestry.core.utils.Log; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.util.IThreadListener; - import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.FMLEventChannel; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent; @@ -25,9 +26,6 @@ import net.minecraftforge.fml.common.network.FMLNetworkEvent.ServerCustomPacketE import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.internal.FMLProxyPacket; -import forestry.core.proxy.Proxies; -import forestry.core.utils.Log; - public class PacketHandler { public static final String channelId = "FOR"; private final FMLEventChannel channel; diff --git a/src/main/java/forestry/core/network/PacketIdClient.java b/src/main/java/forestry/core/network/PacketIdClient.java index aa8136305..20ef4a5c9 100644 --- a/src/main/java/forestry/core/network/PacketIdClient.java +++ b/src/main/java/forestry/core/network/PacketIdClient.java @@ -14,7 +14,9 @@ import javax.annotation.Nonnull; import forestry.core.network.packets.PacketHandlerDummyClient; -/** Packets sent to the client from the server */ +/** + * Packets sent to the client from the server + */ public enum PacketIdClient implements IPacketId { INVALID, @@ -52,12 +54,12 @@ public enum PacketIdClient implements IPacketId { // Arboriculture RIPENING_UPDATE, - + // Mail TRADING_ADDRESS_RESPONSE, LETTER_INFO_RESPONSE, POBOX_INFO_RESPONSE, - + // JEI RECIPE_TRANSFER_UPDATE; diff --git a/src/main/java/forestry/core/network/PacketIdServer.java b/src/main/java/forestry/core/network/PacketIdServer.java index add47b9f3..d4eaf5fa1 100644 --- a/src/main/java/forestry/core/network/PacketIdServer.java +++ b/src/main/java/forestry/core/network/PacketIdServer.java @@ -14,7 +14,9 @@ import javax.annotation.Nonnull; import forestry.core.network.packets.PacketHandlerDummyServer; -/** Packets sent to the server from the client */ +/** + * Packets sent to the server from the client + */ public enum PacketIdServer implements IPacketId { INVALID, diff --git a/src/main/java/forestry/core/network/packets/CamouflageSelectionType.java b/src/main/java/forestry/core/network/packets/CamouflageSelectionType.java index 41caf7f82..f39b81ad9 100644 --- a/src/main/java/forestry/core/network/packets/CamouflageSelectionType.java +++ b/src/main/java/forestry/core/network/packets/CamouflageSelectionType.java @@ -2,7 +2,7 @@ package forestry.core.network.packets; public enum CamouflageSelectionType { TILE, MULTIBLOCK, ITEM; - - public static final CamouflageSelectionType[] VALUES = values(); - + + public static final CamouflageSelectionType[] VALUES = values(); + } diff --git a/src/main/java/forestry/core/network/packets/PacketErrorUpdate.java b/src/main/java/forestry/core/network/packets/PacketErrorUpdate.java index c9f8e139b..dac1df45b 100644 --- a/src/main/java/forestry/core/network/packets/PacketErrorUpdate.java +++ b/src/main/java/forestry/core/network/packets/PacketErrorUpdate.java @@ -12,16 +12,15 @@ package forestry.core.network.packets; import java.io.IOException; -import forestry.core.network.ForestryPacket; -import forestry.core.network.IForestryPacketHandlerClient; -import forestry.core.network.PacketBufferForestry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; - import forestry.api.core.IErrorLogic; import forestry.api.core.IErrorLogicSource; +import forestry.core.network.ForestryPacket; import forestry.core.network.IForestryPacketClient; +import forestry.core.network.IForestryPacketHandlerClient; +import forestry.core.network.PacketBufferForestry; import forestry.core.network.PacketIdClient; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; public class PacketErrorUpdate extends ForestryPacket implements IForestryPacketClient { diff --git a/src/main/java/forestry/core/owner/IOwnerHandler.java b/src/main/java/forestry/core/owner/IOwnerHandler.java index bd5c6ecdd..25ed2f088 100644 --- a/src/main/java/forestry/core/owner/IOwnerHandler.java +++ b/src/main/java/forestry/core/owner/IOwnerHandler.java @@ -17,6 +17,6 @@ import com.mojang.authlib.GameProfile; public interface IOwnerHandler { @Nullable GameProfile getOwner(); - + void setOwner(GameProfile owner); } diff --git a/src/main/java/forestry/core/proxy/ProxyClient.java b/src/main/java/forestry/core/proxy/ProxyClient.java index f6c655d74..afe831194 100644 --- a/src/main/java/forestry/core/proxy/ProxyClient.java +++ b/src/main/java/forestry/core/proxy/ProxyClient.java @@ -12,6 +12,11 @@ package forestry.core.proxy; import java.io.File; +import forestry.core.TickHandlerCoreClient; +import forestry.core.models.ModelManager; +import forestry.core.multiblock.MultiblockClientTickHandler; +import forestry.core.render.TextureManager; +import forestry.core.worldgen.WorldGenerator; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; @@ -24,17 +29,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.common.MinecraftForge; - import org.lwjgl.input.Keyboard; -import forestry.core.TickHandlerCoreClient; -import forestry.core.models.ModelManager; -import forestry.core.multiblock.MultiblockClientTickHandler; -import forestry.core.render.TextureManager; -import forestry.core.worldgen.WorldGenerator; - @SuppressWarnings("unused") public class ProxyClient extends ProxyCommon { @@ -45,13 +42,13 @@ public class ProxyClient extends ProxyCommon { MinecraftForge.EVENT_BUS.register(new TickHandlerCoreClient()); MinecraftForge.EVENT_BUS.register(new MultiblockClientTickHandler()); } - + @Override public void registerBlock(Block block) { ModelManager.getInstance().registerBlockClient(block); TextureManager.getInstance().registerBlock(block); } - + @Override public void registerItem(Item item) { ModelManager.getInstance().registerItemClient(item); diff --git a/src/main/java/forestry/core/proxy/ProxyCommon.java b/src/main/java/forestry/core/proxy/ProxyCommon.java index 04a39850a..0883289d6 100755 --- a/src/main/java/forestry/core/proxy/ProxyCommon.java +++ b/src/main/java/forestry/core/proxy/ProxyCommon.java @@ -12,6 +12,9 @@ package forestry.core.proxy; import java.io.File; +import forestry.core.TickHandlerCoreServer; +import forestry.core.multiblock.MultiblockServerTickHandler; +import forestry.core.worldgen.WorldGenerator; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; @@ -20,27 +23,22 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.common.Loader; -import forestry.core.TickHandlerCoreServer; -import forestry.core.multiblock.MultiblockServerTickHandler; -import forestry.core.worldgen.WorldGenerator; - public class ProxyCommon { public String getMinecraftVersion() { return Loader.instance().getMinecraftModContainer().getVersion(); } - - public void registerItem(Item item){ - + + public void registerItem(Item item) { + } - - public void registerBlock(Block block){ - + + public void registerBlock(Block block) { + } public void registerTickHandlers(WorldGenerator worldGenerator) { diff --git a/src/main/java/forestry/core/proxy/ProxyNetwork.java b/src/main/java/forestry/core/proxy/ProxyNetwork.java index c998b55ef..6414c9d42 100755 --- a/src/main/java/forestry/core/proxy/ProxyNetwork.java +++ b/src/main/java/forestry/core/proxy/ProxyNetwork.java @@ -10,19 +10,17 @@ ******************************************************************************/ package forestry.core.proxy; +import forestry.Forestry; +import forestry.core.network.IForestryPacketClient; +import forestry.core.network.IForestryPacketServer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.management.PlayerChunkMap; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.WorldServer; - import net.minecraftforge.common.util.FakePlayer; -import forestry.Forestry; -import forestry.core.network.IForestryPacketClient; -import forestry.core.network.IForestryPacketServer; - public class ProxyNetwork { public

void sendNetworkPacket(P packet, BlockPos pos, World world) { diff --git a/src/main/java/forestry/core/proxy/ProxyNetworkClient.java b/src/main/java/forestry/core/proxy/ProxyNetworkClient.java index 6a48659a9..58ef30873 100644 --- a/src/main/java/forestry/core/proxy/ProxyNetworkClient.java +++ b/src/main/java/forestry/core/proxy/ProxyNetworkClient.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.proxy; -import net.minecraft.client.network.NetHandlerPlayClient; - import forestry.core.network.IForestryPacketServer; +import net.minecraft.client.network.NetHandlerPlayClient; @SuppressWarnings("unused") public class ProxyNetworkClient extends ProxyNetwork { diff --git a/src/main/java/forestry/core/proxy/ProxyRender.java b/src/main/java/forestry/core/proxy/ProxyRender.java index 2c229d0ec..a81400088 100644 --- a/src/main/java/forestry/core/proxy/ProxyRender.java +++ b/src/main/java/forestry/core/proxy/ProxyRender.java @@ -10,24 +10,11 @@ ******************************************************************************/ package forestry.core.proxy; -import com.google.common.collect.ImmutableMap; - import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.block.statemap.IStateMapper; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import net.minecraftforge.common.animation.ITimeValue; -import net.minecraftforge.common.model.animation.IAnimationStateMachine; - +import com.google.common.collect.ImmutableMap; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.core.fluids.Fluids; @@ -38,6 +25,16 @@ import forestry.core.tiles.TileBase; import forestry.core.tiles.TileEscritoire; import forestry.core.tiles.TileMill; import forestry.core.tiles.TileNaturalistChest; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.block.statemap.IStateMapper; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.animation.ITimeValue; +import net.minecraftforge.common.model.animation.IAnimationStateMachine; public class ProxyRender { @@ -82,10 +79,10 @@ public class ProxyRender { public TileEntitySpecialRenderer getRenderChest(String textureName) { return null; } - + public void registerBlockModel(BlockModelEntry index) { } - + public void registerModel(ModelEntry index) { } @@ -104,14 +101,14 @@ public class ProxyRender { public void bindTexture(ResourceLocation location) { } - + public void registerModels() { } public void registerItemAndBlockColors() { } - - public IAnimationStateMachine loadAnimationState(ResourceLocation location, ImmutableMap parameters){ + + public IAnimationStateMachine loadAnimationState(ResourceLocation location, ImmutableMap parameters) { return null; } diff --git a/src/main/java/forestry/core/proxy/ProxyRenderClient.java b/src/main/java/forestry/core/proxy/ProxyRenderClient.java index e079d7bdb..891871566 100644 --- a/src/main/java/forestry/core/proxy/ProxyRenderClient.java +++ b/src/main/java/forestry/core/proxy/ProxyRenderClient.java @@ -138,16 +138,16 @@ public class ProxyRenderClient extends ProxyRender { public void bindTexture(ResourceLocation location) { Minecraft.getMinecraft().getTextureManager().bindTexture(location); } - + @Override public void registerBlockModel(@Nonnull final BlockModelEntry index) { ModelManager.getInstance().registerCustomBlockModel(index); - if(index.addStateMapper){ + if (index.addStateMapper) { StateMapperBase ignoreState = new BlockModeStateMapper(index); registerStateMapper(index.block, ignoreState); } } - + @Override public void registerModel(@Nonnull ModelEntry index) { ModelManager.getInstance().registerCustomModel(index); @@ -179,9 +179,9 @@ public class ProxyRenderClient extends ProxyRender { } @Override - public IAnimationStateMachine loadAnimationState(ResourceLocation location, ImmutableMap parameters){ + public IAnimationStateMachine loadAnimationState(ResourceLocation location, ImmutableMap parameters) { return ModelLoaderRegistry.loadASM(location, parameters); - } + } private static boolean shouldSpawnParticle(World world) { if (!Config.enableParticleFX) { @@ -315,7 +315,7 @@ public class ProxyRenderClient extends ProxyRender { float red = (color >> 16 & 255) / 255.0F; float green = (color >> 8 & 255) / 255.0F; float blue = (color & 255) / 255.0F; - + ParticleManager effectRenderer = Minecraft.getMinecraft().effectRenderer; Particle particle = effectRenderer.spawnEffectParticle(EnumParticleTypes.SPELL.getParticleID(), x, y, z, 0, 0, 0); if (particle != null) { diff --git a/src/main/java/forestry/core/recipes/jei/ForestryRecipeCategoryUid.java b/src/main/java/forestry/core/recipes/jei/ForestryRecipeCategoryUid.java index 8d4495eeb..bbd68e7cc 100644 --- a/src/main/java/forestry/core/recipes/jei/ForestryRecipeCategoryUid.java +++ b/src/main/java/forestry/core/recipes/jei/ForestryRecipeCategoryUid.java @@ -4,7 +4,7 @@ public class ForestryRecipeCategoryUid { private ForestryRecipeCategoryUid() { } - + public static final String BOTTLER = "forestry.bottler"; public static final String CARPENTER = "forestry.carpenter"; public static final String CENTRIFUGE = "forestry.centrifuge"; @@ -14,5 +14,5 @@ public class ForestryRecipeCategoryUid { public static final String RAINMAKER = "forestry.rainmaker"; public static final String SQUEEZER = "forestry.squeezer"; public static final String STILL = "forestry.still"; - + } diff --git a/src/main/java/forestry/core/recipes/jei/ForestryRecipeWrapper.java b/src/main/java/forestry/core/recipes/jei/ForestryRecipeWrapper.java index 4f22655e1..806ea06c9 100644 --- a/src/main/java/forestry/core/recipes/jei/ForestryRecipeWrapper.java +++ b/src/main/java/forestry/core/recipes/jei/ForestryRecipeWrapper.java @@ -4,7 +4,7 @@ import mezz.jei.api.recipe.BlankRecipeWrapper; public abstract class ForestryRecipeWrapper extends BlankRecipeWrapper { private final R recipe; - + public ForestryRecipeWrapper(R recipe) { this.recipe = recipe; } diff --git a/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java b/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java index 01fc395d2..2be1954b3 100644 --- a/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java +++ b/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java @@ -1,21 +1,18 @@ package forestry.core.recipes.jei; -import com.google.common.collect.ArrayListMultimap; - import java.text.NumberFormat; import java.util.List; +import com.google.common.collect.ArrayListMultimap; +import forestry.core.utils.Translator; +import mezz.jei.api.gui.ITooltipCallback; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextFormatting; -import forestry.core.utils.Translator; - -import mezz.jei.api.gui.ITooltipCallback; - public class ForestryTooltipCallback implements ITooltipCallback { private final ArrayListMultimap tooltips = ArrayListMultimap.create(); - + @Override public void onTooltip(int index, boolean input, ItemStack ingredient, List tooltip) { List tip = tooltips.get(index); @@ -23,7 +20,7 @@ public class ForestryTooltipCallback implements ITooltipCallback { tooltip.addAll(tip); } } - + public void addChanceTooltip(int index, float chance) { if (chance < 0) { chance = 0; diff --git a/src/main/java/forestry/core/render/ColourProperties.java b/src/main/java/forestry/core/render/ColourProperties.java index 7ebfe2282..a78f6730f 100644 --- a/src/main/java/forestry/core/render/ColourProperties.java +++ b/src/main/java/forestry/core/render/ColourProperties.java @@ -14,20 +14,20 @@ import java.io.IOException; import java.io.InputStream; import java.util.Properties; +import forestry.core.utils.Log; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.IReloadableResourceManager; import net.minecraft.client.resources.IResourceManager; import net.minecraft.client.resources.IResourceManagerReloadListener; -import forestry.core.utils.Log; public class ColourProperties implements IResourceManagerReloadListener { public static final ColourProperties INSTANCE; - - static{ + + static { INSTANCE = new ColourProperties(); } - + private final Properties defaultMappings = new Properties(); private final Properties mappings = new Properties(); diff --git a/src/main/java/forestry/core/render/ForestryResource.java b/src/main/java/forestry/core/render/ForestryResource.java index b98af36ed..86f92fe30 100644 --- a/src/main/java/forestry/core/render/ForestryResource.java +++ b/src/main/java/forestry/core/render/ForestryResource.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.core.render; -import net.minecraft.util.ResourceLocation; - import forestry.core.config.Constants; +import net.minecraft.util.ResourceLocation; public class ForestryResource extends ResourceLocation { diff --git a/src/main/java/forestry/core/render/ForestryStateMapper.java b/src/main/java/forestry/core/render/ForestryStateMapper.java index 1e3ab592e..89dcf2307 100644 --- a/src/main/java/forestry/core/render/ForestryStateMapper.java +++ b/src/main/java/forestry/core/render/ForestryStateMapper.java @@ -1,14 +1,13 @@ package forestry.core.render; -import com.google.common.collect.Maps; - import java.util.Map; import java.util.Map.Entry; +import com.google.common.collect.Maps; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.statemap.IStateMapper; import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.client.renderer.block.statemap.IStateMapper; public abstract class ForestryStateMapper implements IStateMapper { @@ -36,5 +35,5 @@ public abstract class ForestryStateMapper implements IStateMapper { return stringbuilder.toString(); } - + } diff --git a/src/main/java/forestry/core/render/ParticleHelper.java b/src/main/java/forestry/core/render/ParticleHelper.java index 1834925a1..68ed0d56c 100644 --- a/src/main/java/forestry/core/render/ParticleHelper.java +++ b/src/main/java/forestry/core/render/ParticleHelper.java @@ -10,6 +10,7 @@ ******************************************************************************/ package forestry.core.render; +import forestry.core.proxy.Proxies; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; @@ -24,12 +25,9 @@ import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.core.proxy.Proxies; - /** * @author CovertJaguar */ @@ -38,7 +36,7 @@ public class ParticleHelper { @SideOnly(Side.CLIENT) public static boolean addBlockHitEffects(World world, BlockPos pos, EnumFacing side, ParticleManager effectRenderer, Callback callback) { IBlockState iblockstate = world.getBlockState(pos); - if(iblockstate.getRenderType() != EnumBlockRenderType.INVISIBLE) { + if (iblockstate.getRenderType() != EnumBlockRenderType.INVISIBLE) { int x = pos.getX(); int y = pos.getY(); int z = pos.getZ(); @@ -47,27 +45,27 @@ public class ParticleHelper { double px = x + world.rand.nextDouble() * (axisalignedbb.maxX - axisalignedbb.minX - f * 2.0F) + f + axisalignedbb.minX; double py = y + world.rand.nextDouble() * (axisalignedbb.maxY - axisalignedbb.minY - f * 2.0F) + f + axisalignedbb.minY; double pz = z + world.rand.nextDouble() * (axisalignedbb.maxZ - axisalignedbb.minZ - f * 2.0F) + f + axisalignedbb.minZ; - if(side == EnumFacing.DOWN) { + if (side == EnumFacing.DOWN) { py = y + axisalignedbb.minY - f; } - if(side == EnumFacing.UP) { + if (side == EnumFacing.UP) { py = y + axisalignedbb.maxY + f; } - if(side == EnumFacing.NORTH) { + if (side == EnumFacing.NORTH) { pz = z + axisalignedbb.minZ - f; } - if(side == EnumFacing.SOUTH) { + if (side == EnumFacing.SOUTH) { pz = z + axisalignedbb.maxZ + f; } - if(side == EnumFacing.WEST) { + if (side == EnumFacing.WEST) { px = x + axisalignedbb.minX - f; } - if(side == EnumFacing.EAST) { + if (side == EnumFacing.EAST) { px = x + axisalignedbb.maxX + f; } @@ -93,7 +91,7 @@ public class ParticleHelper { if (block != state.getBlock()) { return true; } - + byte iterations = 4; for (int i = 0; i < iterations; ++i) { for (int j = 0; j < iterations; ++j) { diff --git a/src/main/java/forestry/core/render/RenderAnalyzer.java b/src/main/java/forestry/core/render/RenderAnalyzer.java index 6fe459ac2..274a6b78c 100755 --- a/src/main/java/forestry/core/render/RenderAnalyzer.java +++ b/src/main/java/forestry/core/render/RenderAnalyzer.java @@ -12,6 +12,10 @@ package forestry.core.render; import javax.annotation.Nullable; +import forestry.apiculture.render.ModelAnalyzer; +import forestry.core.blocks.BlockBase; +import forestry.core.proxy.Proxies; +import forestry.core.tiles.TileAnalyzer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderManager; @@ -21,11 +25,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import forestry.apiculture.render.ModelAnalyzer; -import forestry.core.blocks.BlockBase; -import forestry.core.proxy.Proxies; -import forestry.core.tiles.TileAnalyzer; - public class RenderAnalyzer extends TileEntitySpecialRenderer { private final ModelAnalyzer model; @@ -35,7 +34,7 @@ public class RenderAnalyzer extends TileEntitySpecialRenderer { public RenderAnalyzer(String baseTexture) { this.model = new ModelAnalyzer(baseTexture); } - + /** * @param analyzer If it null its render the item else it render the tile entity. */ @@ -76,7 +75,7 @@ public class RenderAnalyzer extends TileEntitySpecialRenderer { dummyEntityItem.onUpdate(); } RenderManager rendermanager = Proxies.common.getClientInstance().getRenderManager(); - + rendermanager.doRenderEntity(dummyEntityItem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F, false); GlStateManager.popMatrix(); diff --git a/src/main/java/forestry/core/render/RenderMill.java b/src/main/java/forestry/core/render/RenderMill.java index 22e7316a4..12ccd6bfd 100755 --- a/src/main/java/forestry/core/render/RenderMill.java +++ b/src/main/java/forestry/core/render/RenderMill.java @@ -10,6 +10,8 @@ ******************************************************************************/ package forestry.core.render; +import forestry.core.proxy.Proxies; +import forestry.core.tiles.TileMill; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.renderer.GlStateManager; @@ -17,9 +19,6 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; -import forestry.core.proxy.Proxies; -import forestry.core.tiles.TileMill; - public class RenderMill extends TileEntitySpecialRenderer { private enum Textures {PEDESTAL, EXTENSION, BLADE_1, BLADE_2, CHARGE} @@ -78,7 +77,7 @@ public class RenderMill extends TileEntitySpecialRenderer { public RenderMill(String baseTexture, byte charges) { this(baseTexture); } - + /** * @param mill If it null its render the item else it render the tile entity. */ diff --git a/src/main/java/forestry/core/render/RenderNaturalistChest.java b/src/main/java/forestry/core/render/RenderNaturalistChest.java index e5f7906e3..707b527f5 100644 --- a/src/main/java/forestry/core/render/RenderNaturalistChest.java +++ b/src/main/java/forestry/core/render/RenderNaturalistChest.java @@ -10,16 +10,15 @@ ******************************************************************************/ package forestry.core.render; +import forestry.core.blocks.BlockBase; +import forestry.core.config.Constants; +import forestry.core.tiles.TileNaturalistChest; import net.minecraft.block.state.IBlockState; import net.minecraft.client.model.ModelChest; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; - -import forestry.core.blocks.BlockBase; -import forestry.core.config.Constants; -import forestry.core.tiles.TileNaturalistChest; import net.minecraft.world.World; public class RenderNaturalistChest extends TileEntitySpecialRenderer { @@ -30,7 +29,7 @@ public class RenderNaturalistChest extends TileEntitySpecialRenderer * Combine this with Forestry's access permissions to implement isItemValidForSlot. */ boolean canSlotAccept(int slotIndex, ItemStack itemStack); diff --git a/src/main/java/forestry/core/tiles/ILiquidTankTile.java b/src/main/java/forestry/core/tiles/ILiquidTankTile.java index 341830ff9..05dd8df6c 100644 --- a/src/main/java/forestry/core/tiles/ILiquidTankTile.java +++ b/src/main/java/forestry/core/tiles/ILiquidTankTile.java @@ -11,7 +11,6 @@ package forestry.core.tiles; import forestry.api.core.ILocatable; - import forestry.core.fluids.ITankManager; public interface ILiquidTankTile extends ILocatable { diff --git a/src/main/java/forestry/core/tiles/TileBase.java b/src/main/java/forestry/core/tiles/TileBase.java index b8b12b1b9..24ad89c23 100644 --- a/src/main/java/forestry/core/tiles/TileBase.java +++ b/src/main/java/forestry/core/tiles/TileBase.java @@ -14,6 +14,10 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; +import forestry.core.blocks.BlockBase; +import forestry.core.config.Config; +import forestry.core.gui.GuiHandler; +import forestry.core.gui.IHintSource; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -21,11 +25,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.core.blocks.BlockBase; -import forestry.core.config.Config; -import forestry.core.gui.GuiHandler; -import forestry.core.gui.IHintSource; - public abstract class TileBase extends TileForestry implements IHintSource { protected final List hints; diff --git a/src/main/java/forestry/core/tiles/TileEscritoire.java b/src/main/java/forestry/core/tiles/TileEscritoire.java index b50486f63..cdf2de30c 100644 --- a/src/main/java/forestry/core/tiles/TileEscritoire.java +++ b/src/main/java/forestry/core/tiles/TileEscritoire.java @@ -12,14 +12,7 @@ package forestry.core.tiles; import java.io.IOException; -import forestry.core.network.PacketBufferForestry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - import com.mojang.authlib.GameProfile; - import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IIndividual; @@ -29,9 +22,14 @@ import forestry.core.inventory.InventoryAnalyzer; import forestry.core.inventory.InventoryEscritoire; import forestry.core.inventory.watchers.ISlotPickupWatcher; import forestry.core.network.IStreamableGui; +import forestry.core.network.PacketBufferForestry; import forestry.core.network.packets.PacketItemStackDisplay; import forestry.core.proxy.Proxies; import forestry.core.utils.InventoryUtil; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; public class TileEscritoire extends TileBase implements ISidedInventory, ISlotPickupWatcher, IStreamableGui, IItemStackDisplay { @@ -50,7 +48,7 @@ public class TileEscritoire extends TileBase implements ISidedInventory, ISlotPi game.readFromNBT(nbttagcompound); } - + @Override public NBTTagCompound writeToNBT(NBTTagCompound nbttagcompound) { nbttagcompound = super.writeToNBT(nbttagcompound); @@ -118,20 +116,20 @@ public class TileEscritoire extends TileBase implements ISidedInventory, ISlotPi public void readGuiData(PacketBufferForestry data) throws IOException { game.readData(data); } - + @Override public void writeData(PacketBufferForestry data) { super.writeData(data); ItemStack displayStack = getIndividualOnDisplay(); data.writeItemStack(displayStack); } - + @Override public void readData(PacketBufferForestry data) throws IOException { super.readData(data); individualOnDisplayClient = data.readItemStack(); } - + /* ISlotPickupWatcher */ @Override public void onTake(int slotIndex, EntityPlayer player) { @@ -141,16 +139,16 @@ public class TileEscritoire extends TileBase implements ISidedInventory, ISlotPi Proxies.net.sendNetworkPacket(packet, pos, world); } } - + @Override - public void setInventorySlotContents(int slotIndex, ItemStack itemstack) { + public void setInventorySlotContents(int slotIndex, ItemStack itemstack) { super.setInventorySlotContents(slotIndex, itemstack); if (slotIndex == InventoryEscritoire.SLOT_ANALYZE) { PacketItemStackDisplay packet = new PacketItemStackDisplay(this, getIndividualOnDisplay()); Proxies.net.sendNetworkPacket(packet, pos, world); } } - + @Override public Object getGui(EntityPlayer player, int data) { return new GuiEscritoire(player, this); @@ -160,7 +158,7 @@ public class TileEscritoire extends TileBase implements ISidedInventory, ISlotPi public Object getContainer(EntityPlayer player, int data) { return new ContainerEscritoire(player, this); } - + @Override public void handleItemStackForDisplay(ItemStack itemStack) { if (!ItemStack.areItemStacksEqual(itemStack, individualOnDisplayClient)) { @@ -168,7 +166,7 @@ public class TileEscritoire extends TileBase implements ISidedInventory, ISlotPi world.markBlockRangeForRenderUpdate(getPos(), getPos()); } } - + public ItemStack getIndividualOnDisplay() { if (world.isRemote) { return individualOnDisplayClient; diff --git a/src/main/java/forestry/core/tiles/TileUtil.java b/src/main/java/forestry/core/tiles/TileUtil.java index 461807aeb..1538035ad 100644 --- a/src/main/java/forestry/core/tiles/TileUtil.java +++ b/src/main/java/forestry/core/tiles/TileUtil.java @@ -20,7 +20,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.wrapper.InvWrapper; @@ -38,7 +37,7 @@ public abstract class TileUtil { } @Nullable - public static T getTile( IBlockAccess world, BlockPos pos, Class tileClass) { + public static T getTile(IBlockAccess world, BlockPos pos, Class tileClass) { TileEntity tileEntity = world.getTileEntity(pos); if (tileClass.isInstance(tileEntity)) { return tileClass.cast(tileEntity); diff --git a/src/main/java/forestry/core/utils/CamouflageUtil.java b/src/main/java/forestry/core/utils/CamouflageUtil.java index 8e204d8d8..79ef99791 100644 --- a/src/main/java/forestry/core/utils/CamouflageUtil.java +++ b/src/main/java/forestry/core/utils/CamouflageUtil.java @@ -90,8 +90,7 @@ public class CamouflageUtil { if (tile instanceof ICamouflageHandler) { ICamouflageHandler tileHandler = (ICamouflageHandler) tile; camouflageStack = tileHandler.getCamouflageBlock(type); - } - else if (tile instanceof IMultiblockComponent) { + } else if (tile instanceof IMultiblockComponent) { IMultiblockComponent component = (IMultiblockComponent) tile; IMultiblockController controller = component.getMultiblockLogic().getController(); if (controller.isAssembled() && controller instanceof ICamouflageHandler) { diff --git a/src/main/java/forestry/core/utils/ClimateUtil.java b/src/main/java/forestry/core/utils/ClimateUtil.java index 1f27ba741..9a93856e9 100644 --- a/src/main/java/forestry/core/utils/ClimateUtil.java +++ b/src/main/java/forestry/core/utils/ClimateUtil.java @@ -10,7 +10,6 @@ ******************************************************************************/ package forestry.core.utils; -import java.io.IOException; import java.util.ArrayList; import java.util.Locale; diff --git a/src/main/java/forestry/core/utils/InventoryUtil.java b/src/main/java/forestry/core/utils/InventoryUtil.java index 08f9abb2c..4eedd2aab 100644 --- a/src/main/java/forestry/core/utils/InventoryUtil.java +++ b/src/main/java/forestry/core/utils/InventoryUtil.java @@ -13,6 +13,12 @@ package forestry.core.utils; import javax.annotation.Nullable; import java.util.Collection; +import forestry.api.core.ForestryAPI; +import forestry.core.circuits.ISocketable; +import forestry.core.inventory.ItemHandlerInventoryManipulator; +import forestry.core.inventory.StandardStackFilters; +import forestry.core.tiles.AdjacentTileCache; +import forestry.plugins.ForestryPluginUids; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -23,19 +29,11 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.fml.common.Optional; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.oredict.OreDictionary; -import forestry.api.core.ForestryAPI; -import forestry.core.circuits.ISocketable; -import forestry.core.inventory.StandardStackFilters; -import forestry.core.inventory.ItemHandlerInventoryManipulator; -import forestry.core.tiles.AdjacentTileCache; -import forestry.plugins.ForestryPluginUids; - public abstract class InventoryUtil { public static boolean isWildcard(ItemStack stack) { @@ -357,7 +355,7 @@ public abstract class InventoryUtil { if (success && doAdd) { addStack(inventory, stack, startSlot, slots, true); } - + return success; } @@ -523,7 +521,7 @@ public abstract class InventoryUtil { inventory.setInventorySlotContents(slot, ItemStack.EMPTY); } } - + public static void dropInventory(IInventory inventory, World world, BlockPos pos) { dropInventory(inventory, world, pos.getX(), pos.getY(), pos.getZ()); } @@ -535,7 +533,7 @@ public abstract class InventoryUtil { socketable.setSocket(slot, ItemStack.EMPTY); } } - + public static void dropSockets(ISocketable socketable, World world, BlockPos pos) { dropSockets(socketable, world, pos.getX(), pos.getY(), pos.getZ()); } @@ -578,7 +576,7 @@ public abstract class InventoryUtil { inventory.setInventorySlotContents(index, new ItemStack(nbttagcompound2)); } } - + public static void writeToNBT(IInventory inventory, NBTTagCompound nbttagcompound) { NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < inventory.getSizeInventory(); i++) { diff --git a/src/main/java/forestry/core/utils/Log.java b/src/main/java/forestry/core/utils/Log.java index 7e5450eea..d57ee2560 100644 --- a/src/main/java/forestry/core/utils/Log.java +++ b/src/main/java/forestry/core/utils/Log.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.core.utils; +import forestry.core.config.Constants; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; -import forestry.core.config.Constants; - public class Log { public static void trace(String message, Object... params) { diff --git a/src/main/java/forestry/core/utils/ModUtil.java b/src/main/java/forestry/core/utils/ModUtil.java index aa02e791b..e3b7c8bd6 100644 --- a/src/main/java/forestry/core/utils/ModUtil.java +++ b/src/main/java/forestry/core/utils/ModUtil.java @@ -57,7 +57,7 @@ public abstract class ModUtil { /** * Checks to see if an API within a specific version range is loaded. * - * @param apiName the package name of the package-info.java file to check. (for example "cofh.api.energy") + * @param apiName the package name of the package-info.java file to check. (for example "cofh.api.energy") * @param versionRangeString the version range, as defined in {@link VersionParser}. */ public static boolean isAPILoaded(String apiName, @Nullable String versionRangeString) { diff --git a/src/main/java/forestry/core/utils/OreDictUtil.java b/src/main/java/forestry/core/utils/OreDictUtil.java index ad12c00a9..07f8c5f45 100644 --- a/src/main/java/forestry/core/utils/OreDictUtil.java +++ b/src/main/java/forestry/core/utils/OreDictUtil.java @@ -66,7 +66,7 @@ public class OreDictUtil { public static final String GEM_QUARTZ = "gemQuartz"; public static final String CHEST_WOOD = "chestWood"; public static final String LEATHER = "leather"; - + public static final String DYE_YELLOW = "dyeYellow"; public static final String DYE_BLUE = "dyeBlue"; public static final String DYE_RED = "dyeRed"; diff --git a/src/main/java/forestry/core/utils/StringUtil.java b/src/main/java/forestry/core/utils/StringUtil.java index 61985faaa..c7906939c 100755 --- a/src/main/java/forestry/core/utils/StringUtil.java +++ b/src/main/java/forestry/core/utils/StringUtil.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.core.utils; +import forestry.core.proxy.Proxies; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; -import forestry.core.proxy.Proxies; - public class StringUtil { public static String append(String delim, String source, String appendix) { diff --git a/src/main/java/forestry/core/utils/datastructures/ItemStackMap.java b/src/main/java/forestry/core/utils/datastructures/ItemStackMap.java index c2f47dd59..48d4c5816 100644 --- a/src/main/java/forestry/core/utils/datastructures/ItemStackMap.java +++ b/src/main/java/forestry/core/utils/datastructures/ItemStackMap.java @@ -12,7 +12,6 @@ package forestry.core.utils.datastructures; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; - import net.minecraftforge.oredict.OreDictionary; public class ItemStackMap extends StackMap { diff --git a/src/main/java/forestry/core/utils/datastructures/RevolvingList.java b/src/main/java/forestry/core/utils/datastructures/RevolvingList.java index 07fa48d74..2d0f57240 100644 --- a/src/main/java/forestry/core/utils/datastructures/RevolvingList.java +++ b/src/main/java/forestry/core/utils/datastructures/RevolvingList.java @@ -11,13 +11,12 @@ package forestry.core.utils.datastructures; import javax.annotation.Nullable; - -import com.google.common.collect.ForwardingCollection; - import java.util.Collection; import java.util.Deque; import java.util.LinkedList; +import com.google.common.collect.ForwardingCollection; + /** * @param * @author CovertJaguar diff --git a/src/main/java/forestry/core/utils/datastructures/StackMap.java b/src/main/java/forestry/core/utils/datastructures/StackMap.java index 889097a93..c9c24765b 100644 --- a/src/main/java/forestry/core/utils/datastructures/StackMap.java +++ b/src/main/java/forestry/core/utils/datastructures/StackMap.java @@ -24,7 +24,7 @@ import com.google.common.base.Preconditions; * @author Alex Binnie */ public abstract class StackMap extends HashMap { - + @Override public final T put(P key, T value) { Preconditions.checkArgument(isValidKey(key), "Key is invalid"); @@ -71,7 +71,7 @@ public abstract class StackMap extends HashMap { * @return */ protected abstract boolean areEqual(P a, Object b); - + /** * Can this key be added to the map * diff --git a/src/main/java/forestry/core/worldgen/WorldGenerator.java b/src/main/java/forestry/core/worldgen/WorldGenerator.java index 5cafafa83..1e48e2620 100644 --- a/src/main/java/forestry/core/worldgen/WorldGenerator.java +++ b/src/main/java/forestry/core/worldgen/WorldGenerator.java @@ -13,24 +13,22 @@ package forestry.core.worldgen; import javax.annotation.Nullable; import java.util.Random; +import forestry.core.PluginCore; +import forestry.core.blocks.BlockResourceOre; +import forestry.core.blocks.EnumResourceType; +import forestry.core.config.Config; +import forestry.plugins.PluginManager; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; - import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.fml.common.IWorldGenerator; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import forestry.core.PluginCore; -import forestry.core.blocks.BlockResourceOre; -import forestry.core.blocks.EnumResourceType; -import forestry.core.config.Config; -import forestry.plugins.PluginManager; - public class WorldGenerator implements IWorldGenerator { @Nullable private WorldGenMinable apatiteGenerator; diff --git a/src/main/java/forestry/energy/EnergyHelper.java b/src/main/java/forestry/energy/EnergyHelper.java index b1d592d0c..a21101bbf 100644 --- a/src/main/java/forestry/energy/EnergyHelper.java +++ b/src/main/java/forestry/energy/EnergyHelper.java @@ -20,7 +20,7 @@ public class EnergyHelper { * @return true if the energy to do work was consumed */ public static boolean consumeEnergyToDoWork(EnergyManager energyManager, int ticksPerWorkCycle, int energyPerWorkCycle) { - if(energyPerWorkCycle == 0){ + if (energyPerWorkCycle == 0) { return true; } int energyPerCycle = (int) Math.ceil(energyPerWorkCycle / (float) ticksPerWorkCycle); @@ -53,7 +53,7 @@ public class EnergyHelper { int extractable = energyManager.extractEnergy(amount, true); if (extractable > 0) { EnumFacing side = orientation.getOpposite(); - final int sent = sendEnergyToTile(tile, side, extractable, simulate); + final int sent = sendEnergyToTile(tile, side, extractable, simulate); energyManager.extractEnergy(sent, simulate); return sent; } diff --git a/src/main/java/forestry/energy/PluginEnergy.java b/src/main/java/forestry/energy/PluginEnergy.java index f74e77dd0..1c80a1966 100644 --- a/src/main/java/forestry/energy/PluginEnergy.java +++ b/src/main/java/forestry/energy/PluginEnergy.java @@ -13,12 +13,6 @@ package forestry.energy; import javax.annotation.Nullable; import com.google.common.base.Preconditions; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fml.common.SidedProxy; - import forestry.api.core.ForestryAPI; import forestry.core.config.Constants; import forestry.core.recipes.RecipeUtil; @@ -27,6 +21,10 @@ import forestry.energy.proxy.ProxyEnergy; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.SidedProxy; @ForestryPlugin(pluginID = ForestryPluginUids.ENERGY, name = "Energy", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.energy.description") public class PluginEnergy extends BlankForestryPlugin { diff --git a/src/main/java/forestry/energy/gui/BiogasSlot.java b/src/main/java/forestry/energy/gui/BiogasSlot.java index 54692ada3..07138068e 100644 --- a/src/main/java/forestry/energy/gui/BiogasSlot.java +++ b/src/main/java/forestry/energy/gui/BiogasSlot.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.energy.gui; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidTank; - import forestry.core.gui.tooltips.ToolTip; import forestry.core.gui.widgets.ReservoirWidget; import forestry.core.gui.widgets.WidgetManager; import forestry.core.utils.Translator; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidTank; public class BiogasSlot extends ReservoirWidget { public BiogasSlot(WidgetManager manager, int xPos, int yPos, int slot) { diff --git a/src/main/java/forestry/energy/gui/ContainerEngineBiogas.java b/src/main/java/forestry/energy/gui/ContainerEngineBiogas.java index b28e71252..cc4698022 100644 --- a/src/main/java/forestry/energy/gui/ContainerEngineBiogas.java +++ b/src/main/java/forestry/energy/gui/ContainerEngineBiogas.java @@ -10,12 +10,12 @@ ******************************************************************************/ package forestry.energy.gui; -import net.minecraft.entity.player.InventoryPlayer; import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.slots.SlotLiquidIn; import forestry.core.network.packets.PacketGuiUpdate; import forestry.energy.inventory.InventoryEngineBiogas; import forestry.energy.tiles.TileEngineBiogas; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerEngineBiogas extends ContainerLiquidTanks { diff --git a/src/main/java/forestry/energy/gui/ContainerEnginePeat.java b/src/main/java/forestry/energy/gui/ContainerEnginePeat.java index 9aefecfa7..28794356d 100644 --- a/src/main/java/forestry/energy/gui/ContainerEnginePeat.java +++ b/src/main/java/forestry/energy/gui/ContainerEnginePeat.java @@ -10,12 +10,12 @@ ******************************************************************************/ package forestry.energy.gui; -import net.minecraft.entity.player.InventoryPlayer; import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotOutput; import forestry.core.network.packets.PacketGuiUpdate; import forestry.energy.tiles.TileEnginePeat; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerEnginePeat extends ContainerTile { diff --git a/src/main/java/forestry/energy/gui/GuiEngineBiogas.java b/src/main/java/forestry/energy/gui/GuiEngineBiogas.java index 524f78436..05589ea52 100644 --- a/src/main/java/forestry/energy/gui/GuiEngineBiogas.java +++ b/src/main/java/forestry/energy/gui/GuiEngineBiogas.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.energy.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.widgets.TankWidget; import forestry.energy.tiles.TileEngineBiogas; +import net.minecraft.entity.player.InventoryPlayer; public class GuiEngineBiogas extends GuiEngine { public GuiEngineBiogas(InventoryPlayer inventory, TileEngineBiogas tile) { diff --git a/src/main/java/forestry/energy/gui/GuiEnginePeat.java b/src/main/java/forestry/energy/gui/GuiEnginePeat.java index 83dd75f16..3ab267aaf 100644 --- a/src/main/java/forestry/energy/gui/GuiEnginePeat.java +++ b/src/main/java/forestry/energy/gui/GuiEnginePeat.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.energy.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.energy.tiles.TileEnginePeat; +import net.minecraft.entity.player.InventoryPlayer; public class GuiEnginePeat extends GuiEngine { diff --git a/src/main/java/forestry/energy/proxy/ProxyEnergy.java b/src/main/java/forestry/energy/proxy/ProxyEnergy.java index c14c59eb8..74450d564 100755 --- a/src/main/java/forestry/energy/proxy/ProxyEnergy.java +++ b/src/main/java/forestry/energy/proxy/ProxyEnergy.java @@ -12,9 +12,8 @@ package forestry.energy.proxy; import javax.annotation.Nullable; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; - import forestry.core.tiles.TileEngine; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; public class ProxyEnergy { @Nullable diff --git a/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java b/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java index 3261c0db6..405542afc 100644 --- a/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java +++ b/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.energy.proxy; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; - import forestry.core.tiles.TileEngine; import forestry.energy.render.RenderEngine; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @SuppressWarnings("unused") public class ProxyEnergyClient extends ProxyEnergy { diff --git a/src/main/java/forestry/energy/render/RenderEngine.java b/src/main/java/forestry/energy/render/RenderEngine.java index 9d66dd0a7..c4c2a76de 100755 --- a/src/main/java/forestry/energy/render/RenderEngine.java +++ b/src/main/java/forestry/energy/render/RenderEngine.java @@ -12,6 +12,12 @@ package forestry.energy.render; import javax.annotation.Nullable; +import forestry.core.blocks.BlockBase; +import forestry.core.config.Constants; +import forestry.core.proxy.Proxies; +import forestry.core.render.ForestryResource; +import forestry.core.tiles.TemperatureState; +import forestry.core.tiles.TileEngine; import net.minecraft.block.state.IBlockState; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; @@ -19,13 +25,6 @@ import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; - -import forestry.core.blocks.BlockBase; -import forestry.core.config.Constants; -import forestry.core.proxy.Proxies; -import forestry.core.render.ForestryResource; -import forestry.core.tiles.TemperatureState; -import forestry.core.tiles.TileEngine; import net.minecraft.world.World; public class RenderEngine extends TileEntitySpecialRenderer { @@ -87,7 +86,7 @@ public class RenderEngine extends TileEntitySpecialRenderer { new ForestryResource(Constants.TEXTURE_PATH_BLOCKS + "/engine_trunk_medium.png"), new ForestryResource(Constants.TEXTURE_PATH_BLOCKS + "/engine_trunk_low.png"),}; } - + @Override public void renderTileEntityAt(@Nullable TileEngine engine, double x, double y, double z, float partialTicks, int destroyStage) { if (engine != null) { diff --git a/src/main/java/forestry/energy/tiles/TileEngineClockwork.java b/src/main/java/forestry/energy/tiles/TileEngineClockwork.java index fa25c352f..43676f57a 100644 --- a/src/main/java/forestry/energy/tiles/TileEngineClockwork.java +++ b/src/main/java/forestry/energy/tiles/TileEngineClockwork.java @@ -12,33 +12,31 @@ package forestry.energy.tiles; import javax.annotation.Nullable; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import net.minecraftforge.common.util.FakePlayer; - import forestry.core.config.Constants; import forestry.core.tiles.TemperatureState; import forestry.core.tiles.TileEngine; import forestry.core.utils.DamageSourceForestry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.FakePlayer; public class TileEngineClockwork extends TileEngine { private final static float WIND_EXHAUSTION = 0.05f; private final static float WIND_TENSION_BASE = 0.5f; private final static int WIND_DELAY = 10; - + private static final int ENGINE_CLOCKWORK_HEAT_MAX = 300000; private static final int ENGINE_CLOCKWORK_ENERGY_PER_CYCLE = 2; private static final float ENGINE_CLOCKWORK_WIND_MAX = 8f; private static final DamageSourceForestry damageSourceEngineClockwork = new DamageSourceForestry("engine.clockwork"); - + private float tension = 0.0f; private short delay = 0; - + public TileEngineClockwork() { super(null, ENGINE_CLOCKWORK_HEAT_MAX, 10000); } @@ -52,7 +50,7 @@ public class TileEngineClockwork extends TileEngine { if (player instanceof FakePlayer) { return; } - + if (tension <= 0) { tension = WIND_TENSION_BASE; } else if (tension < ENGINE_CLOCKWORK_WIND_MAX + WIND_TENSION_BASE) { @@ -60,7 +58,7 @@ public class TileEngineClockwork extends TileEngine { } else { return; } - + player.addExhaustion(WIND_EXHAUSTION); if (tension > ENGINE_CLOCKWORK_WIND_MAX + 0.1 * WIND_TENSION_BASE) { player.attackEntityFrom(damageSourceEngineClockwork, 6); @@ -76,15 +74,15 @@ public class TileEngineClockwork extends TileEngine { super.readFromNBT(nbttagcompound); tension = nbttagcompound.getFloat("Wound"); } - - + + @Override public NBTTagCompound writeToNBT(NBTTagCompound nbttagcompound) { nbttagcompound = super.writeToNBT(nbttagcompound); nbttagcompound.setFloat("Wound", tension); return nbttagcompound; } - + @Override public boolean isRedstoneActivated() { return true; @@ -107,18 +105,18 @@ public class TileEngineClockwork extends TileEngine { @Override public void burn() { - + heat = (int) (tension * 10000); - + if (delay > 0) { delay--; return; } - + if (!isBurning()) { return; } - + if (tension > 0.01f) { tension *= 0.9995f; } else { @@ -146,7 +144,7 @@ public class TileEngineClockwork extends TileEngine { if (delay > 0) { return 0; } - + float fromClockwork = tension / ENGINE_CLOCKWORK_WIND_MAX * Constants.ENGINE_PISTON_SPEED_MAX; fromClockwork = Math.round(fromClockwork * 100f) / 100f; diff --git a/src/main/java/forestry/factory/DummyManagers.java b/src/main/java/forestry/factory/DummyManagers.java index 0dca0f7c4..e99a8221a 100644 --- a/src/main/java/forestry/factory/DummyManagers.java +++ b/src/main/java/forestry/factory/DummyManagers.java @@ -10,17 +10,11 @@ ******************************************************************************/ package forestry.factory; -import com.google.common.collect.ImmutableSet; - import javax.annotation.Nullable; import java.util.Map; import java.util.Set; -import net.minecraft.item.ItemStack; - -import net.minecraft.util.NonNullList; -import net.minecraftforge.fluids.FluidStack; - +import com.google.common.collect.ImmutableSet; import forestry.api.recipes.ICarpenterManager; import forestry.api.recipes.ICarpenterRecipe; import forestry.api.recipes.ICentrifugeManager; @@ -39,6 +33,9 @@ import forestry.api.recipes.ISqueezerManager; import forestry.api.recipes.ISqueezerRecipe; import forestry.api.recipes.IStillManager; import forestry.api.recipes.IStillRecipe; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraftforge.fluids.FluidStack; public class DummyManagers { diff --git a/src/main/java/forestry/factory/PluginFactory.java b/src/main/java/forestry/factory/PluginFactory.java index 73da25c79..265db17ce 100644 --- a/src/main/java/forestry/factory/PluginFactory.java +++ b/src/main/java/forestry/factory/PluginFactory.java @@ -57,7 +57,6 @@ import forestry.factory.recipes.FermenterRecipeManager; import forestry.factory.recipes.MoistenerRecipeManager; import forestry.factory.recipes.SqueezerRecipeManager; import forestry.factory.recipes.StillRecipeManager; -import forestry.factory.triggers.FactoryTriggers; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; diff --git a/src/main/java/forestry/factory/gui/ContainerBottler.java b/src/main/java/forestry/factory/gui/ContainerBottler.java index 9e20645ca..91c5331b3 100755 --- a/src/main/java/forestry/factory/gui/ContainerBottler.java +++ b/src/main/java/forestry/factory/gui/ContainerBottler.java @@ -10,20 +10,19 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.slots.SlotEmptyLiquidContainerIn; import forestry.core.gui.slots.SlotLiquidIn; import forestry.core.gui.slots.SlotOutput; import forestry.factory.inventory.InventoryBottler; import forestry.factory.tiles.TileBottler; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerBottler extends ContainerLiquidTanks { public ContainerBottler(InventoryPlayer player, TileBottler tile) { super(tile, player, 8, 84); - + this.addSlotToContainer(new SlotLiquidIn(tile, InventoryBottler.SLOT_INPUT_FULL_CONTAINER, 18, 7)); this.addSlotToContainer(new SlotOutput(tile, InventoryBottler.SLOT_EMPTYING_PROCESSING, 18, 35).setPickupWatcher(tile)); this.addSlotToContainer(new SlotOutput(tile, InventoryBottler.SLOT_OUTPUT_EMPTY_CONTAINER, 18, 63)); diff --git a/src/main/java/forestry/factory/gui/ContainerCarpenter.java b/src/main/java/forestry/factory/gui/ContainerCarpenter.java index face474fb..6d22674b2 100755 --- a/src/main/java/forestry/factory/gui/ContainerCarpenter.java +++ b/src/main/java/forestry/factory/gui/ContainerCarpenter.java @@ -10,11 +10,6 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.IContainerCrafting; import forestry.core.gui.slots.SlotCraftMatrix; @@ -25,6 +20,10 @@ import forestry.core.gui.slots.SlotOutput; import forestry.core.network.packets.PacketItemStackDisplay; import forestry.factory.inventory.InventoryCarpenter; import forestry.factory.tiles.TileCarpenter; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; public class ContainerCarpenter extends ContainerLiquidTanks implements IContainerCrafting { diff --git a/src/main/java/forestry/factory/gui/ContainerCentrifuge.java b/src/main/java/forestry/factory/gui/ContainerCentrifuge.java index 318b07c2e..62cf5213e 100755 --- a/src/main/java/forestry/factory/gui/ContainerCentrifuge.java +++ b/src/main/java/forestry/factory/gui/ContainerCentrifuge.java @@ -10,15 +10,15 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; import forestry.core.gui.ContainerSocketed; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotLocked; import forestry.core.gui.slots.SlotOutput; import forestry.core.network.packets.PacketItemStackDisplay; import forestry.factory.tiles.TileCentrifuge; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; public class ContainerCentrifuge extends ContainerSocketed { @@ -30,7 +30,7 @@ public class ContainerCentrifuge extends ContainerSocketed { // Craft Preview display addSlotToContainer(new SlotLocked(tile.getCraftPreviewInventory(), 0, 49, 37)); - + // Product Inventory for (int l = 0; l < 3; l++) { for (int k = 0; k < 3; k++) { @@ -38,7 +38,7 @@ public class ContainerCentrifuge extends ContainerSocketed { } } } - + private ItemStack oldCraftPreview = ItemStack.EMPTY; @Override diff --git a/src/main/java/forestry/factory/gui/ContainerFabricator.java b/src/main/java/forestry/factory/gui/ContainerFabricator.java index adbd23e88..989c731c0 100755 --- a/src/main/java/forestry/factory/gui/ContainerFabricator.java +++ b/src/main/java/forestry/factory/gui/ContainerFabricator.java @@ -10,11 +10,6 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; - import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.IContainerCrafting; import forestry.core.gui.slots.SlotCraftMatrix; @@ -23,6 +18,10 @@ import forestry.core.gui.slots.SlotOutput; import forestry.factory.inventory.InventoryFabricator; import forestry.factory.inventory.InventoryGhostCrafting; import forestry.factory.tiles.TileFabricator; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IContainerListener; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; public class ContainerFabricator extends ContainerLiquidTanks implements IContainerCrafting { @@ -73,8 +72,8 @@ public class ContainerFabricator extends ContainerLiquidTanks im tile.sendGUINetworkData(this, crafter); } } - - public TileFabricator getFabricator(){ + + public TileFabricator getFabricator() { return tile; } } diff --git a/src/main/java/forestry/factory/gui/ContainerFermenter.java b/src/main/java/forestry/factory/gui/ContainerFermenter.java index 45dc4e9f8..dea3ed7ca 100755 --- a/src/main/java/forestry/factory/gui/ContainerFermenter.java +++ b/src/main/java/forestry/factory/gui/ContainerFermenter.java @@ -10,9 +10,6 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IContainerListener; - import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.slots.SlotEmptyLiquidContainerIn; import forestry.core.gui.slots.SlotFiltered; @@ -20,6 +17,8 @@ import forestry.core.gui.slots.SlotLiquidIn; import forestry.core.gui.slots.SlotOutput; import forestry.factory.inventory.InventoryFermenter; import forestry.factory.tiles.TileFermenter; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IContainerListener; public class ContainerFermenter extends ContainerLiquidTanks { diff --git a/src/main/java/forestry/factory/gui/ContainerMoistener.java b/src/main/java/forestry/factory/gui/ContainerMoistener.java index 2e9a65488..3ab390d53 100755 --- a/src/main/java/forestry/factory/gui/ContainerMoistener.java +++ b/src/main/java/forestry/factory/gui/ContainerMoistener.java @@ -10,16 +10,15 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraft.inventory.IInventory; - import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotWatched; import forestry.core.gui.slots.SlotWorking; import forestry.core.inventory.watchers.ISlotChangeWatcher; import forestry.factory.tiles.TileMoistener; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IContainerListener; +import net.minecraft.inventory.IInventory; public class ContainerMoistener extends ContainerLiquidTanks implements ISlotChangeWatcher { diff --git a/src/main/java/forestry/factory/gui/ContainerRaintank.java b/src/main/java/forestry/factory/gui/ContainerRaintank.java index 343529eb9..140fc459b 100755 --- a/src/main/java/forestry/factory/gui/ContainerRaintank.java +++ b/src/main/java/forestry/factory/gui/ContainerRaintank.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IContainerListener; - import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.slots.SlotEmptyLiquidContainerIn; import forestry.core.gui.slots.SlotOutput; import forestry.factory.inventory.InventoryRaintank; import forestry.factory.tiles.TileRaintank; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IContainerListener; public class ContainerRaintank extends ContainerLiquidTanks { diff --git a/src/main/java/forestry/factory/gui/ContainerSqueezer.java b/src/main/java/forestry/factory/gui/ContainerSqueezer.java index 1c02def00..9797537bf 100755 --- a/src/main/java/forestry/factory/gui/ContainerSqueezer.java +++ b/src/main/java/forestry/factory/gui/ContainerSqueezer.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.gui.ContainerLiquidTanksSocketed; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotLiquidIn; import forestry.core.gui.slots.SlotOutput; import forestry.factory.inventory.InventorySqueezer; import forestry.factory.tiles.TileSqueezer; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerSqueezer extends ContainerLiquidTanksSocketed { diff --git a/src/main/java/forestry/factory/gui/ContainerStill.java b/src/main/java/forestry/factory/gui/ContainerStill.java index 680b72864..03a5822d6 100755 --- a/src/main/java/forestry/factory/gui/ContainerStill.java +++ b/src/main/java/forestry/factory/gui/ContainerStill.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.gui.ContainerLiquidTanks; import forestry.core.gui.slots.SlotEmptyLiquidContainerIn; import forestry.core.gui.slots.SlotLiquidIn; import forestry.core.gui.slots.SlotOutput; import forestry.factory.inventory.InventoryStill; import forestry.factory.tiles.TileStill; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerStill extends ContainerLiquidTanks { diff --git a/src/main/java/forestry/factory/gui/ContainerWorktable.java b/src/main/java/forestry/factory/gui/ContainerWorktable.java index 3ac1c10ef..567e76793 100755 --- a/src/main/java/forestry/factory/gui/ContainerWorktable.java +++ b/src/main/java/forestry/factory/gui/ContainerWorktable.java @@ -10,12 +10,6 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - import forestry.core.gui.ContainerTile; import forestry.core.gui.IContainerCrafting; import forestry.core.gui.IGuiSelectable; @@ -33,6 +27,11 @@ import forestry.factory.network.packets.PacketWorktableRecipeUpdate; import forestry.factory.recipes.MemorizedRecipe; import forestry.factory.recipes.RecipeMemory; import forestry.factory.tiles.TileWorktable; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; public class ContainerWorktable extends ContainerTile implements IContainerCrafting, IGuiSelectable { private final InventoryCraftingForestry craftMatrix = new InventoryCraftingForestry(this); diff --git a/src/main/java/forestry/factory/gui/GuiCarpenter.java b/src/main/java/forestry/factory/gui/GuiCarpenter.java index 02546be98..ec6915eac 100755 --- a/src/main/java/forestry/factory/gui/GuiCarpenter.java +++ b/src/main/java/forestry/factory/gui/GuiCarpenter.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.TankWidget; import forestry.factory.tiles.TileCarpenter; +import net.minecraft.entity.player.InventoryPlayer; public class GuiCarpenter extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/gui/GuiCentrifuge.java b/src/main/java/forestry/factory/gui/GuiCentrifuge.java index a5a6a516a..d5c00408d 100755 --- a/src/main/java/forestry/factory/gui/GuiCentrifuge.java +++ b/src/main/java/forestry/factory/gui/GuiCentrifuge.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.SocketWidget; import forestry.factory.tiles.TileCentrifuge; +import net.minecraft.entity.player.InventoryPlayer; public class GuiCentrifuge extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/gui/GuiFabricator.java b/src/main/java/forestry/factory/gui/GuiFabricator.java index d87b8b03e..261ee4d96 100755 --- a/src/main/java/forestry/factory/gui/GuiFabricator.java +++ b/src/main/java/forestry/factory/gui/GuiFabricator.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.ReservoirWidget; import forestry.factory.tiles.TileFabricator; +import net.minecraft.entity.player.InventoryPlayer; public class GuiFabricator extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/gui/GuiFermenter.java b/src/main/java/forestry/factory/gui/GuiFermenter.java index 8988d6ea3..9a461a06f 100755 --- a/src/main/java/forestry/factory/gui/GuiFermenter.java +++ b/src/main/java/forestry/factory/gui/GuiFermenter.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.TankWidget; import forestry.factory.tiles.TileFermenter; +import net.minecraft.entity.player.InventoryPlayer; public class GuiFermenter extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/gui/GuiMoistener.java b/src/main/java/forestry/factory/gui/GuiMoistener.java index 959e54ee5..02c7ad53b 100755 --- a/src/main/java/forestry/factory/gui/GuiMoistener.java +++ b/src/main/java/forestry/factory/gui/GuiMoistener.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.TankWidget; import forestry.factory.tiles.TileMoistener; +import net.minecraft.entity.player.InventoryPlayer; public class GuiMoistener extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/gui/GuiRaintank.java b/src/main/java/forestry/factory/gui/GuiRaintank.java index 6e7522087..2ddcb6206 100755 --- a/src/main/java/forestry/factory/gui/GuiRaintank.java +++ b/src/main/java/forestry/factory/gui/GuiRaintank.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.TankWidget; import forestry.factory.tiles.TileRaintank; +import net.minecraft.entity.player.InventoryPlayer; public class GuiRaintank extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/gui/GuiSqueezer.java b/src/main/java/forestry/factory/gui/GuiSqueezer.java index bd6083103..0fee3c506 100755 --- a/src/main/java/forestry/factory/gui/GuiSqueezer.java +++ b/src/main/java/forestry/factory/gui/GuiSqueezer.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.SocketWidget; import forestry.core.gui.widgets.TankWidget; import forestry.factory.tiles.TileSqueezer; +import net.minecraft.entity.player.InventoryPlayer; public class GuiSqueezer extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/gui/GuiStill.java b/src/main/java/forestry/factory/gui/GuiStill.java index e53321745..d807dfedd 100755 --- a/src/main/java/forestry/factory/gui/GuiStill.java +++ b/src/main/java/forestry/factory/gui/GuiStill.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.TankWidget; import forestry.factory.tiles.TileStill; +import net.minecraft.entity.player.InventoryPlayer; public class GuiStill extends GuiForestryTitled { diff --git a/src/main/java/forestry/factory/inventory/InventoryBottler.java b/src/main/java/forestry/factory/inventory/InventoryBottler.java index 47cb119d7..57687fa2c 100644 --- a/src/main/java/forestry/factory/inventory/InventoryBottler.java +++ b/src/main/java/forestry/factory/inventory/InventoryBottler.java @@ -10,16 +10,14 @@ ******************************************************************************/ package forestry.factory.inventory; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; - -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidUtil; - import forestry.core.fluids.FluidHelper; import forestry.core.inventory.InventoryAdapterTile; import forestry.factory.tiles.TileBottler; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidUtil; public class InventoryBottler extends InventoryAdapterTile { public static final short SLOT_INPUT_FULL_CONTAINER = 0; diff --git a/src/main/java/forestry/factory/inventory/InventoryCraftingForestry.java b/src/main/java/forestry/factory/inventory/InventoryCraftingForestry.java index e018553e3..8a8aed0b1 100644 --- a/src/main/java/forestry/factory/inventory/InventoryCraftingForestry.java +++ b/src/main/java/forestry/factory/inventory/InventoryCraftingForestry.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.factory.inventory; -import net.minecraft.inventory.InventoryCrafting; - import forestry.core.gui.ContainerDummy; import forestry.factory.gui.ContainerWorktable; +import net.minecraft.inventory.InventoryCrafting; public class InventoryCraftingForestry extends InventoryCrafting { public InventoryCraftingForestry(ContainerWorktable containerWorktable) { diff --git a/src/main/java/forestry/factory/inventory/InventoryFermenter.java b/src/main/java/forestry/factory/inventory/InventoryFermenter.java index 7e9f1e5ed..65e434241 100644 --- a/src/main/java/forestry/factory/inventory/InventoryFermenter.java +++ b/src/main/java/forestry/factory/inventory/InventoryFermenter.java @@ -37,7 +37,7 @@ public class InventoryFermenter extends InventoryAdapterTile { return FermenterRecipeManager.isResource(itemStack); } else if (slotIndex == SLOT_INPUT) { FluidStack fluid = FluidUtil.getFluidContained(itemStack); - return fluid != null && tile.getTankManager().canFillFluidType(fluid); + return fluid != null && tile.getTankManager().canFillFluidType(fluid); } else if (slotIndex == SLOT_CAN_INPUT) { return FluidHelper.isFillableContainerWithRoom(itemStack); } else if (slotIndex == SLOT_FUEL) { diff --git a/src/main/java/forestry/factory/inventory/InventoryGhostCrafting.java b/src/main/java/forestry/factory/inventory/InventoryGhostCrafting.java index f0ad78733..b2484ab17 100644 --- a/src/main/java/forestry/factory/inventory/InventoryGhostCrafting.java +++ b/src/main/java/forestry/factory/inventory/InventoryGhostCrafting.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.factory.inventory; -import net.minecraft.tileentity.TileEntity; - import forestry.core.inventory.InventoryAdapterTile; +import net.minecraft.tileentity.TileEntity; public class InventoryGhostCrafting extends InventoryAdapterTile { public final static int SLOT_CRAFTING_1 = 0; diff --git a/src/main/java/forestry/factory/inventory/InventoryWorktable.java b/src/main/java/forestry/factory/inventory/InventoryWorktable.java index e4623719e..334828a55 100644 --- a/src/main/java/forestry/factory/inventory/InventoryWorktable.java +++ b/src/main/java/forestry/factory/inventory/InventoryWorktable.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.factory.inventory; -import net.minecraft.item.ItemStack; - import forestry.core.inventory.InventoryAdapterTile; import forestry.core.utils.SlotUtil; import forestry.factory.tiles.TileWorktable; +import net.minecraft.item.ItemStack; public class InventoryWorktable extends InventoryAdapterTile { public final static short SLOT_INVENTORY_1 = 0; diff --git a/src/main/java/forestry/factory/recipes/CarpenterRecipe.java b/src/main/java/forestry/factory/recipes/CarpenterRecipe.java index c4f7ba5e8..e9556367f 100644 --- a/src/main/java/forestry/factory/recipes/CarpenterRecipe.java +++ b/src/main/java/forestry/factory/recipes/CarpenterRecipe.java @@ -13,13 +13,11 @@ package forestry.factory.recipes; import javax.annotation.Nullable; import com.google.common.base.Preconditions; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.ICarpenterRecipe; import forestry.api.recipes.IDescriptiveRecipe; import forestry.core.recipes.ShapedRecipeCustom; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; public class CarpenterRecipe implements ICarpenterRecipe { diff --git a/src/main/java/forestry/factory/recipes/CarpenterRecipeManager.java b/src/main/java/forestry/factory/recipes/CarpenterRecipeManager.java index 5f1fca298..9b6d6d4b2 100644 --- a/src/main/java/forestry/factory/recipes/CarpenterRecipeManager.java +++ b/src/main/java/forestry/factory/recipes/CarpenterRecipeManager.java @@ -15,18 +15,16 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.ICarpenterManager; import forestry.api.recipes.ICarpenterRecipe; import forestry.api.recipes.IDescriptiveRecipe; import forestry.core.recipes.RecipeUtil; import forestry.core.recipes.ShapedRecipeCustom; import forestry.core.utils.ItemStackUtil; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; public class CarpenterRecipeManager implements ICarpenterManager { @@ -59,7 +57,7 @@ public class CarpenterRecipeManager implements ICarpenterManager { return null; } - public static boolean matches(@Nullable ICarpenterRecipe recipe, @Nullable FluidStack resource, ItemStack item, IInventory inventoryCrafting) { + public static boolean matches(@Nullable ICarpenterRecipe recipe, @Nullable FluidStack resource, ItemStack item, IInventory inventoryCrafting) { if (recipe == null) { return false; } diff --git a/src/main/java/forestry/factory/recipes/CentrifugeRecipe.java b/src/main/java/forestry/factory/recipes/CentrifugeRecipe.java index 7fdce1a73..ff20e2311 100644 --- a/src/main/java/forestry/factory/recipes/CentrifugeRecipe.java +++ b/src/main/java/forestry/factory/recipes/CentrifugeRecipe.java @@ -10,17 +10,15 @@ ******************************************************************************/ package forestry.factory.recipes; -import com.google.common.collect.ImmutableMap; - import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Random; -import net.minecraft.item.ItemStack; - +import com.google.common.collect.ImmutableMap; import forestry.api.recipes.ICentrifugeRecipe; +import net.minecraft.item.ItemStack; public class CentrifugeRecipe implements ICentrifugeRecipe { diff --git a/src/main/java/forestry/factory/recipes/CentrifugeRecipeManager.java b/src/main/java/forestry/factory/recipes/CentrifugeRecipeManager.java index c4dfc01d0..7ba69b4b8 100644 --- a/src/main/java/forestry/factory/recipes/CentrifugeRecipeManager.java +++ b/src/main/java/forestry/factory/recipes/CentrifugeRecipeManager.java @@ -16,11 +16,10 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import net.minecraft.item.ItemStack; - import forestry.api.recipes.ICentrifugeManager; import forestry.api.recipes.ICentrifugeRecipe; import forestry.core.utils.ItemStackUtil; +import net.minecraft.item.ItemStack; public class CentrifugeRecipeManager implements ICentrifugeManager { diff --git a/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipe.java b/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipe.java index 611fcc812..35e2365f4 100644 --- a/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipe.java +++ b/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipe.java @@ -11,11 +11,9 @@ package forestry.factory.recipes; import com.google.common.base.Preconditions; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.IFabricatorSmeltingRecipe; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; public class FabricatorSmeltingRecipe implements IFabricatorSmeltingRecipe { diff --git a/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipeManager.java b/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipeManager.java index 96a3b0027..647eb38a8 100644 --- a/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipeManager.java +++ b/src/main/java/forestry/factory/recipes/FabricatorSmeltingRecipeManager.java @@ -16,13 +16,11 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.IFabricatorSmeltingManager; import forestry.api.recipes.IFabricatorSmeltingRecipe; import forestry.core.utils.ItemStackUtil; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; public class FabricatorSmeltingRecipeManager implements IFabricatorSmeltingManager { public static final Set recipes = new HashSet<>(); diff --git a/src/main/java/forestry/factory/recipes/FermenterRecipe.java b/src/main/java/forestry/factory/recipes/FermenterRecipe.java index 466254642..cb3b387f9 100644 --- a/src/main/java/forestry/factory/recipes/FermenterRecipe.java +++ b/src/main/java/forestry/factory/recipes/FermenterRecipe.java @@ -11,13 +11,11 @@ package forestry.factory.recipes; import com.google.common.base.Preconditions; +import forestry.api.recipes.IFermenterRecipe; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import forestry.api.recipes.IFermenterRecipe; - public class FermenterRecipe implements IFermenterRecipe { private final ItemStack resource; diff --git a/src/main/java/forestry/factory/recipes/FermenterRecipeManager.java b/src/main/java/forestry/factory/recipes/FermenterRecipeManager.java index d05852f68..6736ef7a7 100644 --- a/src/main/java/forestry/factory/recipes/FermenterRecipeManager.java +++ b/src/main/java/forestry/factory/recipes/FermenterRecipeManager.java @@ -15,15 +15,13 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.IFermenterManager; import forestry.api.recipes.IFermenterRecipe; import forestry.core.utils.ItemStackUtil; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; public class FermenterRecipeManager implements IFermenterManager { diff --git a/src/main/java/forestry/factory/recipes/MoistenerRecipe.java b/src/main/java/forestry/factory/recipes/MoistenerRecipe.java index 81fd5c5a9..b0d210504 100644 --- a/src/main/java/forestry/factory/recipes/MoistenerRecipe.java +++ b/src/main/java/forestry/factory/recipes/MoistenerRecipe.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.factory.recipes; -import net.minecraft.item.ItemStack; - import forestry.api.recipes.IMoistenerRecipe; +import net.minecraft.item.ItemStack; public class MoistenerRecipe implements IMoistenerRecipe { diff --git a/src/main/java/forestry/factory/recipes/MoistenerRecipeManager.java b/src/main/java/forestry/factory/recipes/MoistenerRecipeManager.java index ed7cba3b2..26ced6423 100644 --- a/src/main/java/forestry/factory/recipes/MoistenerRecipeManager.java +++ b/src/main/java/forestry/factory/recipes/MoistenerRecipeManager.java @@ -15,11 +15,10 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import net.minecraft.item.ItemStack; - import forestry.api.recipes.IMoistenerManager; import forestry.api.recipes.IMoistenerRecipe; import forestry.core.utils.ItemStackUtil; +import net.minecraft.item.ItemStack; public class MoistenerRecipeManager implements IMoistenerManager { diff --git a/src/main/java/forestry/factory/recipes/SqueezerRecipe.java b/src/main/java/forestry/factory/recipes/SqueezerRecipe.java index de33d7905..04f9deb0c 100644 --- a/src/main/java/forestry/factory/recipes/SqueezerRecipe.java +++ b/src/main/java/forestry/factory/recipes/SqueezerRecipe.java @@ -11,13 +11,11 @@ package forestry.factory.recipes; import com.google.common.base.Preconditions; +import forestry.api.recipes.ISqueezerRecipe; import net.minecraft.item.ItemStack; - import net.minecraft.util.NonNullList; import net.minecraftforge.fluids.FluidStack; -import forestry.api.recipes.ISqueezerRecipe; - public class SqueezerRecipe implements ISqueezerRecipe { private final int processingTime; diff --git a/src/main/java/forestry/factory/recipes/SqueezerRecipeManager.java b/src/main/java/forestry/factory/recipes/SqueezerRecipeManager.java index e5585adb0..d869cabf8 100644 --- a/src/main/java/forestry/factory/recipes/SqueezerRecipeManager.java +++ b/src/main/java/forestry/factory/recipes/SqueezerRecipeManager.java @@ -15,16 +15,14 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import net.minecraft.item.ItemStack; - -import net.minecraft.util.NonNullList; -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.ISqueezerManager; import forestry.api.recipes.ISqueezerRecipe; import forestry.core.fluids.FluidHelper; import forestry.core.utils.ItemStackUtil; import forestry.core.utils.datastructures.ItemStackMap; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraftforge.fluids.FluidStack; public class SqueezerRecipeManager implements ISqueezerManager { diff --git a/src/main/java/forestry/factory/recipes/StillRecipe.java b/src/main/java/forestry/factory/recipes/StillRecipe.java index 825ab6af3..f9f13a388 100644 --- a/src/main/java/forestry/factory/recipes/StillRecipe.java +++ b/src/main/java/forestry/factory/recipes/StillRecipe.java @@ -11,9 +11,8 @@ package forestry.factory.recipes; import com.google.common.base.Preconditions; -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.IStillRecipe; +import net.minecraftforge.fluids.FluidStack; public class StillRecipe implements IStillRecipe { private final int timePerUnit; diff --git a/src/main/java/forestry/factory/recipes/StillRecipeManager.java b/src/main/java/forestry/factory/recipes/StillRecipeManager.java index 22d139111..11d40c872 100644 --- a/src/main/java/forestry/factory/recipes/StillRecipeManager.java +++ b/src/main/java/forestry/factory/recipes/StillRecipeManager.java @@ -15,11 +15,10 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - import forestry.api.recipes.IStillManager; import forestry.api.recipes.IStillRecipe; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; public class StillRecipeManager implements IStillManager { diff --git a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java index d27c60601..0c64a70d6 100644 --- a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java @@ -19,14 +19,14 @@ public class BottlerRecipeCategory extends ForestryRecipeCategory getCarpenterRecipes() { List recipes = new ArrayList<>(); for (ICarpenterRecipe recipe : RecipeManagers.carpenterManager.recipes()) { @@ -18,5 +18,5 @@ public class CarpenterRecipeMaker { } return recipes; } - + } diff --git a/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeTransferHandler.java b/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeTransferHandler.java index cf896651c..88c206c7b 100644 --- a/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeTransferHandler.java +++ b/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeTransferHandler.java @@ -23,18 +23,18 @@ public class CarpenterRecipeTransferHandler implements IRecipeTransferHandler items = NonNullList.withSize(9, ItemStack.EMPTY); - for(Entry> guiIngredientEntry : recipeLayout.getItemStacks().getGuiIngredients().entrySet()){ + for (Entry> guiIngredientEntry : recipeLayout.getItemStacks().getGuiIngredients().entrySet()) { IGuiIngredient guiIngredient = guiIngredientEntry.getValue(); - if(guiIngredient != null && guiIngredient.getDisplayedIngredient() != null){ + if (guiIngredient != null && guiIngredient.getDisplayedIngredient() != null) { int index = guiIngredientEntry.getKey(); if (index >= 2) { - ItemStack ingredient = guiIngredient.getDisplayedIngredient().copy(); - craftingInventory.setInventorySlotContents(index - 2, ingredient); - items.set(index - 2, ingredient); - } + ItemStack ingredient = guiIngredient.getDisplayedIngredient().copy(); + craftingInventory.setInventorySlotContents(index - 2, ingredient); + items.set(index - 2, ingredient); + } } } Proxies.net.sendToServer(new PacketRecipeTransferRequest(container.getCarpenter(), items)); diff --git a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java index 31303ae83..44f173ac7 100644 --- a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java +++ b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java @@ -10,7 +10,7 @@ public class CentrifugeRecipeMaker { private CentrifugeRecipeMaker() { } - + public static List getCentrifugeRecipe() { List recipes = new ArrayList<>(); for (ICentrifugeRecipe recipe : RecipeManagers.centrifugeManager.recipes()) { @@ -18,5 +18,5 @@ public class CentrifugeRecipeMaker { } return recipes; } - + } diff --git a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java index b6fee042d..a2c4ec940 100644 --- a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java +++ b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java @@ -10,7 +10,7 @@ public class FabricatorRecipeMaker { private FabricatorRecipeMaker() { } - + public static List getFabricatorRecipes() { List recipes = new ArrayList<>(); for (IFabricatorRecipe recipe : RecipeManagers.fabricatorManager.recipes()) { @@ -18,5 +18,5 @@ public class FabricatorRecipeMaker { } return recipes; } - + } diff --git a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeMaker.java index 2f02d38ea..84d2087f1 100644 --- a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeMaker.java +++ b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeMaker.java @@ -3,19 +3,18 @@ package forestry.factory.recipes.jei.fermenter; import java.util.ArrayList; import java.util.List; -import net.minecraft.item.ItemStack; - import forestry.api.recipes.IFermenterRecipe; import forestry.api.recipes.IVariableFermentable; import forestry.api.recipes.RecipeManagers; import forestry.core.utils.Log; import mezz.jei.api.recipe.IStackHelper; +import net.minecraft.item.ItemStack; public class FermenterRecipeMaker { private FermenterRecipeMaker() { } - + public static List getFermenterRecipes(IStackHelper stackHelper) { List recipes = new ArrayList<>(); for (IFermenterRecipe recipe : RecipeManagers.fermenterManager.recipes()) { @@ -33,5 +32,5 @@ public class FermenterRecipeMaker { } return recipes; } - + } diff --git a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java index 1c7f1c3de..4674c60d5 100644 --- a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java +++ b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java @@ -2,7 +2,6 @@ package forestry.factory.recipes.jei.moistener; import forestry.api.recipes.IMoistenerRecipe; import forestry.core.recipes.jei.ForestryRecipeCategoryUid; - import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; @@ -13,17 +12,17 @@ public class MoistenerRecipeHandler implements IRecipeHandler 0; } diff --git a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeMaker.java index 66cf94e9a..c48d0df01 100644 --- a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeMaker.java +++ b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeMaker.java @@ -12,7 +12,7 @@ public class MoistenerRecipeMaker { private MoistenerRecipeMaker() { } - + public static List getMoistenerRecipes() { List recipes = new ArrayList<>(); for (IMoistenerRecipe recipe : RecipeManagers.moistenerManager.recipes()) { @@ -22,5 +22,5 @@ public class MoistenerRecipeMaker { } return recipes; } - + } diff --git a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeWrapper.java b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeWrapper.java index d27f741c2..1c45634fb 100644 --- a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeWrapper.java +++ b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeWrapper.java @@ -13,14 +13,14 @@ import net.minecraftforge.fluids.FluidStack; public class MoistenerRecipeWrapper extends ForestryRecipeWrapper { private final MoistenerFuel fuel; - - public MoistenerRecipeWrapper( IMoistenerRecipe recipe, MoistenerFuel fuel) { + + public MoistenerRecipeWrapper(IMoistenerRecipe recipe, MoistenerFuel fuel) { super(recipe); this.fuel = fuel; } @Override - public void getIngredients( IIngredients ingredients) { + public void getIngredients(IIngredients ingredients) { IMoistenerRecipe recipe = getRecipe(); List itemStackInputs = new ArrayList<>(); @@ -37,7 +37,7 @@ public class MoistenerRecipeWrapper extends ForestryRecipeWrapper getStillRecipes() { List recipes = new ArrayList<>(); for (IStillRecipe recipe : RecipeManagers.stillManager.recipes()) { @@ -18,5 +18,5 @@ public class StillRecipeMaker { } return recipes; } - + } diff --git a/src/main/java/forestry/factory/triggers/FactoryTriggers.java b/src/main/java/forestry/factory/triggers/FactoryTriggers.java index cb8c6bb8e..800e12a82 100644 --- a/src/main/java/forestry/factory/triggers/FactoryTriggers.java +++ b/src/main/java/forestry/factory/triggers/FactoryTriggers.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.factory.triggers; -import forestry.core.triggers.Trigger; - public class FactoryTriggers { // public static Trigger lowResource25; // public static Trigger lowResource10; diff --git a/src/main/java/forestry/farming/blocks/BlockFarm.java b/src/main/java/forestry/farming/blocks/BlockFarm.java index f732e5627..bf2df635a 100644 --- a/src/main/java/forestry/farming/blocks/BlockFarm.java +++ b/src/main/java/forestry/farming/blocks/BlockFarm.java @@ -14,7 +14,20 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; +import forestry.api.core.IModelManager; +import forestry.api.core.Tabs; +import forestry.core.blocks.BlockStructure; +import forestry.core.blocks.properties.UnlistedBlockAccess; +import forestry.core.blocks.properties.UnlistedBlockPos; import forestry.core.tiles.TileUtil; +import forestry.core.utils.ItemStackUtil; +import forestry.farming.models.EnumFarmBlockTexture; +import forestry.farming.tiles.TileFarm; +import forestry.farming.tiles.TileFarmControl; +import forestry.farming.tiles.TileFarmGearbox; +import forestry.farming.tiles.TileFarmHatch; +import forestry.farming.tiles.TileFarmPlain; +import forestry.farming.tiles.TileFarmValve; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; @@ -35,7 +48,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; - import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.property.ExtendedBlockState; import net.minecraftforge.common.property.IExtendedBlockState; @@ -43,24 +55,10 @@ import net.minecraftforge.common.property.IUnlistedProperty; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.core.IModelManager; -import forestry.api.core.Tabs; -import forestry.core.blocks.BlockStructure; -import forestry.core.blocks.properties.UnlistedBlockAccess; -import forestry.core.blocks.properties.UnlistedBlockPos; -import forestry.core.utils.ItemStackUtil; -import forestry.farming.models.EnumFarmBlockTexture; -import forestry.farming.tiles.TileFarm; -import forestry.farming.tiles.TileFarmControl; -import forestry.farming.tiles.TileFarmGearbox; -import forestry.farming.tiles.TileFarmHatch; -import forestry.farming.tiles.TileFarmPlain; -import forestry.farming.tiles.TileFarmValve; - public class BlockFarm extends BlockStructure { public static final PropertyEnum META = PropertyEnum.create("meta", EnumFarmBlockType.class); - + public BlockFarm() { super(Material.ROCK); setHardness(1.0f); @@ -68,7 +66,7 @@ public class BlockFarm extends BlockStructure { setDefaultState(blockState.getBaseState().withProperty(META, EnumFarmBlockType.PLAIN)); setCreativeTab(Tabs.tabAgriculture); } - + @Override public IBlockState getStateFromMeta(int meta) { @@ -117,11 +115,11 @@ public class BlockFarm extends BlockStructure { } return drops.get(0); } - + @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { super.onBlockPlacedBy(world, pos, state, placer, stack); - + if (stack.getTagCompound() == null) { return; } @@ -142,7 +140,7 @@ public class BlockFarm extends BlockStructure { } return world.setBlockToAir(pos); } - + @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { ArrayList drops = new ArrayList<>(); @@ -182,12 +180,12 @@ public class BlockFarm extends BlockStructure { public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } - + @SideOnly(Side.CLIENT) @Override public void registerModel(Item item, IModelManager manager) { - for(int i = 0;i < 6;i++){ - if(i == 1){ + for (int i = 0; i < 6; i++) { + if (i == 1) { continue; } ModelLoader.setCustomModelResourceLocation(item, i, new ModelResourceLocation("forestry:ffarm", "inventory")); diff --git a/src/main/java/forestry/farming/blocks/BlockMushroom.java b/src/main/java/forestry/farming/blocks/BlockMushroom.java index 71e4d56c5..94f754fee 100644 --- a/src/main/java/forestry/farming/blocks/BlockMushroom.java +++ b/src/main/java/forestry/farming/blocks/BlockMushroom.java @@ -15,6 +15,9 @@ import java.util.List; import java.util.Locale; import java.util.Random; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; +import forestry.core.config.Constants; import net.minecraft.block.BlockBush; import net.minecraft.block.BlockDirt; import net.minecraft.block.IGrowable; @@ -36,19 +39,14 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenBigMushroom; import net.minecraft.world.gen.feature.WorldGenerator; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.core.IItemModelRegister; -import forestry.api.core.IModelManager; -import forestry.core.config.Constants; - public class BlockMushroom extends BlockBush implements IItemModelRegister, IGrowable { public static final PropertyEnum VARIANT = PropertyEnum.create("mushroom", MushroomType.class); public static final PropertyBool MATURE = PropertyBool.create("mature"); - + public enum MushroomType implements IStringSerializable { BROWN { @Override @@ -64,7 +62,7 @@ public class BlockMushroom extends BlockBush implements IItemModelRegister, IGro }; public abstract ItemStack getDrop(); - + @Override public String getName() { return name().toLowerCase(Locale.ENGLISH); @@ -81,7 +79,7 @@ public class BlockMushroom extends BlockBush implements IItemModelRegister, IGro setTickRandomly(true); setSoundType(SoundType.PLANT); } - + @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, VARIANT, MATURE); @@ -128,7 +126,7 @@ public class BlockMushroom extends BlockBush implements IItemModelRegister, IGro return false; } } - + @Override public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { if (world.isRemote || rand.nextInt(2) != 0) { @@ -154,7 +152,7 @@ public class BlockMushroom extends BlockBush implements IItemModelRegister, IGro world.setBlockState(pos, getStateFromMeta(type.ordinal()), 0); } } - + public void grow(World worldIn, BlockPos pos, IBlockState state, Random rand) { this.generateGiantMushroom(worldIn, pos, state, rand); } @@ -171,7 +169,7 @@ public class BlockMushroom extends BlockBush implements IItemModelRegister, IGro manager.registerItemModel(item, 0, "minecraft", "brown_mushroom"); manager.registerItemModel(item, 1, "minecraft", "red_mushroom"); } - + @Override public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean isClient) { return true; diff --git a/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java b/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java index 31f7e6a14..7a77bf51b 100644 --- a/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java +++ b/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java @@ -4,17 +4,15 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; +import forestry.core.config.Constants; +import forestry.core.proxy.Proxies; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IStringSerializable; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.core.config.Constants; -import forestry.core.proxy.Proxies; - public enum EnumFarmBlockType implements IStringSerializable { PLAIN, BAND, @@ -22,9 +20,9 @@ public enum EnumFarmBlockType implements IStringSerializable { HATCH, VALVE, CONTROL; - + public static final EnumFarmBlockType[] VALUES = values(); - + private static final int TYPE_PLAIN = 0; private static final int TYPE_REVERSE = 1; private static final int TYPE_TOP = 2; @@ -51,7 +49,7 @@ public enum EnumFarmBlockType implements IStringSerializable { map.registerSprite(new ResourceLocation(Constants.MOD_ID, "blocks/farm/control")) ); } - + /** * @return The texture sprite from the type of the farm block */ @@ -81,10 +79,10 @@ public enum EnumFarmBlockType implements IStringSerializable { return sprites.get(TYPE_PLAIN); } } - + @Override public String getName() { return name().toLowerCase(Locale.ENGLISH); } - + } diff --git a/src/main/java/forestry/farming/gui/ContainerFarm.java b/src/main/java/forestry/farming/gui/ContainerFarm.java index 52911661f..4889e7302 100755 --- a/src/main/java/forestry/farming/gui/ContainerFarm.java +++ b/src/main/java/forestry/farming/gui/ContainerFarm.java @@ -10,10 +10,6 @@ ******************************************************************************/ package forestry.farming.gui; -import net.minecraft.entity.player.InventoryPlayer; - -import net.minecraftforge.fluids.IFluidTank; - import forestry.core.gui.ContainerSocketed; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotLiquidIn; @@ -21,6 +17,8 @@ import forestry.core.gui.slots.SlotOutput; import forestry.core.network.packets.PacketGuiUpdate; import forestry.farming.multiblock.InventoryFarm; import forestry.farming.tiles.TileFarm; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fluids.IFluidTank; public class ContainerFarm extends ContainerSocketed { diff --git a/src/main/java/forestry/farming/gui/FarmLogicSlot.java b/src/main/java/forestry/farming/gui/FarmLogicSlot.java index d8f64991b..a4036fc0c 100644 --- a/src/main/java/forestry/farming/gui/FarmLogicSlot.java +++ b/src/main/java/forestry/farming/gui/FarmLogicSlot.java @@ -10,9 +10,6 @@ ******************************************************************************/ package forestry.farming.gui; -import net.minecraft.client.renderer.RenderItem; -import net.minecraft.item.ItemStack; - import forestry.api.farming.FarmDirection; import forestry.api.farming.IFarmLogic; import forestry.core.gui.tooltips.ToolTip; @@ -20,6 +17,8 @@ import forestry.core.gui.widgets.Widget; import forestry.core.gui.widgets.WidgetManager; import forestry.core.proxy.Proxies; import forestry.farming.multiblock.IFarmControllerInternal; +import net.minecraft.client.renderer.RenderItem; +import net.minecraft.item.ItemStack; public class FarmLogicSlot extends Widget { @@ -35,7 +34,7 @@ public class FarmLogicSlot extends Widget { private IFarmLogic getLogic() { return farmController.getFarmLogic(farmDirection); } - + private ItemStack getStackIndex() { return getLogic().getIconItemStack(); } diff --git a/src/main/java/forestry/farming/gui/GuiFarm.java b/src/main/java/forestry/farming/gui/GuiFarm.java index 4724f6265..f03291892 100755 --- a/src/main/java/forestry/farming/gui/GuiFarm.java +++ b/src/main/java/forestry/farming/gui/GuiFarm.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.farming.gui; -import net.minecraft.entity.player.EntityPlayer; - import forestry.api.farming.FarmDirection; import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; @@ -20,6 +18,7 @@ import forestry.core.gui.widgets.SocketWidget; import forestry.core.gui.widgets.TankWidget; import forestry.farming.multiblock.IFarmControllerInternal; import forestry.farming.tiles.TileFarm; +import net.minecraft.entity.player.EntityPlayer; public class GuiFarm extends GuiForestryTitled { diff --git a/src/main/java/forestry/farming/items/ItemBlockFarm.java b/src/main/java/forestry/farming/items/ItemBlockFarm.java index 2d7b7c167..1272909f8 100644 --- a/src/main/java/forestry/farming/items/ItemBlockFarm.java +++ b/src/main/java/forestry/farming/items/ItemBlockFarm.java @@ -12,13 +12,12 @@ package forestry.farming.items; import java.util.List; +import forestry.farming.models.EnumFarmBlockTexture; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import forestry.farming.models.EnumFarmBlockTexture; - public class ItemBlockFarm extends ItemBlock { public ItemBlockFarm(Block block) { diff --git a/src/main/java/forestry/farming/logic/CropBasicAgriCraft.java b/src/main/java/forestry/farming/logic/CropBasicAgriCraft.java index c7758e68f..b17359173 100644 --- a/src/main/java/forestry/farming/logic/CropBasicAgriCraft.java +++ b/src/main/java/forestry/farming/logic/CropBasicAgriCraft.java @@ -10,6 +10,7 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.core.utils.BlockUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; @@ -17,8 +18,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.core.utils.BlockUtil; - public class CropBasicAgriCraft extends Crop { private final IBlockState blockState; diff --git a/src/main/java/forestry/farming/logic/CropBasicGrowthCraft.java b/src/main/java/forestry/farming/logic/CropBasicGrowthCraft.java index fff12e9c9..d3abbb68a 100644 --- a/src/main/java/forestry/farming/logic/CropBasicGrowthCraft.java +++ b/src/main/java/forestry/farming/logic/CropBasicGrowthCraft.java @@ -10,6 +10,9 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.core.config.Constants; +import forestry.core.network.packets.PacketFXSignal; +import forestry.core.proxy.Proxies; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; @@ -17,10 +20,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.core.config.Constants; -import forestry.core.network.packets.PacketFXSignal; -import forestry.core.proxy.Proxies; - public class CropBasicGrowthCraft extends Crop { private final IBlockState blockState; diff --git a/src/main/java/forestry/farming/logic/CropDestroy.java b/src/main/java/forestry/farming/logic/CropDestroy.java index 2422b7ff3..64a91350f 100644 --- a/src/main/java/forestry/farming/logic/CropDestroy.java +++ b/src/main/java/forestry/farming/logic/CropDestroy.java @@ -12,6 +12,9 @@ package forestry.farming.logic; import javax.annotation.Nullable; +import forestry.core.config.Constants; +import forestry.core.network.packets.PacketFXSignal; +import forestry.core.proxy.Proxies; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; @@ -19,10 +22,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.core.config.Constants; -import forestry.core.network.packets.PacketFXSignal; -import forestry.core.proxy.Proxies; - public class CropDestroy extends Crop { protected final IBlockState blockState; diff --git a/src/main/java/forestry/farming/logic/CropFruit.java b/src/main/java/forestry/farming/logic/CropFruit.java index e460a09b4..103036ce4 100755 --- a/src/main/java/forestry/farming/logic/CropFruit.java +++ b/src/main/java/forestry/farming/logic/CropFruit.java @@ -10,6 +10,9 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.genetics.IFruitBearer; +import forestry.core.network.packets.PacketFXSignal; +import forestry.core.proxy.Proxies; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -17,10 +20,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.genetics.IFruitBearer; -import forestry.core.network.packets.PacketFXSignal; -import forestry.core.proxy.Proxies; - public class CropFruit extends Crop { public CropFruit(World world, BlockPos position) { diff --git a/src/main/java/forestry/farming/logic/FarmLogicArboreal.java b/src/main/java/forestry/farming/logic/FarmLogicArboreal.java index a962ada95..fb20e3c49 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicArboreal.java +++ b/src/main/java/forestry/farming/logic/FarmLogicArboreal.java @@ -19,19 +19,18 @@ import java.util.Map; import java.util.Set; import java.util.Stack; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.farming.FarmDirection; import forestry.api.farming.Farmables; import forestry.api.farming.ICrop; import forestry.api.farming.IFarmHousing; import forestry.api.farming.IFarmable; import forestry.core.PluginCore; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class FarmLogicArboreal extends FarmLogicHomogeneous { public FarmLogicArboreal(ItemStack resource, IBlockState ground, Collection germlings) { diff --git a/src/main/java/forestry/farming/logic/FarmLogicCereal.java b/src/main/java/forestry/farming/logic/FarmLogicCereal.java index 0d48a0051..4f2828766 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicCereal.java +++ b/src/main/java/forestry/farming/logic/FarmLogicCereal.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.farming.Farmables; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import forestry.api.farming.Farmables; - public class FarmLogicCereal extends FarmLogicCrops { public FarmLogicCereal() { diff --git a/src/main/java/forestry/farming/logic/FarmLogicCocoa.java b/src/main/java/forestry/farming/logic/FarmLogicCocoa.java index 8332f0959..7188be2db 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicCocoa.java +++ b/src/main/java/forestry/farming/logic/FarmLogicCocoa.java @@ -19,6 +19,10 @@ import java.util.Map; import java.util.Set; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmHousing; +import forestry.api.farming.IFarmable; import net.minecraft.block.Block; import net.minecraft.block.BlockOldLog; import net.minecraft.block.BlockPlanks; @@ -31,11 +35,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmHousing; -import forestry.api.farming.IFarmable; - public class FarmLogicCocoa extends FarmLogic { private final IFarmable cocoa = new FarmableCocoa(); diff --git a/src/main/java/forestry/farming/logic/FarmLogicCrops.java b/src/main/java/forestry/farming/logic/FarmLogicCrops.java index 0dfa2399f..4e7f6f9ff 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicCrops.java +++ b/src/main/java/forestry/farming/logic/FarmLogicCrops.java @@ -14,6 +14,11 @@ import javax.annotation.Nonnull; import java.util.Collection; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmHousing; +import forestry.api.farming.IFarmable; +import forestry.core.utils.BlockUtil; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -21,12 +26,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmHousing; -import forestry.api.farming.IFarmable; -import forestry.core.utils.BlockUtil; - public abstract class FarmLogicCrops extends FarmLogicWatered { private final Iterable seeds; diff --git a/src/main/java/forestry/farming/logic/FarmLogicEnder.java b/src/main/java/forestry/farming/logic/FarmLogicEnder.java index bbb636df1..9ee78ce81 100644 --- a/src/main/java/forestry/farming/logic/FarmLogicEnder.java +++ b/src/main/java/forestry/farming/logic/FarmLogicEnder.java @@ -13,6 +13,12 @@ package forestry.farming.logic; import java.util.Collection; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.Farmables; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmHousing; +import forestry.api.farming.IFarmable; +import forestry.core.utils.BlockUtil; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -21,13 +27,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.Farmables; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmHousing; -import forestry.api.farming.IFarmable; -import forestry.core.utils.BlockUtil; - public class FarmLogicEnder extends FarmLogicHomogeneous { public FarmLogicEnder() { diff --git a/src/main/java/forestry/farming/logic/FarmLogicGourd.java b/src/main/java/forestry/farming/logic/FarmLogicGourd.java index 55d408c3d..6fd5dadb6 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicGourd.java +++ b/src/main/java/forestry/farming/logic/FarmLogicGourd.java @@ -13,6 +13,11 @@ package forestry.farming.logic; import java.util.Collection; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.Farmables; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmHousing; +import forestry.api.farming.IFarmable; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -20,12 +25,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.Farmables; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmHousing; -import forestry.api.farming.IFarmable; - public class FarmLogicGourd extends FarmLogic { private final IFarmable[] seeds; diff --git a/src/main/java/forestry/farming/logic/FarmLogicInfernal.java b/src/main/java/forestry/farming/logic/FarmLogicInfernal.java index ba5a94dc8..548fbf6bf 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicInfernal.java +++ b/src/main/java/forestry/farming/logic/FarmLogicInfernal.java @@ -13,6 +13,12 @@ package forestry.farming.logic; import java.util.Collection; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.Farmables; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmHousing; +import forestry.api.farming.IFarmable; +import forestry.core.utils.BlockUtil; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -21,13 +27,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.Farmables; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmHousing; -import forestry.api.farming.IFarmable; -import forestry.core.utils.BlockUtil; - public class FarmLogicInfernal extends FarmLogicHomogeneous { public FarmLogicInfernal() { diff --git a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java index 0854cda77..2041d2482 100644 --- a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java +++ b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java @@ -11,9 +11,6 @@ package forestry.farming.logic; import javax.annotation.Nullable; - -import com.google.common.collect.ImmutableList; - import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -22,14 +19,7 @@ import java.util.List; import java.util.Set; import java.util.Stack; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - +import com.google.common.collect.ImmutableList; import forestry.api.farming.FarmDirection; import forestry.api.farming.Farmables; import forestry.api.farming.ICrop; @@ -37,6 +27,13 @@ import forestry.api.farming.IFarmHousing; import forestry.api.farming.IFarmable; import forestry.api.genetics.IFruitBearer; import forestry.core.PluginCore; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class FarmLogicOrchard extends FarmLogic { diff --git a/src/main/java/forestry/farming/logic/FarmLogicPeat.java b/src/main/java/forestry/farming/logic/FarmLogicPeat.java index cd0cc9761..d2ae0d0a7 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicPeat.java +++ b/src/main/java/forestry/farming/logic/FarmLogicPeat.java @@ -13,17 +13,16 @@ package forestry.farming.logic; import java.util.Collection; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.ICrop; +import forestry.core.PluginCore; +import forestry.core.blocks.BlockBogEarth; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.ICrop; -import forestry.core.PluginCore; -import forestry.core.blocks.BlockBogEarth; - public class FarmLogicPeat extends FarmLogicWatered { private static final ItemStack bogEarth = PluginCore.blocks.bogEarth.get(BlockBogEarth.SoilType.BOG_EARTH, 1); diff --git a/src/main/java/forestry/farming/logic/FarmLogicReeds.java b/src/main/java/forestry/farming/logic/FarmLogicReeds.java index a551fc073..c1d74983d 100644 --- a/src/main/java/forestry/farming/logic/FarmLogicReeds.java +++ b/src/main/java/forestry/farming/logic/FarmLogicReeds.java @@ -13,6 +13,12 @@ package forestry.farming.logic; import java.util.Collection; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.Farmables; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmHousing; +import forestry.api.farming.IFarmable; +import forestry.core.utils.ItemStackUtil; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -21,13 +27,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.Farmables; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmHousing; -import forestry.api.farming.IFarmable; -import forestry.core.utils.ItemStackUtil; - public class FarmLogicReeds extends FarmLogic { private final Collection germlings = Farmables.farmables.get("farmPoales"); diff --git a/src/main/java/forestry/farming/logic/FarmLogicSucculent.java b/src/main/java/forestry/farming/logic/FarmLogicSucculent.java index 3f43d4f03..bc1fd87c1 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicSucculent.java +++ b/src/main/java/forestry/farming/logic/FarmLogicSucculent.java @@ -13,6 +13,12 @@ package forestry.farming.logic; import java.util.Collection; import java.util.Stack; +import forestry.api.farming.FarmDirection; +import forestry.api.farming.Farmables; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmHousing; +import forestry.api.farming.IFarmable; +import forestry.core.utils.ItemStackUtil; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -21,13 +27,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.FarmDirection; -import forestry.api.farming.Farmables; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmHousing; -import forestry.api.farming.IFarmable; -import forestry.core.utils.ItemStackUtil; - public class FarmLogicSucculent extends FarmLogic { private final Collection germlings = Farmables.farmables.get("farmSucculentes"); diff --git a/src/main/java/forestry/farming/logic/FarmLogicVegetable.java b/src/main/java/forestry/farming/logic/FarmLogicVegetable.java index 460046abb..a655f7ba1 100755 --- a/src/main/java/forestry/farming/logic/FarmLogicVegetable.java +++ b/src/main/java/forestry/farming/logic/FarmLogicVegetable.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.farming.Farmables; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import forestry.api.farming.Farmables; - public class FarmLogicVegetable extends FarmLogicCrops { public FarmLogicVegetable() { diff --git a/src/main/java/forestry/farming/logic/FarmableBase.java b/src/main/java/forestry/farming/logic/FarmableBase.java index 1be4e7839..01dccc01e 100644 --- a/src/main/java/forestry/farming/logic/FarmableBase.java +++ b/src/main/java/forestry/farming/logic/FarmableBase.java @@ -1,15 +1,14 @@ package forestry.farming.logic; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmable; +import forestry.core.utils.BlockUtil; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmable; -import forestry.core.utils.BlockUtil; - public abstract class FarmableBase implements IFarmable { protected final ItemStack germling; protected final IBlockState plantedState; diff --git a/src/main/java/forestry/farming/logic/FarmableBasicAgricraft.java b/src/main/java/forestry/farming/logic/FarmableBasicAgricraft.java index d7891b560..a3391c911 100644 --- a/src/main/java/forestry/farming/logic/FarmableBasicAgricraft.java +++ b/src/main/java/forestry/farming/logic/FarmableBasicAgricraft.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.farming.ICrop; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.ICrop; - public class FarmableBasicAgricraft extends FarmableBase { public FarmableBasicAgricraft(ItemStack germling, IBlockState plantedState, IBlockState matureState, boolean replant) { super(germling, plantedState, matureState, replant); diff --git a/src/main/java/forestry/farming/logic/FarmableCocoa.java b/src/main/java/forestry/farming/logic/FarmableCocoa.java index 0f821f020..e76f40974 100755 --- a/src/main/java/forestry/farming/logic/FarmableCocoa.java +++ b/src/main/java/forestry/farming/logic/FarmableCocoa.java @@ -10,6 +10,7 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.core.utils.BlockUtil; import net.minecraft.block.BlockCocoa; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -19,8 +20,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.core.utils.BlockUtil; - public class FarmableCocoa extends FarmableAgingCrop { public static final Item COCOA_SEED = Items.DYE; diff --git a/src/main/java/forestry/farming/logic/FarmableGE.java b/src/main/java/forestry/farming/logic/FarmableGE.java index 4d7017fa4..1c686068f 100755 --- a/src/main/java/forestry/farming/logic/FarmableGE.java +++ b/src/main/java/forestry/farming/logic/FarmableGE.java @@ -10,7 +10,13 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.arboriculture.ITree; import forestry.api.arboriculture.ITreeRoot; +import forestry.api.arboriculture.TreeManager; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmable; +import forestry.arboriculture.PluginArboriculture; +import forestry.core.utils.GeneticsUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -18,13 +24,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.arboriculture.ITree; -import forestry.api.arboriculture.TreeManager; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmable; -import forestry.arboriculture.PluginArboriculture; -import forestry.core.utils.GeneticsUtil; - public class FarmableGE implements IFarmable { @Override diff --git a/src/main/java/forestry/farming/logic/FarmableGourd.java b/src/main/java/forestry/farming/logic/FarmableGourd.java index 3c1efe3b2..e9bfcec81 100755 --- a/src/main/java/forestry/farming/logic/FarmableGourd.java +++ b/src/main/java/forestry/farming/logic/FarmableGourd.java @@ -10,6 +10,9 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmable; +import forestry.core.utils.BlockUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -17,10 +20,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmable; -import forestry.core.utils.BlockUtil; - public class FarmableGourd implements IFarmable { private final ItemStack seed; diff --git a/src/main/java/forestry/farming/logic/FarmableStacked.java b/src/main/java/forestry/farming/logic/FarmableStacked.java index 2bc8bea39..c44062b63 100755 --- a/src/main/java/forestry/farming/logic/FarmableStacked.java +++ b/src/main/java/forestry/farming/logic/FarmableStacked.java @@ -10,6 +10,9 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmable; +import forestry.core.utils.BlockUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -17,10 +20,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmable; -import forestry.core.utils.BlockUtil; - public class FarmableStacked implements IFarmable { protected final ItemStack germling; protected final Block cropBlock; diff --git a/src/main/java/forestry/farming/logic/FarmableVanillaMushroom.java b/src/main/java/forestry/farming/logic/FarmableVanillaMushroom.java index bdbad78c7..ab3af235b 100644 --- a/src/main/java/forestry/farming/logic/FarmableVanillaMushroom.java +++ b/src/main/java/forestry/farming/logic/FarmableVanillaMushroom.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.farming.ICrop; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.farming.ICrop; - public class FarmableVanillaMushroom extends FarmableBase { private final Block hugeMushroomBlock; diff --git a/src/main/java/forestry/farming/logic/FarmableVanillaSapling.java b/src/main/java/forestry/farming/logic/FarmableVanillaSapling.java index 74bccb456..9e1a748de 100755 --- a/src/main/java/forestry/farming/logic/FarmableVanillaSapling.java +++ b/src/main/java/forestry/farming/logic/FarmableVanillaSapling.java @@ -10,6 +10,16 @@ ******************************************************************************/ package forestry.farming.logic; +import forestry.api.arboriculture.ITree; +import forestry.api.arboriculture.TreeManager; +import forestry.api.core.ForestryAPI; +import forestry.api.farming.ICrop; +import forestry.api.farming.IFarmable; +import forestry.api.genetics.IIndividual; +import forestry.core.network.packets.PacketFXSignal; +import forestry.core.proxy.Proxies; +import forestry.core.utils.GeneticsUtil; +import forestry.plugins.ForestryPluginUids; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -22,17 +32,6 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.api.arboriculture.ITree; -import forestry.api.arboriculture.TreeManager; -import forestry.api.core.ForestryAPI; -import forestry.api.farming.ICrop; -import forestry.api.farming.IFarmable; -import forestry.api.genetics.IIndividual; -import forestry.core.network.packets.PacketFXSignal; -import forestry.core.proxy.Proxies; -import forestry.core.utils.GeneticsUtil; -import forestry.plugins.ForestryPluginUids; - public class FarmableVanillaSapling implements IFarmable { protected final ItemStack germling; diff --git a/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java b/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java index b10f281ba..612d7f681 100644 --- a/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java +++ b/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java @@ -12,17 +12,15 @@ package forestry.farming.models; import javax.annotation.Nullable; +import forestry.core.proxy.Proxies; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.core.proxy.Proxies; - public enum EnumFarmBlockTexture { BRICK_STONE(new ItemStack(Blocks.STONEBRICK, 1, 0)), BRICK_MOSSY(new ItemStack(Blocks.STONEBRICK, 1, 1)), @@ -41,7 +39,7 @@ public enum EnumFarmBlockTexture { EnumFarmBlockTexture(ItemStack base) { this.base = base; } - + /** * @return The texture sprite from the material of the farm block */ diff --git a/src/main/java/forestry/farming/multiblock/FarmFertilizerManager.java b/src/main/java/forestry/farming/multiblock/FarmFertilizerManager.java index 2f2a9dfe4..e7e3cb935 100644 --- a/src/main/java/forestry/farming/multiblock/FarmFertilizerManager.java +++ b/src/main/java/forestry/farming/multiblock/FarmFertilizerManager.java @@ -12,12 +12,11 @@ package forestry.farming.multiblock; import java.io.IOException; -import forestry.core.network.PacketBufferForestry; -import net.minecraft.nbt.NBTTagCompound; - import forestry.api.core.INbtReadable; import forestry.api.core.INbtWritable; import forestry.core.network.IStreamable; +import forestry.core.network.PacketBufferForestry; +import net.minecraft.nbt.NBTTagCompound; public class FarmFertilizerManager implements INbtWritable, INbtReadable, IStreamable { private static final int BUFFER_FERTILIZER = 200; diff --git a/src/main/java/forestry/farming/multiblock/IFarmControllerInternal.java b/src/main/java/forestry/farming/multiblock/IFarmControllerInternal.java index 33e3205de..5b535ee4e 100644 --- a/src/main/java/forestry/farming/multiblock/IFarmControllerInternal.java +++ b/src/main/java/forestry/farming/multiblock/IFarmControllerInternal.java @@ -11,12 +11,12 @@ package forestry.farming.multiblock; import forestry.api.multiblock.IFarmController; -import forestry.core.owner.IOwnedTile; import forestry.core.circuits.ISocketable; import forestry.core.fluids.ITankManager; import forestry.core.inventory.IInventoryAdapter; import forestry.core.multiblock.IMultiblockControllerInternal; import forestry.core.network.IStreamableGui; +import forestry.core.owner.IOwnedTile; import forestry.core.tiles.IClimatised; import forestry.farming.gui.IFarmLedgerDelegate; diff --git a/src/main/java/forestry/farming/multiblock/MultiblockLogicFarm.java b/src/main/java/forestry/farming/multiblock/MultiblockLogicFarm.java index 8ce35e8fd..10f4c127b 100644 --- a/src/main/java/forestry/farming/multiblock/MultiblockLogicFarm.java +++ b/src/main/java/forestry/farming/multiblock/MultiblockLogicFarm.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.farming.multiblock; -import net.minecraft.world.World; - import forestry.api.multiblock.IMultiblockLogicFarm; import forestry.core.multiblock.MultiblockLogic; +import net.minecraft.world.World; public class MultiblockLogicFarm extends MultiblockLogic implements IMultiblockLogicFarm { public MultiblockLogicFarm() { diff --git a/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java b/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java index 7b666a784..52c7b8fd5 100644 --- a/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java +++ b/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.farming.proxy; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; - import forestry.core.models.BlockModelEntry; import forestry.core.proxy.Proxies; import forestry.farming.PluginFarming; import forestry.farming.models.ModelFarmBlock; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; @SuppressWarnings("unused") public class ProxyFarmingClient extends ProxyFarming { diff --git a/src/main/java/forestry/farming/tiles/TileFarmControl.java b/src/main/java/forestry/farming/tiles/TileFarmControl.java index 83391b426..fbc5b3f33 100644 --- a/src/main/java/forestry/farming/tiles/TileFarmControl.java +++ b/src/main/java/forestry/farming/tiles/TileFarmControl.java @@ -10,17 +10,16 @@ ******************************************************************************/ package forestry.farming.tiles; -import forestry.farming.blocks.BlockFarm; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.farming.DefaultFarmListener; import forestry.api.farming.FarmDirection; import forestry.api.farming.IFarmListener; import forestry.api.farming.IFarmLogic; import forestry.api.multiblock.IFarmComponent; +import forestry.farming.blocks.BlockFarm; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class TileFarmControl extends TileFarm implements IFarmComponent.Listener { @@ -44,11 +43,11 @@ public class TileFarmControl extends TileFarm implements IFarmComponent.Listener @Override public boolean cancelTask(IFarmLogic logic, FarmDirection direction) { - for(EnumFacing facing : new EnumFacing[]{EnumFacing.UP, EnumFacing.DOWN, direction.getFacing()}){ + for (EnumFacing facing : new EnumFacing[]{EnumFacing.UP, EnumFacing.DOWN, direction.getFacing()}) { BlockPos pos = tile.getPos(); World world = tile.getWorldObj(); IBlockState blockState = world.getBlockState(pos.offset(facing)); - if(!(blockState.getBlock() instanceof BlockFarm) && world.getRedstonePower(pos, facing) > 0){ + if (!(blockState.getBlock() instanceof BlockFarm) && world.getRedstonePower(pos, facing) > 0) { return true; } } diff --git a/src/main/java/forestry/farming/tiles/TileFarmPlain.java b/src/main/java/forestry/farming/tiles/TileFarmPlain.java index b191305fd..c78536c86 100644 --- a/src/main/java/forestry/farming/tiles/TileFarmPlain.java +++ b/src/main/java/forestry/farming/tiles/TileFarmPlain.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.farming.tiles; -import net.minecraft.util.math.BlockPos; - import forestry.api.multiblock.IMultiblockController; +import net.minecraft.util.math.BlockPos; public class TileFarmPlain extends TileFarm { @Override diff --git a/src/main/java/forestry/farming/tiles/TileFarmValve.java b/src/main/java/forestry/farming/tiles/TileFarmValve.java index 17f048921..e8d6e198c 100644 --- a/src/main/java/forestry/farming/tiles/TileFarmValve.java +++ b/src/main/java/forestry/farming/tiles/TileFarmValve.java @@ -13,13 +13,11 @@ package forestry.farming.tiles; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import net.minecraft.util.EnumFacing; - -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; - import forestry.core.fluids.ITankManager; import forestry.core.tiles.ILiquidTankTile; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; public class TileFarmValve extends TileFarm implements ILiquidTankTile { @Nonnull diff --git a/src/main/java/forestry/food/BeverageEffect.java b/src/main/java/forestry/food/BeverageEffect.java index 518f90b98..9d1e3aa73 100755 --- a/src/main/java/forestry/food/BeverageEffect.java +++ b/src/main/java/forestry/food/BeverageEffect.java @@ -15,13 +15,12 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - import forestry.api.food.BeverageManager; import forestry.api.food.IBeverageEffect; import forestry.core.utils.Translator; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; public abstract class BeverageEffect implements IBeverageEffect { private final int id; diff --git a/src/main/java/forestry/food/InfuserIngredientManager.java b/src/main/java/forestry/food/InfuserIngredientManager.java index c674024c1..7dd385d13 100644 --- a/src/main/java/forestry/food/InfuserIngredientManager.java +++ b/src/main/java/forestry/food/InfuserIngredientManager.java @@ -14,9 +14,8 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import net.minecraft.item.ItemStack; - import forestry.api.food.IIngredientManager; +import net.minecraft.item.ItemStack; public class InfuserIngredientManager implements IIngredientManager { private final List ingredients = new ArrayList<>(); diff --git a/src/main/java/forestry/food/InfuserMixture.java b/src/main/java/forestry/food/InfuserMixture.java index b5acaf74e..3db5486eb 100644 --- a/src/main/java/forestry/food/InfuserMixture.java +++ b/src/main/java/forestry/food/InfuserMixture.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.food; -import net.minecraft.item.ItemStack; - import forestry.api.food.IBeverageEffect; +import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; /** diff --git a/src/main/java/forestry/food/PluginFood.java b/src/main/java/forestry/food/PluginFood.java index ef4fac3cf..012cd7f2b 100644 --- a/src/main/java/forestry/food/PluginFood.java +++ b/src/main/java/forestry/food/PluginFood.java @@ -13,8 +13,6 @@ package forestry.food; import javax.annotation.Nullable; import com.google.common.base.Preconditions; -import net.minecraft.item.ItemStack; - import forestry.api.food.BeverageManager; import forestry.apiculture.PluginApiculture; import forestry.apiculture.items.EnumPollenCluster; @@ -25,6 +23,7 @@ import forestry.food.items.ItemRegistryFood; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; +import net.minecraft.item.ItemStack; @ForestryPlugin(pluginID = ForestryPluginUids.FOOD, name = "Food", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.food.description") public class PluginFood extends BlankForestryPlugin { diff --git a/src/main/java/forestry/food/gui/ContainerInfuser.java b/src/main/java/forestry/food/gui/ContainerInfuser.java index 7cb029328..66ba083b5 100755 --- a/src/main/java/forestry/food/gui/ContainerInfuser.java +++ b/src/main/java/forestry/food/gui/ContainerInfuser.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.food.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.gui.ContainerItemInventory; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotOutput; import forestry.food.inventory.ItemInventoryInfuser; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerInfuser extends ContainerItemInventory { diff --git a/src/main/java/forestry/food/gui/GuiInfuser.java b/src/main/java/forestry/food/gui/GuiInfuser.java index 972318eaa..ce67bf54e 100755 --- a/src/main/java/forestry/food/gui/GuiInfuser.java +++ b/src/main/java/forestry/food/gui/GuiInfuser.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.food.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.api.food.BeverageManager; import forestry.core.config.Constants; import forestry.core.gui.GuiForestry; import forestry.core.render.ColourProperties; import forestry.food.inventory.ItemInventoryInfuser; +import net.minecraft.entity.player.InventoryPlayer; public class GuiInfuser extends GuiForestry { diff --git a/src/main/java/forestry/food/items/EnumBeverage.java b/src/main/java/forestry/food/items/EnumBeverage.java index 9dc114602..eb1e0143a 100644 --- a/src/main/java/forestry/food/items/EnumBeverage.java +++ b/src/main/java/forestry/food/items/EnumBeverage.java @@ -12,13 +12,11 @@ package forestry.food.items; import java.awt.Color; +import forestry.api.core.IModelManager; import net.minecraft.item.Item; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.core.IModelManager; - public enum EnumBeverage implements ItemBeverage.IBeverageInfo { MEAD_SHORT("meadShort", "glass", new Color(0xec9a19), new Color(0xffffff), 1, 0.2f, true), MEAD_CURATIVE("meadCurative", "glass", new Color(0xc5feff), new Color(0xffffff), 1, 0.2f, true); diff --git a/src/main/java/forestry/food/items/ItemAmbrosia.java b/src/main/java/forestry/food/items/ItemAmbrosia.java index 31f1cab2b..6c6bbaf35 100755 --- a/src/main/java/forestry/food/items/ItemAmbrosia.java +++ b/src/main/java/forestry/food/items/ItemAmbrosia.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.food.items; +import forestry.core.config.Constants; +import forestry.core.items.ItemForestryFood; import net.minecraft.init.MobEffects; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; -import forestry.core.config.Constants; -import forestry.core.items.ItemForestryFood; - public class ItemAmbrosia extends ItemForestryFood { public ItemAmbrosia() { diff --git a/src/main/java/forestry/food/items/ItemInfuser.java b/src/main/java/forestry/food/items/ItemInfuser.java index 121e88be9..b7fbf493b 100644 --- a/src/main/java/forestry/food/items/ItemInfuser.java +++ b/src/main/java/forestry/food/items/ItemInfuser.java @@ -10,15 +10,15 @@ ******************************************************************************/ package forestry.food.items; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import forestry.core.items.ItemWithGui; import forestry.food.gui.ContainerInfuser; import forestry.food.gui.GuiInfuser; import forestry.food.inventory.ItemInventoryInfuser; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class ItemInfuser extends ItemWithGui { - + @Override public Object getGui(EntityPlayer player, ItemStack heldItem, int data) { return new GuiInfuser(player.inventory, new ItemInventoryInfuser(player, heldItem)); diff --git a/src/main/java/forestry/food/items/ItemRegistryFood.java b/src/main/java/forestry/food/items/ItemRegistryFood.java index 4aedfb93b..90df428b3 100644 --- a/src/main/java/forestry/food/items/ItemRegistryFood.java +++ b/src/main/java/forestry/food/items/ItemRegistryFood.java @@ -12,12 +12,11 @@ package forestry.food.items; import java.util.Collections; -import net.minecraft.item.ItemStack; - import forestry.core.items.ItemForestryFood; import forestry.core.items.ItemRegistry; import forestry.food.BeverageEffect; import forestry.food.BeverageEffects; +import net.minecraft.item.ItemStack; public class ItemRegistryFood extends ItemRegistry { public final ItemForestryFood honeyedSlice; diff --git a/src/main/java/forestry/greenhouse/EventHandlerGreenhouse.java b/src/main/java/forestry/greenhouse/EventHandlerGreenhouse.java index 77433a037..fd56303fe 100644 --- a/src/main/java/forestry/greenhouse/EventHandlerGreenhouse.java +++ b/src/main/java/forestry/greenhouse/EventHandlerGreenhouse.java @@ -10,30 +10,29 @@ ******************************************************************************/ package forestry.greenhouse; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - import forestry.api.core.ICamouflageHandler; import forestry.api.greenhouse.EnumGreenhouseEventType; import forestry.api.greenhouse.GreenhouseEvents.CamouflageChangeEvent; import forestry.api.multiblock.IGreenhouseComponent; import forestry.api.multiblock.IGreenhouseController; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class EventHandlerGreenhouse { - + @SubscribeEvent public void onCamouflageChance(CamouflageChangeEvent event) { ICamouflageHandler handler = event.camouflageHandler; - + IGreenhouseController controller = null; if (handler instanceof IGreenhouseController) { controller = (IGreenhouseController) handler; } - + if (handler instanceof IGreenhouseComponent) { IGreenhouseComponent component = (IGreenhouseComponent) handler; controller = component.getMultiblockLogic().getController(); } - + if (controller != null) { controller.onChange(EnumGreenhouseEventType.CAMOUFLAGE, event); } diff --git a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java index 39ad0dd7b..a3bbb617e 100644 --- a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java +++ b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java @@ -359,7 +359,7 @@ public abstract class BlockGreenhouse extends BlockStructure implements ISpriteR } @Override - public int colorMultiplier(IBlockState state, @Nullable IBlockAccess worldIn, @Nullable BlockPos pos, int tintIndex) { + public int colorMultiplier(IBlockState state, @Nullable IBlockAccess worldIn, @Nullable BlockPos pos, int tintIndex) { if (pos == null || worldIn == null) { return 0xffffff; } diff --git a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseType.java b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseType.java index c35fe3ec3..bed46cf61 100644 --- a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseType.java +++ b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseType.java @@ -4,6 +4,10 @@ import javax.annotation.Nullable; import java.util.EnumMap; import java.util.Locale; +import forestry.core.config.Constants; +import forestry.core.proxy.Proxies; +import forestry.greenhouse.blocks.BlockGreenhouse.State; +import forestry.greenhouse.tiles.TileGreenhouseHatch; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -13,15 +17,9 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.core.config.Constants; -import forestry.core.proxy.Proxies; -import forestry.greenhouse.blocks.BlockGreenhouse.State; -import forestry.greenhouse.tiles.TileGreenhouseHatch; - public enum BlockGreenhouseType { PLAIN, GLASS, @@ -39,22 +37,22 @@ public enum BlockGreenhouseType { WINDOW(true), WINDOW_UP(true), BUTTERFLY_HATCH(true); - + public static final BlockGreenhouseType[] VALUES = values(); - + public final boolean hasOverlaySprite; public final boolean activatable; - + BlockGreenhouseType(boolean hasOverlaySprite, boolean activatable) { this.hasOverlaySprite = hasOverlaySprite; this.activatable = activatable; } - + BlockGreenhouseType(boolean hasOverlaySprite) { this.hasOverlaySprite = hasOverlaySprite; this.activatable = false; } - + BlockGreenhouseType() { this.hasOverlaySprite = false; this.activatable = false; @@ -62,19 +60,19 @@ public enum BlockGreenhouseType { @SideOnly(Side.CLIENT) private static EnumMap sprites; - + private enum BlockGreenhouseSprites { GEARS("gears"), VALVE("valve"), FAN_OFF("fan.off"), FAN_ON("fan.on"), HEATER_OFF("heater.off"), HEATER_ON("heater.on"), DRYER("dryer"), CONTROL("control"), HATCH_DEFAULT("hatch"), HATCH_INPUT("hatch_input"), HATCH_OUTPUT("hatch_output"), CLIMATE_CONTROL("climate_control"), BUTTERFLY_HATCH("butterfly_hatch"); - + public static final BlockGreenhouseSprites[] VALUES = values(); - + private final String spriteName; - + BlockGreenhouseSprites(String spriteName) { this.spriteName = spriteName; } } - + @SideOnly(Side.CLIENT) public static void registerSprites() { sprites = new EnumMap<>(BlockGreenhouseSprites.class); @@ -86,7 +84,7 @@ public enum BlockGreenhouseType { sprites.put(sprite, textureAtlasSprite); } } - + /** * @return The texture sprite from the type and the {@link IBlockState} of the greenhouse block */ @@ -151,14 +149,14 @@ public enum BlockGreenhouseType { return Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite(); } } - + public static EnumMap getSprites() { return sprites; } - + @Override public String toString() { return name().toLowerCase(Locale.ENGLISH); } - + } diff --git a/src/main/java/forestry/greenhouse/entities/SprinklerWater.java b/src/main/java/forestry/greenhouse/entities/SprinklerWater.java index 1e80d54fc..0f7de676a 100644 --- a/src/main/java/forestry/greenhouse/entities/SprinklerWater.java +++ b/src/main/java/forestry/greenhouse/entities/SprinklerWater.java @@ -12,43 +12,43 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) -public abstract class SprinklerWater extends Particle { +public abstract class SprinklerWater extends Particle { - public SprinklerWater(World world, double x, double y, double z, Vec3d vector, ResourceLocation texture) { - super(world, x, y, z, 0, 0, 0); - this.particleScale = 0.3F; - this.motionX = vector.xCoord; - this.motionY = vector.yCoord; - this.motionZ = vector.zCoord; - this.particleMaxAge = 15; - this.setSize(0.2f, 0.2f); - } + public SprinklerWater(World world, double x, double y, double z, Vec3d vector, ResourceLocation texture) { + super(world, x, y, z, 0, 0, 0); + this.particleScale = 0.3F; + this.motionX = vector.xCoord; + this.motionY = vector.yCoord; + this.motionZ = vector.zCoord; + this.particleMaxAge = 15; + this.setSize(0.2f, 0.2f); + } - @Override - public int getFXLayer() { - return 1; - } + @Override + public int getFXLayer() { + return 1; + } - @Override - public void renderParticle(VertexBuffer worldRenderer, Entity entity, float partialTicks, float f0, float f1, float f2, float f3, float f4) { - float f6 = 0; - float f7 = 1; - float f8 = 0; - float f9 = 1; - float f10 = 0.1F * this.particleScale; - float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * f0 - interpPosX); - float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * f0 - interpPosY); - float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * f0 - interpPosZ); - Minecraft.getMinecraft().renderEngine.bindTexture(FluidRegistry.WATER.getStill()); + @Override + public void renderParticle(VertexBuffer worldRenderer, Entity entity, float partialTicks, float f0, float f1, float f2, float f3, float f4) { + float f6 = 0; + float f7 = 1; + float f8 = 0; + float f9 = 1; + float f10 = 0.1F * this.particleScale; + float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * f0 - interpPosX); + float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * f0 - interpPosY); + float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * f0 - interpPosZ); + Minecraft.getMinecraft().renderEngine.bindTexture(FluidRegistry.WATER.getStill()); int i = this.getBrightnessForRender(partialTicks); int j = i >> 16 & 65535; int k = i & 65535; - worldRenderer.pos((f11 - f1 * f10 - f4 * f10), (f12 - f2 * f10), (f13 - f3 * f10 - f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f7, f9).lightmap(j, k).endVertex(); - worldRenderer.pos((f11 - f1 * f10 + f4 * f10), (f12 + f2 * f10), (f13 - f3 * f10 + f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f7, f8).lightmap(j, k).endVertex(); - worldRenderer.pos((f11 + f1 * f10 + f4 * f10), (f12 + f2 * f10), (f13 + f3 * f10 + f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f6, f8).lightmap(j, k).endVertex(); - worldRenderer.pos((f11 + f1 * f10 - f4 * f10), (f12 - f2 * f10), (f13 + f3 * f10 - f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f6, f9).lightmap(j, k).endVertex(); - } - + worldRenderer.pos((f11 - f1 * f10 - f4 * f10), (f12 - f2 * f10), (f13 - f3 * f10 - f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f7, f9).lightmap(j, k).endVertex(); + worldRenderer.pos((f11 - f1 * f10 + f4 * f10), (f12 + f2 * f10), (f13 - f3 * f10 + f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f7, f8).lightmap(j, k).endVertex(); + worldRenderer.pos((f11 + f1 * f10 + f4 * f10), (f12 + f2 * f10), (f13 + f3 * f10 + f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f6, f8).lightmap(j, k).endVertex(); + worldRenderer.pos((f11 + f1 * f10 - f4 * f10), (f12 - f2 * f10), (f13 + f3 * f10 - f6 * f10)).color(1F, 1F, 1F, 0.5F).tex(f6, f9).lightmap(j, k).endVertex(); + } + // avoid calculating lighting for water, it is too much processing @Override public int getBrightnessForRender(float p_189214_1_) { diff --git a/src/main/java/forestry/greenhouse/gui/ContainerGreenhouse.java b/src/main/java/forestry/greenhouse/gui/ContainerGreenhouse.java index 3cb28e70a..0b700a30a 100644 --- a/src/main/java/forestry/greenhouse/gui/ContainerGreenhouse.java +++ b/src/main/java/forestry/greenhouse/gui/ContainerGreenhouse.java @@ -10,30 +10,28 @@ ******************************************************************************/ package forestry.greenhouse.gui; -import net.minecraft.entity.player.InventoryPlayer; - -import net.minecraftforge.fluids.IFluidTank; - import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotLiquidIn; import forestry.core.network.packets.PacketGuiUpdate; import forestry.greenhouse.tiles.TileGreenhouse; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fluids.IFluidTank; public class ContainerGreenhouse extends ContainerTile { public ContainerGreenhouse(InventoryPlayer playerInventory, TileGreenhouse tile) { super(tile, playerInventory, 8, 84); - + addSlotToContainer(new SlotLiquidIn(tile, 0, 125, 37)); } - + @Override public void detectAndSendChanges() { super.detectAndSendChanges(); PacketGuiUpdate packet = new PacketGuiUpdate(tile); sendPacketToListeners(packet); } - + public IFluidTank getTank(int slot) { return tile.getMultiblockLogic().getController().getTankManager().getTank(slot); } diff --git a/src/main/java/forestry/greenhouse/gui/ContainerGreenhouseButterflyHatch.java b/src/main/java/forestry/greenhouse/gui/ContainerGreenhouseButterflyHatch.java index 8cbd02b74..3442e75e6 100644 --- a/src/main/java/forestry/greenhouse/gui/ContainerGreenhouseButterflyHatch.java +++ b/src/main/java/forestry/greenhouse/gui/ContainerGreenhouseButterflyHatch.java @@ -10,25 +10,23 @@ ******************************************************************************/ package forestry.greenhouse.gui; -import net.minecraft.entity.player.InventoryPlayer; - -import net.minecraftforge.fluids.IFluidTank; - import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotOutput; import forestry.greenhouse.tiles.TileGreenhouseButterflyHatch; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fluids.IFluidTank; public class ContainerGreenhouseButterflyHatch extends ContainerTile { public ContainerGreenhouseButterflyHatch(InventoryPlayer playerInventory, TileGreenhouseButterflyHatch tile) { super(tile, playerInventory, 8, 84); - + addSlotToContainer(new SlotOutput(tile, 0, 60, 40)); addSlotToContainer(new SlotOutput(tile, 1, 80, 27)); addSlotToContainer(new SlotOutput(tile, 2, 101, 40)); addSlotToContainer(new SlotOutput(tile, 3, 80, 53)); } - + public IFluidTank getTank(int slot) { return tile.getMultiblockLogic().getController().getTankManager().getTank(slot); } diff --git a/src/main/java/forestry/greenhouse/gui/GuiGreenhouseButterflyHatch.java b/src/main/java/forestry/greenhouse/gui/GuiGreenhouseButterflyHatch.java index 4b90716fa..33f8084d1 100644 --- a/src/main/java/forestry/greenhouse/gui/GuiGreenhouseButterflyHatch.java +++ b/src/main/java/forestry/greenhouse/gui/GuiGreenhouseButterflyHatch.java @@ -10,20 +10,19 @@ ******************************************************************************/ package forestry.greenhouse.gui; -import net.minecraft.entity.player.EntityPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.ledgers.ClimateLedger; import forestry.core.gui.widgets.WidgetCamouflageSlot; import forestry.greenhouse.multiblock.IGreenhouseControllerInternal; import forestry.greenhouse.tiles.TileGreenhouseButterflyHatch; +import net.minecraft.entity.player.EntityPlayer; public class GuiGreenhouseButterflyHatch extends GuiForestryTitled { public GuiGreenhouseButterflyHatch(EntityPlayer player, TileGreenhouseButterflyHatch tile) { super(Constants.TEXTURE_PATH_GUI + "/greenhouse_butterfly_hatch.png", new ContainerGreenhouseButterflyHatch(player.inventory, tile), tile); - + //Add the tile camouflage slots widgetManager.add(new WidgetCamouflageSlot(widgetManager, 8, 17, inventory, tile.getCamouflageType())); } @@ -31,7 +30,7 @@ public class GuiGreenhouseButterflyHatch extends GuiForestryTitled { public static final int SLOTS = 4; - + public InventoryGreenhouseButterflyHatch(TileGreenhouseButterflyHatch tile) { super(tile, SLOTS, "Items"); } diff --git a/src/main/java/forestry/greenhouse/logics/GreenhouseLogicGreenhouseDoor.java b/src/main/java/forestry/greenhouse/logics/GreenhouseLogicGreenhouseDoor.java index 14bc31c14..77a7840bf 100644 --- a/src/main/java/forestry/greenhouse/logics/GreenhouseLogicGreenhouseDoor.java +++ b/src/main/java/forestry/greenhouse/logics/GreenhouseLogicGreenhouseDoor.java @@ -10,20 +10,19 @@ ******************************************************************************/ package forestry.greenhouse.logics; -import net.minecraft.nbt.NBTTagCompound; - import forestry.api.greenhouse.DefaultGreenhouseLogic; import forestry.api.greenhouse.IGreenhouseClimaLogic; import forestry.api.multiblock.IGreenhouseController; +import net.minecraft.nbt.NBTTagCompound; public class GreenhouseLogicGreenhouseDoor extends DefaultGreenhouseLogic implements IGreenhouseClimaLogic { private int workTimer; - + public GreenhouseLogicGreenhouseDoor(IGreenhouseController controller) { super(controller, "GreenhouseDoor"); } - + @Override public void work() { /*if (controller == null || !controller.isAssembled()) { @@ -44,7 +43,7 @@ public class GreenhouseLogicGreenhouseDoor extends DefaultGreenhouseLogic implem workTimer = 0; }*/ } - + @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { nbt.setInteger("workTimer", workTimer); diff --git a/src/main/java/forestry/greenhouse/multiblock/DefaultClimateControl.java b/src/main/java/forestry/greenhouse/multiblock/DefaultClimateControl.java index a68066fc3..55cc994b1 100644 --- a/src/main/java/forestry/greenhouse/multiblock/DefaultClimateControl.java +++ b/src/main/java/forestry/greenhouse/multiblock/DefaultClimateControl.java @@ -5,10 +5,10 @@ import forestry.api.climate.IClimateControl; public class DefaultClimateControl implements IClimateControl { public static final DefaultClimateControl instance = new DefaultClimateControl(); - + public DefaultClimateControl() { } - + @Override public float getControlTemperature() { return 2.0F; @@ -20,7 +20,7 @@ public class DefaultClimateControl implements IClimateControl { } @Override - public void setControlTemperature(float temperature) { + public void setControlTemperature(float temperature) { } @Override diff --git a/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java b/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java index 480535729..045d96154 100644 --- a/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java +++ b/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java @@ -664,7 +664,7 @@ public class GreenhouseController extends RectangularMultiblockControllerBase im /** * Check all internal blocks. */ - private void checkInternalBlocks() throws MultiblockValidationException{ + private void checkInternalBlocks() throws MultiblockValidationException { Stack blocksToCheck = new Stack<>(); IInternalBlock internalBlock = createInternalBlock(new InternalBlock(getMinimumCoord().add(1, 1, 1))); blocksToCheck.add(internalBlock); diff --git a/src/main/java/forestry/greenhouse/multiblock/MultiblockLogicGreenhouse.java b/src/main/java/forestry/greenhouse/multiblock/MultiblockLogicGreenhouse.java index 34379bff1..fe203fff2 100644 --- a/src/main/java/forestry/greenhouse/multiblock/MultiblockLogicGreenhouse.java +++ b/src/main/java/forestry/greenhouse/multiblock/MultiblockLogicGreenhouse.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.greenhouse.multiblock; -import net.minecraft.world.World; - import forestry.api.multiblock.IMultiblockLogicGreenhouse; import forestry.core.multiblock.MultiblockLogic; +import net.minecraft.world.World; public class MultiblockLogicGreenhouse extends MultiblockLogic implements IMultiblockLogicGreenhouse { diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseClimatiser.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseClimatiser.java index 68b9a5c4c..9db3db6b6 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseClimatiser.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseClimatiser.java @@ -11,7 +11,6 @@ package forestry.greenhouse.tiles; import javax.annotation.Nullable; - import java.util.Collections; import forestry.api.climate.IClimateSource; diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java index 74aae7a07..cfa3576e8 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.greenhouse.tiles; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.greenhouse.DefaultGreenhouseListener; import forestry.api.greenhouse.IGreenhouseListener; import forestry.api.multiblock.IGreenhouseComponent; import forestry.api.multiblock.IGreenhouseController; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class TileGreenhouseControl extends TileGreenhouse implements IGreenhouseComponent.Listener { @@ -26,7 +25,7 @@ public class TileGreenhouseControl extends TileGreenhouse implements IGreenhouse public TileGreenhouseControl() { this.greenhouseListener = new ControlGreenhouseListener(this); } - + @Override public IGreenhouseListener getGreenhouseListener() { return greenhouseListener; @@ -38,7 +37,7 @@ public class TileGreenhouseControl extends TileGreenhouse implements IGreenhouse public ControlGreenhouseListener(TileGreenhouseControl tile) { this.tile = tile; } - + @Override public boolean canWork(IGreenhouseController greenhouse, boolean canWork) { return canWork && !hasRedstoneSignal(); diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDoor.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDoor.java index 24f789663..5a4861244 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDoor.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDoor.java @@ -10,25 +10,25 @@ ******************************************************************************/ package forestry.greenhouse.tiles; -import net.minecraft.item.ItemStack; import forestry.core.utils.ItemStackUtil; +import net.minecraft.item.ItemStack; public class TileGreenhouseDoor extends TileGreenhouse { public TileGreenhouseDoor() { } - + @Override public boolean setCamouflageBlock(String type, ItemStack camouflageBlock, boolean sendClientUpdate) { - if(!ItemStackUtil.isIdenticalItem(camouflageBlock, this.camouflageBlock)){ + if (!ItemStackUtil.isIdenticalItem(camouflageBlock, this.camouflageBlock)) { super.setCamouflageBlock(type, camouflageBlock, sendClientUpdate); TileGreenhouseDoor otherDoorTile = null; - if(world.getTileEntity(pos.up()) instanceof TileGreenhouseDoor){ + if (world.getTileEntity(pos.up()) instanceof TileGreenhouseDoor) { otherDoorTile = (TileGreenhouseDoor) world.getTileEntity(pos.up()); - }else if(world.getTileEntity(pos.down()) instanceof TileGreenhouseDoor){ + } else if (world.getTileEntity(pos.down()) instanceof TileGreenhouseDoor) { otherDoorTile = (TileGreenhouseDoor) world.getTileEntity(pos.down()); } - if(otherDoorTile != null){ + if (otherDoorTile != null) { return otherDoorTile.setCamouflageBlock(type, camouflageBlock, sendClientUpdate); } } diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDryer.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDryer.java index e4a4739a1..7b2753c6e 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDryer.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseDryer.java @@ -16,7 +16,7 @@ import forestry.api.climate.IClimatiserDefinition; import forestry.core.climate.ClimatiserDefinition; public class TileGreenhouseDryer extends TileGreenhouseClimatiser { - + private static final IClimatiserDefinition DEFINITION = new ClimatiserDefinition(0.015F, EnumClimatiserModes.NEGATIVE, 5D, EnumClimatiserTypes.HUMIDITY); public TileGreenhouseDryer() { diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseFan.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseFan.java index b442eb722..5a0d83fc7 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseFan.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseFan.java @@ -22,5 +22,5 @@ public class TileGreenhouseFan extends TileGreenhouseClimatiser { public TileGreenhouseFan() { super(DEFINITION); } - + } diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseValve.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseValve.java index f6d27218d..5d86cd910 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseValve.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseValve.java @@ -12,16 +12,14 @@ package forestry.greenhouse.tiles; import javax.annotation.Nullable; +import forestry.core.fluids.ITankManager; +import forestry.core.tiles.ILiquidTankTile; import net.minecraft.util.EnumFacing; - import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; -import forestry.core.fluids.ITankManager; -import forestry.core.tiles.ILiquidTankTile; - public class TileGreenhouseValve extends TileGreenhouse implements ILiquidTankTile { - + @Override public ITankManager getTankManager() { return getMultiblockLogic().getController().getTankManager(); diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java index 1cbb659b3..f2432ec8f 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java @@ -24,23 +24,23 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -public class TileGreenhouseWindow extends TileGreenhouseClimatiser{ +public class TileGreenhouseWindow extends TileGreenhouseClimatiser { @Nullable private WindowMode mode; - + public TileGreenhouseWindow() { super(new ClimatiserDefinition(0.001F, EnumClimatiserModes.NONE, 5D, EnumClimatiserTypes.NONE), new GreenhouseClimateWindow(20)); } - + public void onNeighborBlockChange() { WindowMode otherMode = isBlocked(); - if(getMode() != WindowMode.PLAYER && getMode() != WindowMode.CONTROL && otherMode != getMode()){ + if (getMode() != WindowMode.PLAYER && getMode() != WindowMode.CONTROL && otherMode != getMode()) { setMode(otherMode); } } - - public WindowMode isBlocked(){ - if(world == null){ + + public WindowMode isBlocked() { + if (world == null) { return WindowMode.BLOCK; } if (!world.isBlockLoaded(pos)) { @@ -48,63 +48,63 @@ public class TileGreenhouseWindow extends TileGreenhouseClimatiser{ } IBlockState state = world.getBlockState(pos); BlockPos blockedPos; - if(state.getBlock() == PluginGreenhouse.blocks.getGreenhouseBlock(BlockGreenhouseType.WINDOW_UP)){ + if (state.getBlock() == PluginGreenhouse.blocks.getGreenhouseBlock(BlockGreenhouseType.WINDOW_UP)) { blockedPos = getCoordinates().offset(EnumFacing.UP); - }else{ + } else { blockedPos = getCoordinates().offset(state.getValue(BlockGreenhouse.FACING)); } return world.isAirBlock(blockedPos) ? WindowMode.OPEN : WindowMode.BLOCK; } - - + + @Override public NBTTagCompound writeToNBT(NBTTagCompound data) { - if(mode != null){ + if (mode != null) { data.setShort("mode", (short) mode.ordinal()); } return super.writeToNBT(data); } - + @Override public void readFromNBT(NBTTagCompound data) { super.readFromNBT(data); - if(data.hasKey("mode")){ + if (data.hasKey("mode")) { setMode(WindowMode.values()[data.getShort("mode")]); } } - + @Override protected void decodeDescriptionPacket(NBTTagCompound packetData) { super.decodeDescriptionPacket(packetData); - if(packetData.hasKey("mode")){ + if (packetData.hasKey("mode")) { setMode(WindowMode.values()[packetData.getShort("mode")]); } } - + @Override protected void encodeDescriptionPacket(NBTTagCompound packetData) { - if(mode != null){ + if (mode != null) { packetData.setShort("mode", (short) mode.ordinal()); } super.encodeDescriptionPacket(packetData); } - + @Override public boolean canWork() { return true; } - - public void setMode(WindowMode mode){ + + public void setMode(WindowMode mode) { this.mode = mode; setActive(mode == WindowMode.OPEN); } @Nullable - public WindowMode getMode(){ + public WindowMode getMode() { return mode; } - - public static enum WindowMode{ + + public static enum WindowMode { PLAYER, BLOCK, CONTROL, OPEN } diff --git a/src/main/java/forestry/lepidopterology/ButterflySpawner.java b/src/main/java/forestry/lepidopterology/ButterflySpawner.java index 186c6f431..f825953c4 100755 --- a/src/main/java/forestry/lepidopterology/ButterflySpawner.java +++ b/src/main/java/forestry/lepidopterology/ButterflySpawner.java @@ -12,46 +12,45 @@ package forestry.lepidopterology; import java.util.Random; -import net.minecraft.entity.EntityLiving; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - import forestry.api.arboriculture.ILeafTickHandler; import forestry.api.arboriculture.ITree; import forestry.api.lepidopterology.ButterflyManager; import forestry.api.lepidopterology.IButterfly; import forestry.core.utils.Log; import forestry.lepidopterology.entities.EntityButterfly; +import net.minecraft.entity.EntityLiving; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class ButterflySpawner implements ILeafTickHandler { @Override public boolean onRandomLeafTick(ITree tree, World world, Random rand, BlockPos pos, boolean isDestroyed) { - + if (rand.nextFloat() >= tree.getGenome().getSappiness() * tree.getGenome().getYield()) { return false; } - + IButterfly spawn = ButterflyManager.butterflyRoot.getIndividualTemplates().get(rand.nextInt(ButterflyManager.butterflyRoot.getIndividualTemplates().size())); float rarity; - if(PluginLepidopterology.spawnRaritys.containsKey(spawn.getGenome().getPrimary().getUID())){ + if (PluginLepidopterology.spawnRaritys.containsKey(spawn.getGenome().getPrimary().getUID())) { rarity = spawn.getGenome().getPrimary().getRarity(); - }else{ + } else { rarity = PluginLepidopterology.spawnRaritys.get(spawn.getGenome().getPrimary().getUID()); } - + if (rand.nextFloat() >= rarity * 0.5f) { return false; } - + if (world.countEntities(EntityButterfly.class) > PluginLepidopterology.spawnConstraint) { return false; } - + if (!spawn.canSpawn(world, pos.getX(), pos.getY(), pos.getZ())) { return false; } - + if (world.isAirBlock(pos.north())) { attemptButterflySpawn(world, spawn, pos.north()); } else if (world.isAirBlock(pos.south())) { @@ -61,7 +60,7 @@ public class ButterflySpawner implements ILeafTickHandler { } else if (world.isAirBlock(pos.east())) { attemptButterflySpawn(world, spawn, pos.east()); } - + return false; } diff --git a/src/main/java/forestry/lepidopterology/blocks/MaterialCocoon.java b/src/main/java/forestry/lepidopterology/blocks/MaterialCocoon.java index 9c3e4f7a3..467a4eb54 100644 --- a/src/main/java/forestry/lepidopterology/blocks/MaterialCocoon.java +++ b/src/main/java/forestry/lepidopterology/blocks/MaterialCocoon.java @@ -17,7 +17,7 @@ public class MaterialCocoon extends Material { public MaterialCocoon() { super(MapColor.CLOTH); - + setRequiresTool(); } diff --git a/src/main/java/forestry/lepidopterology/commands/CommandButterfly.java b/src/main/java/forestry/lepidopterology/commands/CommandButterfly.java index 4b4c7cef0..2b23f1c83 100644 --- a/src/main/java/forestry/lepidopterology/commands/CommandButterfly.java +++ b/src/main/java/forestry/lepidopterology/commands/CommandButterfly.java @@ -10,15 +10,14 @@ ******************************************************************************/ package forestry.lepidopterology.commands; +import forestry.core.commands.CommandHelpers; +import forestry.core.commands.SubCommand; +import forestry.lepidopterology.entities.EntityButterfly; import net.minecraft.command.ICommandSender; import net.minecraft.command.WrongUsageException; import net.minecraft.server.MinecraftServer; import net.minecraft.util.EntitySelectors; -import forestry.core.commands.CommandHelpers; -import forestry.core.commands.SubCommand; -import forestry.lepidopterology.entities.EntityButterfly; - /** * @author CovertJaguar */ diff --git a/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java b/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java index 98c0bef96..df8dbe6fe 100755 --- a/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java +++ b/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java @@ -18,7 +18,6 @@ import net.minecraft.block.IGrowable; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; - import net.minecraftforge.common.IPlantable; public class AIButterflyRest extends AIButterflyBase { diff --git a/src/main/java/forestry/lepidopterology/entities/EnumButterflyState.java b/src/main/java/forestry/lepidopterology/entities/EnumButterflyState.java index 30986d45c..2c2d31347 100644 --- a/src/main/java/forestry/lepidopterology/entities/EnumButterflyState.java +++ b/src/main/java/forestry/lepidopterology/entities/EnumButterflyState.java @@ -33,11 +33,11 @@ public enum EnumButterflyState { return entity.ticksExisted + partialTicktime; } } - + public static float getIrregularWingYaw(long flapping, float flap) { long irregular = flapping / 1024; float wingYaw; - + if (irregular % 11 == 0) { wingYaw = 0.75f; } else { @@ -50,10 +50,10 @@ public enum EnumButterflyState { } wingYaw = getRegularWingYaw(flap); } - + return wingYaw; } - + private static float getRegularWingYaw(float flap) { return flap < 0.5 ? 0.75f + flap : 1.75f - flap; } diff --git a/src/main/java/forestry/lepidopterology/genetics/ButterflyDefinition.java b/src/main/java/forestry/lepidopterology/genetics/ButterflyDefinition.java index 2ba6682eb..ad9ccd732 100644 --- a/src/main/java/forestry/lepidopterology/genetics/ButterflyDefinition.java +++ b/src/main/java/forestry/lepidopterology/genetics/ButterflyDefinition.java @@ -14,7 +14,6 @@ import java.awt.Color; import java.util.Arrays; import java.util.Locale; -import net.minecraft.item.ItemStack; import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; import forestry.api.genetics.IAllele; @@ -30,6 +29,7 @@ import forestry.api.lepidopterology.IButterflyMutationBuilder; import forestry.core.config.Constants; import forestry.core.genetics.alleles.AlleleHelper; import forestry.core.genetics.alleles.EnumAllele; +import net.minecraft.item.ItemStack; public enum ButterflyDefinition implements IButterflyDefinition { CabbageWhite(ButterflyBranchDefinition.Pieris, "cabbageWhite", "rapae", new Color(0xccffee), true, 1.0f) { @@ -347,21 +347,22 @@ public enum ButterflyDefinition implements IButterflyDefinition { protected void setAlleles(IAllele[] alleles) { } - protected void registerMutations(){ - + + protected void registerMutations() { + } - + protected final IButterflyMutationBuilder registerMutation(IButterflyDefinition parent1, IButterflyDefinition parent2, int chance) { IAlleleButterflySpecies species1 = null; IAlleleButterflySpecies species2 = null; - if(parent1 instanceof ButterflyDefinition){ + if (parent1 instanceof ButterflyDefinition) { species1 = ((ButterflyDefinition) parent1).species; - }else if(parent1 instanceof MothDefinition){ + } else if (parent1 instanceof MothDefinition) { species1 = ((MothDefinition) parent1).getSpecies(); } - if(parent2 instanceof ButterflyDefinition){ + if (parent2 instanceof ButterflyDefinition) { species2 = ((ButterflyDefinition) parent2).species; - }else if(parent2 instanceof MothDefinition){ + } else if (parent2 instanceof MothDefinition) { species2 = ((MothDefinition) parent2).getSpecies(); } return ButterflyManager.butterflyMutationFactory.createMutation(species1, species2, getTemplate(), chance); @@ -387,7 +388,7 @@ public enum ButterflyDefinition implements IButterflyDefinition { IButterfly butterfly = getIndividual(); return ButterflyManager.butterflyRoot.getMemberStack(butterfly, flutterType); } - + public IAlleleButterflySpecies getSpecies() { return species; } diff --git a/src/main/java/forestry/lepidopterology/genetics/ButterflyGenome.java b/src/main/java/forestry/lepidopterology/genetics/ButterflyGenome.java index fec9feeb7..0cb962d60 100755 --- a/src/main/java/forestry/lepidopterology/genetics/ButterflyGenome.java +++ b/src/main/java/forestry/lepidopterology/genetics/ButterflyGenome.java @@ -73,12 +73,12 @@ public class ButterflyGenome extends Genome implements IButterflyGenome { public float getSize() { return ((IAlleleFloat) getActiveAllele(EnumButterflyChromosome.SIZE)).getValue(); } - + @Override public int getLifespan() { return ((IAlleleInteger) getActiveAllele(EnumButterflyChromosome.LIFESPAN)).getValue(); } - + @Override public float getSpeed() { return ((IAlleleFloat) getActiveAllele(EnumButterflyChromosome.SPEED)).getValue(); @@ -128,7 +128,7 @@ public class ButterflyGenome extends Genome implements IButterflyGenome { public IAlleleButterflyEffect getEffect() { return (IAlleleButterflyEffect) getActiveAllele(EnumButterflyChromosome.EFFECT); } - + @Override public IAlleleButterflyCocoon getCocoon() { return (IAlleleButterflyCocoon) getActiveAllele(EnumButterflyChromosome.COCOON); diff --git a/src/main/java/forestry/lepidopterology/genetics/ButterflyMutation.java b/src/main/java/forestry/lepidopterology/genetics/ButterflyMutation.java index 97a6f59c3..a6c1c077a 100644 --- a/src/main/java/forestry/lepidopterology/genetics/ButterflyMutation.java +++ b/src/main/java/forestry/lepidopterology/genetics/ButterflyMutation.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.lepidopterology.genetics; -import net.minecraft.world.World; - import forestry.api.genetics.IAllele; import forestry.api.genetics.IAlleleSpecies; import forestry.api.genetics.IGenome; @@ -21,18 +19,19 @@ import forestry.api.lepidopterology.IButterflyMutation; import forestry.api.lepidopterology.IButterflyMutationBuilder; import forestry.api.lepidopterology.IButterflyNursery; import forestry.core.genetics.mutations.Mutation; +import net.minecraft.world.World; public class ButterflyMutation extends Mutation implements IButterflyMutation, IButterflyMutationBuilder { protected ButterflyMutation(IAlleleSpecies species0, IAlleleSpecies species1, IAllele[] template, int chance) { super(species0, species1, template, chance); } - + @Override public IButterflyMutation build() { return this; } - + @Override public float getChance(World world, IButterflyNursery housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { float processedChance = super.getChance(world, housing.getCoordinates(), allele0, allele1, genome0, genome1, housing); diff --git a/src/main/java/forestry/lepidopterology/genetics/IButterflyDefinition.java b/src/main/java/forestry/lepidopterology/genetics/IButterflyDefinition.java index 9e7685831..f928b72f8 100644 --- a/src/main/java/forestry/lepidopterology/genetics/IButterflyDefinition.java +++ b/src/main/java/forestry/lepidopterology/genetics/IButterflyDefinition.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.lepidopterology.genetics; -import net.minecraft.item.ItemStack; - import forestry.api.lepidopterology.EnumFlutterType; import forestry.api.lepidopterology.IButterfly; import forestry.api.lepidopterology.IButterflyGenome; import forestry.core.genetics.IGeneticDefinition; +import net.minecraft.item.ItemStack; public interface IButterflyDefinition extends IGeneticDefinition { @Override diff --git a/src/main/java/forestry/lepidopterology/genetics/LepidopteristTracker.java b/src/main/java/forestry/lepidopterology/genetics/LepidopteristTracker.java index c4591494b..b2b1b4264 100755 --- a/src/main/java/forestry/lepidopterology/genetics/LepidopteristTracker.java +++ b/src/main/java/forestry/lepidopterology/genetics/LepidopteristTracker.java @@ -10,18 +10,19 @@ ******************************************************************************/ package forestry.lepidopterology.genetics; -import net.minecraft.entity.player.EntityPlayer; - import forestry.api.genetics.IBreedingTracker; import forestry.api.genetics.IIndividual; import forestry.api.lepidopterology.ButterflyManager; import forestry.api.lepidopterology.IButterfly; import forestry.api.lepidopterology.ILepidopteristTracker; import forestry.core.genetics.BreedingTracker; +import net.minecraft.entity.player.EntityPlayer; public class LepidopteristTracker extends BreedingTracker implements ILepidopteristTracker { - /** Required for creation from map storage */ + /** + * Required for creation from map storage + */ public LepidopteristTracker(String s) { super(s); } diff --git a/src/main/java/forestry/lepidopterology/genetics/alleles/AlleleButterflyEffect.java b/src/main/java/forestry/lepidopterology/genetics/alleles/AlleleButterflyEffect.java index bf3789f8d..dc44fe22f 100644 --- a/src/main/java/forestry/lepidopterology/genetics/alleles/AlleleButterflyEffect.java +++ b/src/main/java/forestry/lepidopterology/genetics/alleles/AlleleButterflyEffect.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.lepidopterology.genetics.alleles; -import javax.annotation.Nullable; - import forestry.api.genetics.IEffectData; import forestry.api.lepidopterology.IAlleleButterflyEffect; import forestry.api.lepidopterology.IEntityButterfly; diff --git a/src/main/java/forestry/lepidopterology/proxy/ProxyLepidopterologyClient.java b/src/main/java/forestry/lepidopterology/proxy/ProxyLepidopterologyClient.java index 8e71bd60c..feaeaca33 100644 --- a/src/main/java/forestry/lepidopterology/proxy/ProxyLepidopterologyClient.java +++ b/src/main/java/forestry/lepidopterology/proxy/ProxyLepidopterologyClient.java @@ -10,14 +10,13 @@ ******************************************************************************/ package forestry.lepidopterology.proxy; -import net.minecraftforge.fml.client.registry.RenderingRegistry; - import forestry.api.core.ForestryAPI; import forestry.core.models.ModelEntry; import forestry.core.proxy.Proxies; import forestry.lepidopterology.entities.EntityButterfly; import forestry.lepidopterology.render.ModelButterflyItem; import forestry.lepidopterology.render.RenderButterflyEntity; +import net.minecraftforge.fml.client.registry.RenderingRegistry; @SuppressWarnings("unused") public class ProxyLepidopterologyClient extends ProxyLepidopterology { diff --git a/src/main/java/forestry/lepidopterology/render/RenderButterflyEntity.java b/src/main/java/forestry/lepidopterology/render/RenderButterflyEntity.java index 3d0a01ead..55000d3cc 100644 --- a/src/main/java/forestry/lepidopterology/render/RenderButterflyEntity.java +++ b/src/main/java/forestry/lepidopterology/render/RenderButterflyEntity.java @@ -10,12 +10,12 @@ ******************************************************************************/ package forestry.lepidopterology.render; +import forestry.lepidopterology.entities.EntityButterfly; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.IRenderFactory; -import forestry.lepidopterology.entities.EntityButterfly; public class RenderButterflyEntity extends RenderLiving { @@ -34,7 +34,7 @@ public class RenderButterflyEntity extends RenderLiving { butterflyModel.setScale(entity.getSize()); super.doRender(entity, x, y, z, light, partialTickTime); } - + @Override public void doRender(EntityButterfly entity, double x, double y, double z, float entityYaw, float partialTickTime) { this.renderButterfly(entity, x, y, z, entityYaw, partialTickTime); @@ -50,12 +50,12 @@ public class RenderButterflyEntity extends RenderLiving { return entity.getWingFlap(partialTickTime); } - public static class Factory implements IRenderFactory{ + public static class Factory implements IRenderFactory { @Override public Render createRenderFor(RenderManager manager) { return new RenderButterflyEntity(manager); } - + } - + } diff --git a/src/main/java/forestry/mail/EventHandlerMailAlert.java b/src/main/java/forestry/mail/EventHandlerMailAlert.java index 439e55329..884ecdafd 100644 --- a/src/main/java/forestry/mail/EventHandlerMailAlert.java +++ b/src/main/java/forestry/mail/EventHandlerMailAlert.java @@ -10,18 +10,16 @@ ******************************************************************************/ package forestry.mail; +import forestry.core.proxy.Proxies; +import forestry.mail.gui.GuiMailboxInfo; +import forestry.mail.network.packets.PacketPOBoxInfoResponse; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; - import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; -import forestry.core.proxy.Proxies; -import forestry.mail.gui.GuiMailboxInfo; -import forestry.mail.network.packets.PacketPOBoxInfoResponse; - public class EventHandlerMailAlert { @SubscribeEvent public void onRenderTick(TickEvent.RenderTickEvent event) { diff --git a/src/main/java/forestry/mail/LetterProperties.java b/src/main/java/forestry/mail/LetterProperties.java index 259f605bf..d7f55eb10 100644 --- a/src/main/java/forestry/mail/LetterProperties.java +++ b/src/main/java/forestry/mail/LetterProperties.java @@ -13,6 +13,9 @@ package forestry.mail; import java.util.ArrayList; import java.util.List; +import forestry.api.core.IModelManager; +import forestry.api.mail.ILetter; +import forestry.mail.items.ItemLetter; import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.block.model.ModelBakery; import net.minecraft.client.renderer.block.model.ModelResourceLocation; @@ -20,14 +23,9 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.api.core.IModelManager; -import forestry.api.mail.ILetter; -import forestry.mail.items.ItemLetter; - public class LetterProperties { private enum State { FRESH, STAMPED, OPENED, EMPTIED diff --git a/src/main/java/forestry/mail/POBox.java b/src/main/java/forestry/mail/POBox.java index be1c8e7df..9b425e095 100755 --- a/src/main/java/forestry/mail/POBox.java +++ b/src/main/java/forestry/mail/POBox.java @@ -13,19 +13,18 @@ package forestry.mail; import javax.annotation.Nullable; import com.google.common.base.Preconditions; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.world.WorldSavedData; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.ILetter; import forestry.api.mail.IMailAddress; import forestry.api.mail.PostManager; import forestry.core.inventory.InventoryAdapter; import forestry.core.utils.InventoryUtil; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.WorldSavedData; public class POBox extends WorldSavedData implements IInventory { @@ -138,7 +137,7 @@ public class POBox extends WorldSavedData implements IInventory { public ItemStack decrStackSize(int var1, int var2) { return letters.decrStackSize(var1, var2); } - + @Override public ItemStack removeStackFromSlot(int index) { return letters.removeStackFromSlot(index); diff --git a/src/main/java/forestry/mail/PostOffice.java b/src/main/java/forestry/mail/PostOffice.java index ddd27a483..e0e4d551f 100755 --- a/src/main/java/forestry/mail/PostOffice.java +++ b/src/main/java/forestry/mail/PostOffice.java @@ -13,12 +13,6 @@ package forestry.mail; import java.io.File; import java.util.LinkedHashMap; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.NonNullList; -import net.minecraft.world.World; -import net.minecraft.world.WorldSavedData; - import forestry.api.mail.EnumPostage; import forestry.api.mail.ILetter; import forestry.api.mail.IMailAddress; @@ -29,6 +23,11 @@ import forestry.api.mail.IStamps; import forestry.api.mail.ITradeStation; import forestry.api.mail.PostManager; import forestry.mail.items.EnumStampDefinition; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.NonNullList; +import net.minecraft.world.World; +import net.minecraft.world.WorldSavedData; public class PostOffice extends WorldSavedData implements IPostOffice { @@ -41,7 +40,7 @@ public class PostOffice extends WorldSavedData implements IPostOffice { public PostOffice() { super(SAVE_NAME); } - + @SuppressWarnings("unused") public PostOffice(String s) { super(s); diff --git a/src/main/java/forestry/mail/PostalCarrier.java b/src/main/java/forestry/mail/PostalCarrier.java index 77e7734cf..143225a45 100755 --- a/src/main/java/forestry/mail/PostalCarrier.java +++ b/src/main/java/forestry/mail/PostalCarrier.java @@ -10,15 +10,6 @@ ******************************************************************************/ package forestry.mail; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.IMailAddress; import forestry.api.mail.IPostOffice; @@ -31,6 +22,13 @@ import forestry.core.render.TextureManager; import forestry.core.utils.PlayerUtil; import forestry.core.utils.Translator; import forestry.mail.network.packets.PacketPOBoxInfoResponse; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class PostalCarrier implements IPostalCarrier { diff --git a/src/main/java/forestry/mail/SaveEventHandlerMail.java b/src/main/java/forestry/mail/SaveEventHandlerMail.java index 0e993c214..bc1a054d0 100755 --- a/src/main/java/forestry/mail/SaveEventHandlerMail.java +++ b/src/main/java/forestry/mail/SaveEventHandlerMail.java @@ -10,9 +10,8 @@ ******************************************************************************/ package forestry.mail; -import net.minecraft.world.World; - import forestry.core.ISaveEventHandler; +import net.minecraft.world.World; public class SaveEventHandlerMail implements ISaveEventHandler { diff --git a/src/main/java/forestry/mail/TradeStation.java b/src/main/java/forestry/mail/TradeStation.java index 1c0d8960c..5231dabb2 100755 --- a/src/main/java/forestry/mail/TradeStation.java +++ b/src/main/java/forestry/mail/TradeStation.java @@ -10,18 +10,7 @@ ******************************************************************************/ package forestry.mail; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.NonNullList; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.world.World; -import net.minecraft.world.WorldSavedData; - import com.mojang.authlib.GameProfile; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.EnumPostage; import forestry.api.mail.EnumTradeStationState; @@ -39,6 +28,15 @@ import forestry.core.utils.PlayerUtil; import forestry.core.utils.Translator; import forestry.mail.inventory.InventoryTradeStation; import forestry.mail.items.EnumStampDefinition; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.NonNullList; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.World; +import net.minecraft.world.WorldSavedData; public class TradeStation extends WorldSavedData implements ITradeStation, IInventoryAdapter { public static final String SAVE_NAME = "TradePO_"; @@ -169,7 +167,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve /* ILETTERHANDLER */ @Override public IPostalState handleLetter(World world, IMailAddress recipient, ItemStack letterstack, boolean doLodge) { - + boolean sendOwnerNotice = doLodge && owner != null; ILetter letter = PostManager.postRegistry.getLetter(letterstack); @@ -244,7 +242,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve mailstack.setTagCompound(nbttagcompound); IPostalState responseState = PostManager.postRegistry.getPostOffice(world).lodgeLetter(world, mailstack, doLodge); - + if (!responseState.isOk()) { return new ResponseNotMailable(responseState); } @@ -289,11 +287,11 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve confirmstack.setTagCompound(nbttagcompound); PostManager.postRegistry.getPostOffice(world).lodgeLetter(world, confirmstack, doLodge); - + removePaper(); removeStamps(new int[]{0, 1}); } - + markDirty(); return EnumDeliveryState.OK; @@ -329,7 +327,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve } private int countStorablePayment(int max, NonNullList exchange) { - + InventoryAdapter test = inventory.copy(); int count = 0; @@ -368,7 +366,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve // Checks if this trade station has enough paper. private boolean hasPaper(int amountRequired) { - + int amountFound = 0; for (ItemStack stack : InventoryUtil.getStacks(inventory, SLOT_LETTERS_1, SLOT_LETTERS_COUNT)) { @@ -589,7 +587,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve public ItemStack decrStackSize(int var1, int var2) { return inventory.decrStackSize(var1, var2); } - + @Override public ItemStack removeStackFromSlot(int index) { return inventory.removeStackFromSlot(index); @@ -627,12 +625,12 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve public boolean hasCustomName() { return true; } - + @Override public ITextComponent getDisplayName() { return inventory.getDisplayName(); } - + @Override public int[] getSlotsForFace(EnumFacing side) { return inventory.getSlotsForFace(side); diff --git a/src/main/java/forestry/mail/TradeStationInfo.java b/src/main/java/forestry/mail/TradeStationInfo.java index 030bcb618..a6d87ec6e 100644 --- a/src/main/java/forestry/mail/TradeStationInfo.java +++ b/src/main/java/forestry/mail/TradeStationInfo.java @@ -10,14 +10,12 @@ ******************************************************************************/ package forestry.mail; -import net.minecraft.item.ItemStack; - import com.mojang.authlib.GameProfile; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.EnumTradeStationState; import forestry.api.mail.IMailAddress; import forestry.api.mail.ITradeStationInfo; +import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; public class TradeStationInfo implements ITradeStationInfo { diff --git a/src/main/java/forestry/mail/commands/CommandMail.java b/src/main/java/forestry/mail/commands/CommandMail.java index b4859282a..d351c8011 100644 --- a/src/main/java/forestry/mail/commands/CommandMail.java +++ b/src/main/java/forestry/mail/commands/CommandMail.java @@ -12,6 +12,13 @@ */ package forestry.mail.commands; +import forestry.api.mail.ITradeStation; +import forestry.api.mail.ITradeStationInfo; +import forestry.api.mail.PostManager; +import forestry.core.commands.CommandHelpers; +import forestry.core.commands.SubCommand; +import forestry.core.utils.StringUtil; +import forestry.mail.MailAddress; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; @@ -21,14 +28,6 @@ import net.minecraft.util.text.Style; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; -import forestry.api.mail.ITradeStation; -import forestry.api.mail.ITradeStationInfo; -import forestry.api.mail.PostManager; -import forestry.core.commands.CommandHelpers; -import forestry.core.commands.SubCommand; -import forestry.core.utils.StringUtil; -import forestry.mail.MailAddress; - /** * @author CovertJaguar */ diff --git a/src/main/java/forestry/mail/gui/ContainerCatalogue.java b/src/main/java/forestry/mail/gui/ContainerCatalogue.java index ceaacb835..66619bf10 100755 --- a/src/main/java/forestry/mail/gui/ContainerCatalogue.java +++ b/src/main/java/forestry/mail/gui/ContainerCatalogue.java @@ -18,11 +18,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IContainerListener; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.EnumTradeStationState; import forestry.api.mail.IMailAddress; @@ -35,6 +30,10 @@ import forestry.core.gui.IGuiSelectable; import forestry.core.network.packets.PacketGuiSelectRequest; import forestry.core.proxy.Proxies; import forestry.mail.network.packets.PacketLetterInfoResponse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IContainerListener; public class ContainerCatalogue extends Container implements IGuiSelectable, ILetterInfoReceiver { diff --git a/src/main/java/forestry/mail/gui/ContainerLetter.java b/src/main/java/forestry/mail/gui/ContainerLetter.java index 578825c98..eac2b54fa 100755 --- a/src/main/java/forestry/mail/gui/ContainerLetter.java +++ b/src/main/java/forestry/mail/gui/ContainerLetter.java @@ -13,13 +13,7 @@ package forestry.mail.gui; import javax.annotation.Nullable; import java.util.Iterator; -import forestry.core.utils.Log; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.server.MinecraftServer; -import net.minecraft.world.World; - import com.mojang.authlib.GameProfile; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.ILetter; import forestry.api.mail.IMailAddress; @@ -30,10 +24,14 @@ import forestry.api.mail.PostManager; import forestry.core.gui.ContainerItemInventory; import forestry.core.gui.slots.SlotFiltered; import forestry.core.proxy.Proxies; +import forestry.core.utils.Log; import forestry.mail.Letter; import forestry.mail.inventory.ItemInventoryLetter; import forestry.mail.network.packets.PacketLetterInfoResponse; import forestry.mail.network.packets.PacketLetterTextSet; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.World; public class ContainerLetter extends ContainerItemInventory implements ILetterInfoReceiver { @@ -130,12 +128,12 @@ public class ContainerLetter extends ContainerItemInventory IMailAddress recipient = getRecipient(server, recipientName, type); getLetter().setRecipient(recipient); - + // Update the trading info if (recipient == null || recipient.getType() == EnumAddressee.TRADER) { updateTradeInfo(player.world, recipient); } - + // Update info on client Proxies.net.sendToPlayer(new PacketLetterInfoResponse(type, tradeInfo, recipient), player); } diff --git a/src/main/java/forestry/mail/gui/ContainerMailbox.java b/src/main/java/forestry/mail/gui/ContainerMailbox.java index 2b1b75b86..4f114bb5d 100755 --- a/src/main/java/forestry/mail/gui/ContainerMailbox.java +++ b/src/main/java/forestry/mail/gui/ContainerMailbox.java @@ -12,12 +12,6 @@ package forestry.mail.gui; import javax.annotation.Nullable; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ClickType; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotOutput; import forestry.core.proxy.Proxies; @@ -26,6 +20,11 @@ import forestry.mail.POBox; import forestry.mail.POBoxInfo; import forestry.mail.network.packets.PacketPOBoxInfoResponse; import forestry.mail.tiles.TileMailbox; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ClickType; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; public class ContainerMailbox extends ContainerTile { diff --git a/src/main/java/forestry/mail/gui/ContainerStampCollector.java b/src/main/java/forestry/mail/gui/ContainerStampCollector.java index e3757b53a..3b09f8139 100644 --- a/src/main/java/forestry/mail/gui/ContainerStampCollector.java +++ b/src/main/java/forestry/mail/gui/ContainerStampCollector.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.mail.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotFiltered; import forestry.core.gui.slots.SlotOutput; import forestry.mail.inventory.InventoryStampCollector; import forestry.mail.tiles.TileStampCollector; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerStampCollector extends ContainerTile { diff --git a/src/main/java/forestry/mail/gui/ContainerTradeName.java b/src/main/java/forestry/mail/gui/ContainerTradeName.java index 43847d1af..4db6d9972 100755 --- a/src/main/java/forestry/mail/gui/ContainerTradeName.java +++ b/src/main/java/forestry/mail/gui/ContainerTradeName.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.mail.gui; -import net.minecraft.entity.player.EntityPlayer; - import forestry.api.mail.IMailAddress; import forestry.core.gui.ContainerTile; import forestry.mail.tiles.TileTrader; +import net.minecraft.entity.player.EntityPlayer; public class ContainerTradeName extends ContainerTile { diff --git a/src/main/java/forestry/mail/gui/ContainerTrader.java b/src/main/java/forestry/mail/gui/ContainerTrader.java index 4274b4391..3cd16581e 100755 --- a/src/main/java/forestry/mail/gui/ContainerTrader.java +++ b/src/main/java/forestry/mail/gui/ContainerTrader.java @@ -10,8 +10,6 @@ ******************************************************************************/ package forestry.mail.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.api.mail.IMailAddress; import forestry.core.gui.ContainerTile; import forestry.core.gui.slots.SlotFiltered; @@ -19,6 +17,7 @@ import forestry.core.gui.slots.SlotForestry; import forestry.core.gui.slots.SlotOutput; import forestry.mail.TradeStation; import forestry.mail.tiles.TileTrader; +import net.minecraft.entity.player.InventoryPlayer; public class ContainerTrader extends ContainerTile { diff --git a/src/main/java/forestry/mail/gui/GuiCatalogue.java b/src/main/java/forestry/mail/gui/GuiCatalogue.java index 3d4c8a54d..e9bfb70b4 100755 --- a/src/main/java/forestry/mail/gui/GuiCatalogue.java +++ b/src/main/java/forestry/mail/gui/GuiCatalogue.java @@ -13,15 +13,6 @@ package forestry.mail.gui; import java.util.ArrayList; import java.util.List; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.input.Keyboard; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.ITradeStationInfo; import forestry.core.config.SessionVars; @@ -30,6 +21,13 @@ import forestry.core.gui.widgets.ItemStackWidget; import forestry.core.gui.widgets.Widget; import forestry.core.render.ColourProperties; import forestry.core.utils.Translator; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.TextFormatting; +import org.lwjgl.input.Keyboard; public class GuiCatalogue extends GuiForestry { diff --git a/src/main/java/forestry/mail/gui/GuiLetter.java b/src/main/java/forestry/mail/gui/GuiLetter.java index a6c6c5879..e9abe4b27 100755 --- a/src/main/java/forestry/mail/gui/GuiLetter.java +++ b/src/main/java/forestry/mail/gui/GuiLetter.java @@ -13,13 +13,6 @@ package forestry.mail.gui; import java.io.IOException; import java.util.ArrayList; -import org.apache.commons.lang3.StringUtils; - -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.entity.player.EntityPlayer; - -import org.lwjgl.input.Keyboard; - import forestry.api.mail.EnumAddressee; import forestry.api.mail.IMailAddress; import forestry.core.config.Constants; @@ -33,6 +26,10 @@ import forestry.core.render.ColourProperties; import forestry.core.utils.Translator; import forestry.mail.inventory.ItemInventoryLetter; import forestry.mail.network.packets.PacketLetterInfoRequest; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.entity.player.EntityPlayer; +import org.apache.commons.lang3.StringUtils; +import org.lwjgl.input.Keyboard; public class GuiLetter extends GuiForestry { @@ -218,7 +215,7 @@ public class GuiLetter extends GuiForestry String recipient = SessionVars.getStringVar("mail.letter.recipient"); String typeName = SessionVars.getStringVar("mail.letter.addressee"); - + if (StringUtils.isNotBlank(recipient) && StringUtils.isNotBlank(typeName)) { address.setText(recipient); diff --git a/src/main/java/forestry/mail/gui/GuiMailbox.java b/src/main/java/forestry/mail/gui/GuiMailbox.java index ba035cf1e..e9f1e88f3 100755 --- a/src/main/java/forestry/mail/gui/GuiMailbox.java +++ b/src/main/java/forestry/mail/gui/GuiMailbox.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.mail.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestry; import forestry.mail.tiles.TileMailbox; +import net.minecraft.entity.player.InventoryPlayer; public class GuiMailbox extends GuiForestry { diff --git a/src/main/java/forestry/mail/gui/GuiStampCollector.java b/src/main/java/forestry/mail/gui/GuiStampCollector.java index 4c8723cff..134032e4a 100644 --- a/src/main/java/forestry/mail/gui/GuiStampCollector.java +++ b/src/main/java/forestry/mail/gui/GuiStampCollector.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.mail.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestry; import forestry.mail.tiles.TileStampCollector; +import net.minecraft.entity.player.InventoryPlayer; public class GuiStampCollector extends GuiForestry { public GuiStampCollector(InventoryPlayer player, TileStampCollector tile) { diff --git a/src/main/java/forestry/mail/gui/GuiTrader.java b/src/main/java/forestry/mail/gui/GuiTrader.java index 8ecc31724..b71769453 100755 --- a/src/main/java/forestry/mail/gui/GuiTrader.java +++ b/src/main/java/forestry/mail/gui/GuiTrader.java @@ -11,13 +11,12 @@ package forestry.mail.gui; import com.google.common.base.Preconditions; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestry; import forestry.core.render.ColourProperties; import forestry.core.utils.Translator; import forestry.mail.tiles.TileTrader; +import net.minecraft.entity.player.InventoryPlayer; public class GuiTrader extends GuiForestry { diff --git a/src/main/java/forestry/mail/inventory/InventoryStampCollector.java b/src/main/java/forestry/mail/inventory/InventoryStampCollector.java index bc587b4ec..10ccb71b7 100644 --- a/src/main/java/forestry/mail/inventory/InventoryStampCollector.java +++ b/src/main/java/forestry/mail/inventory/InventoryStampCollector.java @@ -10,11 +10,10 @@ ******************************************************************************/ package forestry.mail.inventory; -import net.minecraft.item.ItemStack; - import forestry.api.mail.IStamps; import forestry.core.inventory.InventoryAdapterTile; import forestry.mail.tiles.TileStampCollector; +import net.minecraft.item.ItemStack; public class InventoryStampCollector extends InventoryAdapterTile { public static final short SLOT_FILTER = 0; diff --git a/src/main/java/forestry/mail/items/EnumStampDefinition.java b/src/main/java/forestry/mail/items/EnumStampDefinition.java index 3b597cc32..ee530ce2f 100644 --- a/src/main/java/forestry/mail/items/EnumStampDefinition.java +++ b/src/main/java/forestry/mail/items/EnumStampDefinition.java @@ -14,10 +14,9 @@ import java.awt.Color; import java.util.EnumMap; import java.util.Map; -import net.minecraft.init.Items; - import forestry.api.mail.EnumPostage; import forestry.core.items.ItemOverlay; +import net.minecraft.init.Items; public enum EnumStampDefinition implements ItemOverlay.IOverlayInfo { P_1("1n", EnumPostage.P_1, "gemApatite", new Color(0x4a8ca7), new Color(0xffffff)), diff --git a/src/main/java/forestry/mail/items/ItemCatalogue.java b/src/main/java/forestry/mail/items/ItemCatalogue.java index 6df081edd..9749885b5 100644 --- a/src/main/java/forestry/mail/items/ItemCatalogue.java +++ b/src/main/java/forestry/mail/items/ItemCatalogue.java @@ -10,11 +10,11 @@ ******************************************************************************/ package forestry.mail.items; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import forestry.core.items.ItemWithGui; import forestry.mail.gui.ContainerCatalogue; import forestry.mail.gui.GuiCatalogue; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class ItemCatalogue extends ItemWithGui { @Override diff --git a/src/main/java/forestry/mail/items/ItemRegistryMail.java b/src/main/java/forestry/mail/items/ItemRegistryMail.java index 8ae07bc3b..590ad52c1 100644 --- a/src/main/java/forestry/mail/items/ItemRegistryMail.java +++ b/src/main/java/forestry/mail/items/ItemRegistryMail.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.mail.items; -import net.minecraft.item.ItemStack; - import forestry.core.items.ItemRegistry; import forestry.core.utils.OreDictUtil; +import net.minecraft.item.ItemStack; public class ItemRegistryMail extends ItemRegistry { public final ItemStamps stamps; diff --git a/src/main/java/forestry/mail/items/ItemStamps.java b/src/main/java/forestry/mail/items/ItemStamps.java index 5ad941919..7095eccac 100755 --- a/src/main/java/forestry/mail/items/ItemStamps.java +++ b/src/main/java/forestry/mail/items/ItemStamps.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.mail.items; -import net.minecraft.item.ItemStack; - import forestry.api.mail.EnumPostage; import forestry.api.mail.IStamps; import forestry.core.CreativeTabForestry; import forestry.core.items.ItemOverlay; +import net.minecraft.item.ItemStack; public class ItemStamps extends ItemOverlay implements IStamps { public ItemStamps() { diff --git a/src/main/java/forestry/plugins/BlankForestryPlugin.java b/src/main/java/forestry/plugins/BlankForestryPlugin.java index c8739a85c..c4e614d46 100644 --- a/src/main/java/forestry/plugins/BlankForestryPlugin.java +++ b/src/main/java/forestry/plugins/BlankForestryPlugin.java @@ -17,18 +17,16 @@ import java.util.List; import java.util.Random; import java.util.Set; -import net.minecraft.command.ICommand; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkGenerator; - -import net.minecraftforge.fml.common.IFuelHandler; -import net.minecraftforge.fml.common.event.FMLInterModComms.IMCMessage; - import forestry.core.IPickupHandler; import forestry.core.IResupplyHandler; import forestry.core.ISaveEventHandler; import forestry.core.network.IPacketRegistry; +import net.minecraft.command.ICommand; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkGenerator; +import net.minecraftforge.fml.common.IFuelHandler; +import net.minecraftforge.fml.common.event.FMLInterModComms.IMCMessage; public abstract class BlankForestryPlugin implements IForestryPlugin { diff --git a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java index f5ba88713..8bc91c012 100644 --- a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java +++ b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java @@ -14,16 +14,6 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -import net.minecraftforge.fml.common.event.FMLInterModComms; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.oredict.OreDictionary; - import forestry.api.core.ForestryAPI; import forestry.api.recipes.RecipeManagers; import forestry.api.storage.BackpackManager; @@ -37,6 +27,14 @@ import forestry.core.utils.ModUtil; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.common.event.FMLInterModComms; +import net.minecraftforge.fml.common.registry.ForgeRegistries; +import net.minecraftforge.oredict.OreDictionary; @ForestryPlugin(pluginID = ForestryPluginUids.BIOMES_O_PLENTY, name = "BiomesOPlenty", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.biomesoplenty.description") public class PluginBiomesOPlenty extends BlankForestryPlugin { @@ -105,10 +103,10 @@ public class PluginBiomesOPlenty extends BlankForestryPlugin { FMLInterModComms.sendMessage(Constants.MOD_ID, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName)); } } - + //TODO BoP for 1.9: Add farmables // if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.FARMING) && saplings != null && persimmon != null) { - // Farmables.farmables.put("farmArboreal", new FarmableGenericSapling(saplings, 15, persimmon)); + // Farmables.farmables.put("farmArboreal", new FarmableGenericSapling(saplings, 15, persimmon)); // } Block boPTurnip = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(BoP, "turnip")); diff --git a/src/main/java/forestry/plugins/compat/PluginBuildCraftRecipes.java b/src/main/java/forestry/plugins/compat/PluginBuildCraftRecipes.java index cd7bbee70..199da566d 100644 --- a/src/main/java/forestry/plugins/compat/PluginBuildCraftRecipes.java +++ b/src/main/java/forestry/plugins/compat/PluginBuildCraftRecipes.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.plugins.compat; -import net.minecraftforge.fml.common.Optional; - import forestry.core.config.Constants; import forestry.core.utils.ModUtil; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; +import net.minecraftforge.fml.common.Optional; @ForestryPlugin(pluginID = ForestryPluginUids.BUILDCRAFT_RECIPES, name = "BuildCraft 6 Recipes", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.buildcraft6.description") diff --git a/src/main/java/forestry/plugins/compat/PluginBuildCraftStatements.java b/src/main/java/forestry/plugins/compat/PluginBuildCraftStatements.java index 4fae913d1..701ef67d3 100644 --- a/src/main/java/forestry/plugins/compat/PluginBuildCraftStatements.java +++ b/src/main/java/forestry/plugins/compat/PluginBuildCraftStatements.java @@ -10,13 +10,12 @@ ******************************************************************************/ package forestry.plugins.compat; -import net.minecraftforge.fml.common.Optional; - import forestry.core.config.Constants; import forestry.core.utils.ModUtil; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; +import net.minecraftforge.fml.common.Optional; @ForestryPlugin(pluginID = ForestryPluginUids.BUILDCRAFT_STATEMENTS, name = "BuildCraft 6 Statements", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.buildcraft6.description") //@Optional.Interface(iface = "buildcraft.api.statements.ITriggerProvider", modid = "BuildCraftAPI|statements") diff --git a/src/main/java/forestry/plugins/compat/PluginBuildCraftTransport.java b/src/main/java/forestry/plugins/compat/PluginBuildCraftTransport.java index 68fdb3c2b..7c4f4989e 100644 --- a/src/main/java/forestry/plugins/compat/PluginBuildCraftTransport.java +++ b/src/main/java/forestry/plugins/compat/PluginBuildCraftTransport.java @@ -10,12 +10,6 @@ ******************************************************************************/ package forestry.plugins.compat; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.ForgeRegistries; - import forestry.core.PluginCore; import forestry.core.config.Constants; import forestry.core.recipes.RecipeUtil; @@ -24,6 +18,10 @@ import forestry.core.utils.ModUtil; import forestry.plugins.BlankForestryPlugin; import forestry.plugins.ForestryPlugin; import forestry.plugins.ForestryPluginUids; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.common.registry.ForgeRegistries; @ForestryPlugin(pluginID = ForestryPluginUids.BUILDCRAFT_TRANSPORT, name = "BuildCraft 6 Transport", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.buildcraft6.description") public class PluginBuildCraftTransport extends BlankForestryPlugin { diff --git a/src/main/java/forestry/plugins/compat/PluginMalisisDoors.java b/src/main/java/forestry/plugins/compat/PluginMalisisDoors.java index 0e61bce20..183f725dd 100644 --- a/src/main/java/forestry/plugins/compat/PluginMalisisDoors.java +++ b/src/main/java/forestry/plugins/compat/PluginMalisisDoors.java @@ -19,10 +19,10 @@ public class PluginMalisisDoors extends BlankForestryPlugin { public String getFailMessage() { return "Malisis Door's not found"; } - + @Override public void preInit() { CamouflageManager.camouflageAccess.addModIdToBlackList("door", "malisisdoors"); } - + } diff --git a/src/main/java/forestry/storage/ResupplyHandler.java b/src/main/java/forestry/storage/ResupplyHandler.java index 967c13e07..8385ea13c 100755 --- a/src/main/java/forestry/storage/ResupplyHandler.java +++ b/src/main/java/forestry/storage/ResupplyHandler.java @@ -13,19 +13,17 @@ package forestry.storage; import java.util.ArrayList; import java.util.List; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ContainerPlayer; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.eventhandler.Event; - import forestry.api.storage.BackpackResupplyEvent; import forestry.core.IResupplyHandler; import forestry.core.inventory.ItemInventory; import forestry.storage.inventory.ItemInventoryBackpack; import forestry.storage.items.ItemBackpack; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ContainerPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.eventhandler.Event; public class ResupplyHandler implements IResupplyHandler { diff --git a/src/main/java/forestry/storage/gui/ContainerBackpack.java b/src/main/java/forestry/storage/gui/ContainerBackpack.java index 89f2a56d8..37ee832a5 100755 --- a/src/main/java/forestry/storage/gui/ContainerBackpack.java +++ b/src/main/java/forestry/storage/gui/ContainerBackpack.java @@ -10,11 +10,11 @@ ******************************************************************************/ package forestry.storage.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import forestry.core.gui.ContainerItemInventory; import forestry.core.gui.slots.SlotFilteredInventory; import forestry.storage.inventory.ItemInventoryBackpack; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class ContainerBackpack extends ContainerItemInventory { diff --git a/src/main/java/forestry/storage/gui/GuiBackpack.java b/src/main/java/forestry/storage/gui/GuiBackpack.java index b0557120d..e5a224745 100755 --- a/src/main/java/forestry/storage/gui/GuiBackpack.java +++ b/src/main/java/forestry/storage/gui/GuiBackpack.java @@ -10,10 +10,9 @@ ******************************************************************************/ package forestry.storage.gui; -import net.minecraft.inventory.IInventory; - import forestry.core.config.Constants; import forestry.core.gui.GuiForestry; +import net.minecraft.inventory.IInventory; public class GuiBackpack extends GuiForestry { diff --git a/src/main/java/forestry/storage/inventory/ItemInventoryBackpackPaged.java b/src/main/java/forestry/storage/inventory/ItemInventoryBackpackPaged.java index cf357fc2a..ae51c3166 100644 --- a/src/main/java/forestry/storage/inventory/ItemInventoryBackpackPaged.java +++ b/src/main/java/forestry/storage/inventory/ItemInventoryBackpackPaged.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.storage.inventory; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - import forestry.core.gui.GuiHandler; import forestry.core.gui.IPagedInventory; import forestry.storage.items.ItemBackpackNaturalist; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class ItemInventoryBackpackPaged extends ItemInventoryBackpack implements IPagedInventory { private final ItemBackpackNaturalist backpackNaturalist; diff --git a/src/main/java/forestry/storage/items/ItemRegistryStorage.java b/src/main/java/forestry/storage/items/ItemRegistryStorage.java index d2e2aae88..b63ab12ee 100644 --- a/src/main/java/forestry/storage/items/ItemRegistryStorage.java +++ b/src/main/java/forestry/storage/items/ItemRegistryStorage.java @@ -48,7 +48,7 @@ public class ItemRegistryStorage extends ItemRegistry { public ItemRegistryStorage() { // CRATE crate = registerItem(new ItemCrated(ItemStack.EMPTY, null), "crate"); - + // BACKPACKS IBackpackInterface backpackInterface = BackpackManager.backpackInterface; @@ -58,7 +58,7 @@ public class ItemRegistryStorage extends ItemRegistry { } else { apiaristBackpack = null; } - + if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.LEPIDOPTEROLOGY)) { lepidopteristBackpack = registerItem(backpackInterface.createNaturalistBackpack("lepidopterist", ButterflyManager.butterflyRoot), "lepidopteristBag"); lepidopteristBackpack.setCreativeTab(Tabs.tabLepidopterology); diff --git a/src/main/java/forestry/storage/proxy/ProxyStorage.java b/src/main/java/forestry/storage/proxy/ProxyStorage.java index 3d32d1544..dcd66b98a 100644 --- a/src/main/java/forestry/storage/proxy/ProxyStorage.java +++ b/src/main/java/forestry/storage/proxy/ProxyStorage.java @@ -2,7 +2,7 @@ package forestry.storage.proxy; public class ProxyStorage { - public void registerCrateModel(){ + public void registerCrateModel() { } - + } diff --git a/src/main/java/forestry/storage/proxy/ProxyStorageClient.java b/src/main/java/forestry/storage/proxy/ProxyStorageClient.java index 6b9a5afb3..8058ce33b 100644 --- a/src/main/java/forestry/storage/proxy/ProxyStorageClient.java +++ b/src/main/java/forestry/storage/proxy/ProxyStorageClient.java @@ -13,5 +13,5 @@ public class ProxyStorageClient extends ProxyStorage { ModelResourceLocation modelLocation = new ModelResourceLocation("forestry:crate-filled", "crate-filled"); Proxies.render.registerModel(new ModelEntry(modelLocation, new ModelCrate())); } - + }