diff --git a/src/main/java/forestry/Forestry.java b/src/main/java/forestry/Forestry.java
index 93aedf8ed..c7fb349a7 100644
--- a/src/main/java/forestry/Forestry.java
+++ b/src/main/java/forestry/Forestry.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry;
+import java.io.File;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraftforge.common.MinecraftForge;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
@@ -41,10 +45,6 @@ import forestry.core.utils.Log;
import forestry.core.utils.StringUtil;
import forestry.core.worldgen.WorldGenerator;
import forestry.plugins.PluginManager;
-import java.io.File;
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraftforge.common.MinecraftForge;
/**
* Forestry Minecraft Mod
@@ -56,8 +56,7 @@ import net.minecraftforge.common.MinecraftForge;
name = Constants.MOD,
version = Constants.VERSION,
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
- dependencies = "required-after:Forge@[10.13.4.1566,);"
- + "after:Buildcraft|Core@[6.1.7,);"
+ dependencies = "required-after:Forge@[10.13.4.1566,);" + "after:Buildcraft|Core@[6.1.7,);"
+ "after:ExtrabiomesXL;"
+ "after:BiomesOPlenty;"
+ "after:IC2@[2.0.140,);"
diff --git a/src/main/java/forestry/api/apiculture/BeeManager.java b/src/main/java/forestry/api/apiculture/BeeManager.java
index 04eb0ea15..86e9a9b47 100644
--- a/src/main/java/forestry/api/apiculture/BeeManager.java
+++ b/src/main/java/forestry/api/apiculture/BeeManager.java
@@ -7,6 +7,7 @@ package forestry.api.apiculture;
import java.util.ArrayList;
import java.util.HashMap;
+
import net.minecraft.item.ItemStack;
/**
diff --git a/src/main/java/forestry/api/apiculture/DefaultBeeListener.java b/src/main/java/forestry/api/apiculture/DefaultBeeListener.java
index be7bebc52..80064799d 100644
--- a/src/main/java/forestry/api/apiculture/DefaultBeeListener.java
+++ b/src/main/java/forestry/api/apiculture/DefaultBeeListener.java
@@ -8,11 +8,11 @@ package forestry.api.apiculture;
import forestry.api.genetics.IIndividual;
/**
- * Easily extendable default IBeeListener.
- * By itself, this IBeeListener does nothing.
- * BeeListeners should inherit from this class unless they need to listen for everything.
+ * Easily extendable default IBeeListener. By itself, this IBeeListener does nothing. BeeListeners should inherit from
+ * this class unless they need to listen for everything.
*/
public class DefaultBeeListener implements IBeeListener {
+
@Override
public void wearOutEquipment(int amount) {}
diff --git a/src/main/java/forestry/api/apiculture/DefaultBeeModifier.java b/src/main/java/forestry/api/apiculture/DefaultBeeModifier.java
index b6e2bc05c..9beb31b1a 100644
--- a/src/main/java/forestry/api/apiculture/DefaultBeeModifier.java
+++ b/src/main/java/forestry/api/apiculture/DefaultBeeModifier.java
@@ -6,9 +6,8 @@
package forestry.api.apiculture;
/**
- * Easily extendable default IBeeModifier.
- * By itself, this IBeeModifier does nothing.
- * BeeModifiers should inherit from this class unless they modify everything.
+ * Easily extendable default IBeeModifier. By itself, this IBeeModifier does nothing. BeeModifiers should inherit from
+ * this class unless they modify everything.
*/
public class DefaultBeeModifier implements IBeeModifier {
diff --git a/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java b/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java
index 215ff2730..5b8ea22ad 100644
--- a/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java
+++ b/src/main/java/forestry/api/apiculture/EnumBeeChromosome.java
@@ -5,6 +5,8 @@
******************************************************************************/
package forestry.api.apiculture;
+import java.util.Locale;
+
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleArea;
import forestry.api.genetics.IAlleleBoolean;
@@ -14,7 +16,6 @@ import forestry.api.genetics.IAlleleInteger;
import forestry.api.genetics.IAlleleTolerance;
import forestry.api.genetics.IChromosomeType;
import forestry.api.genetics.ISpeciesRoot;
-import java.util.Locale;
/**
* Enum representing the order of chromosomes in a bee's genome and what they control.
@@ -22,6 +23,7 @@ import java.util.Locale;
* @author SirSengir
*/
public enum EnumBeeChromosome implements IChromosomeType {
+
/**
* Species of the bee. Alleles here must implement {@link IAlleleBeeSpecies}.
*/
@@ -43,11 +45,13 @@ public enum EnumBeeChromosome implements IChromosomeType {
*/
TEMPERATURE_TOLERANCE(IAlleleTolerance.class),
/**
- * Slightly incorrectly named. If true, a naturally dirunal bee can work during the night. If true, a naturally nocturnal bee can work during the day.
+ * Slightly incorrectly named. If true, a naturally dirunal bee can work during the night. If true, a naturally
+ * nocturnal bee can work during the day.
*/
NOCTURNAL(IAlleleBoolean.class),
/**
- * Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for FIRE_RESIST.
+ * Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for
+ * FIRE_RESIST.
*/
@Deprecated
HUMIDITY(IAllele.class),
diff --git a/src/main/java/forestry/api/apiculture/EnumBeeType.java b/src/main/java/forestry/api/apiculture/EnumBeeType.java
index 784ee7018..fff076dd5 100644
--- a/src/main/java/forestry/api/apiculture/EnumBeeType.java
+++ b/src/main/java/forestry/api/apiculture/EnumBeeType.java
@@ -5,10 +5,12 @@
******************************************************************************/
package forestry.api.apiculture;
-import forestry.api.genetics.ISpeciesType;
import java.util.Locale;
+import forestry.api.genetics.ISpeciesType;
+
public enum EnumBeeType implements ISpeciesType {
+
DRONE,
PRINCESS,
QUEEN,
diff --git a/src/main/java/forestry/api/apiculture/FlowerManager.java b/src/main/java/forestry/api/apiculture/FlowerManager.java
index e98a5224a..4aea8fd75 100644
--- a/src/main/java/forestry/api/apiculture/FlowerManager.java
+++ b/src/main/java/forestry/api/apiculture/FlowerManager.java
@@ -5,13 +5,26 @@
******************************************************************************/
package forestry.api.apiculture;
-import forestry.api.genetics.IFlowerRegistry;
import java.util.ArrayList;
+
import net.minecraft.item.ItemStack;
+import forestry.api.genetics.IFlowerRegistry;
+
public class FlowerManager {
+
/**
- *
e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);
+ *
+ *
+ *
+ * e.g.FlowerManager.flowerRegister.registerPlantableFlower(
+ * new ItemStack(Blocks.red_flower),
+ * 1.0,
+ * FlowerManager.FlowerTypeVanilla,
+ * FlowerManager.FlowerTypeSnow);
+ *
+ *
+ *
*/
public static IFlowerRegistry flowerRegistry;
@@ -26,8 +39,8 @@ public class FlowerManager {
public static final String FlowerTypeGourd = "flowersGourd";
/**
- * @deprecated since Forestry 3.4. Use IFlowerRegistry.registerPlantableFlower instead.
- * Completely unused since Forestry 4.0, kept for backward compatibility with older mods.
+ * @deprecated since Forestry 3.4. Use IFlowerRegistry.registerPlantableFlower instead. Completely unused since
+ * Forestry 4.0, kept for backward compatibility with older mods.
*/
@Deprecated
public static ArrayList plainFlowers = new ArrayList();
diff --git a/src/main/java/forestry/api/apiculture/IAlleleBeeAcceleratableEffect.java b/src/main/java/forestry/api/apiculture/IAlleleBeeAcceleratableEffect.java
index fb04a363e..c2d8e58f0 100644
--- a/src/main/java/forestry/api/apiculture/IAlleleBeeAcceleratableEffect.java
+++ b/src/main/java/forestry/api/apiculture/IAlleleBeeAcceleratableEffect.java
@@ -4,5 +4,6 @@ import forestry.api.genetics.IEffectData;
@SuppressWarnings("unused")
public interface IAlleleBeeAcceleratableEffect {
+
IEffectData doEffectAccelerated(IBeeGenome genome, IEffectData storedData, IBeeHousing housing, float did);
}
diff --git a/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java b/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java
index cbfa9c5e8..ed0e85924 100644
--- a/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java
+++ b/src/main/java/forestry/api/apiculture/IAlleleBeeEffect.java
@@ -13,11 +13,9 @@ public interface IAlleleBeeEffect extends IAlleleEffect {
/**
* Called by apiaries to cause an effect in the world.
*
- * @param genome
- * Genome of the bee queen causing this effect
- * @param storedData
- * Object containing the stored effect data for the apiary/hive the bee is in.
- * @param housing {@link IBeeHousing} the bee currently resides in.
+ * @param genome Genome of the bee queen causing this effect
+ * @param storedData Object containing the stored effect data for the apiary/hive the bee is in.
+ * @param housing {@link IBeeHousing} the bee currently resides in.
* @return storedData, may have been manipulated.
*/
IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
@@ -26,9 +24,8 @@ public interface IAlleleBeeEffect extends IAlleleEffect {
* Is called to produce bee effects.
*
* @param genome
- * @param storedData
- * Object containing the stored effect data for the apiary/hive the bee is in.
- * @param housing {@link IBeeHousing} the bee currently resides in.
+ * @param storedData Object containing the stored effect data for the apiary/hive the bee is in.
+ * @param housing {@link IBeeHousing} the bee currently resides in.
* @return storedData, may have been manipulated.
*/
IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
diff --git a/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java b/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java
index 920d55c8b..0b97f5fba 100644
--- a/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java
+++ b/src/main/java/forestry/api/apiculture/IAlleleBeeSpecies.java
@@ -5,12 +5,14 @@
******************************************************************************/
package forestry.api.apiculture;
+import java.util.Map;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.genetics.IAlleleSpecies;
-import java.util.Map;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
public interface IAlleleBeeSpecies extends IAlleleSpecies {
@@ -36,6 +38,7 @@ 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);
diff --git a/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java b/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java
index 017902bbd..44241ce01 100644
--- a/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java
+++ b/src/main/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java
@@ -5,27 +5,26 @@
******************************************************************************/
package forestry.api.apiculture;
-import forestry.api.genetics.IAlleleSpeciesCustom;
import net.minecraft.item.ItemStack;
+import forestry.api.genetics.IAlleleSpeciesCustom;
+
public interface IAlleleBeeSpeciesCustom extends IAlleleBeeSpecies, IAlleleSpeciesCustom {
/**
- * Add a product for this bee species.
- * Chance is between 0 and 1.
+ * Add a product for this bee species. Chance is between 0 and 1.
*/
IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance);
/**
- * Add a specialty product for this bee species.
- * Bees only produce their specialty when they are Jubilant (see IJubilanceProvider)
- * Chance is between 0 and 1.
+ * Add a specialty product for this bee species. Bees only produce their specialty when they are Jubilant (see
+ * IJubilanceProvider) Chance is between 0 and 1.
*/
IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance);
/**
- * Set the Jubilance Provider for this bee species.
- * Bees only produce their specialty when they are Jubilant (see IJubilanceProvider)
+ * Set the Jubilance Provider for this bee species. Bees only produce their specialty when they are Jubilant (see
+ * IJubilanceProvider)
*/
IAlleleBeeSpeciesCustom setJubilanceProvider(IJubilanceProvider provider);
@@ -44,6 +43,8 @@ public interface IAlleleBeeSpeciesCustom extends IAlleleBeeSpecies, IAlleleSpeci
/** Use this if you have custom icons for bees. */
IAlleleBeeSpeciesCustom setCustomBeeIconProvider(IBeeIconProvider 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).
+ */
IAlleleBeeSpeciesCustom setCustomBeeIconColourProvider(IBeeIconColourProvider beeIconColourProvider);
}
diff --git a/src/main/java/forestry/api/apiculture/IApiaristTracker.java b/src/main/java/forestry/api/apiculture/IApiaristTracker.java
index 77a76fcc6..ef25b3da8 100644
--- a/src/main/java/forestry/api/apiculture/IApiaristTracker.java
+++ b/src/main/java/forestry/api/apiculture/IApiaristTracker.java
@@ -9,7 +9,8 @@ import forestry.api.genetics.IBreedingTracker;
import forestry.api.genetics.IIndividual;
/**
- * Can be used to garner information on bee breeding. See {@link forestry.api.genetics.ISpeciesRoot} for retrieval functions.
+ * Can be used to garner information on bee breeding. See {@link forestry.api.genetics.ISpeciesRoot} for retrieval
+ * functions.
*
* @author SirSengir
*/
@@ -18,8 +19,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 +31,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 +43,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 1d9b4ef48..f1775e80e 100644
--- a/src/main/java/forestry/api/apiculture/IArmorApiarist.java
+++ b/src/main/java/forestry/api/apiculture/IArmorApiarist.java
@@ -13,12 +13,13 @@ import net.minecraft.item.ItemStack;
* When implemented by armor piece items, allows them to act as apiarist's armor.
*/
public interface IArmorApiarist {
+
/**
* Called when the apiarist's armor acts as protection against an attack.
*
- * @param entity Entity being attacked
- * @param armor Armor item
- * @param cause Optional cause of attack, such as a bee effect identifier
+ * @param entity Entity being attacked
+ * @param armor Armor item
+ * @param cause Optional cause of attack, such as a bee effect identifier
* @param doProtect Whether or not to actually do the side effects of protection
* @return Whether or not the armor should protect the player from that attack
*/
@@ -27,9 +28,9 @@ public interface IArmorApiarist {
/**
* Called when the apiarist's armor acts as protection against an attack.
*
- * @param player Player being attacked
- * @param armor Armor item
- * @param cause Optional cause of attack, such as a bee effect identifier
+ * @param player Player being attacked
+ * @param armor Armor item
+ * @param cause Optional cause of attack, such as a bee effect identifier
* @param doProtect Whether or not to actually do the side effects of protection
* @return Whether or not the armor should protect the player from that attack
* @deprecated since Forestry 4.2. Use protectEntity
diff --git a/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java b/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java
index 4238f2b24..bda8be24d 100644
--- a/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java
+++ b/src/main/java/forestry/api/apiculture/IArmorApiaristHelper.java
@@ -18,9 +18,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
@@ -29,8 +30,9 @@ 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
* @since Forestry 4.2
@@ -39,9 +41,10 @@ public interface IArmorApiaristHelper {
/**
* Called when the apiarist's armor acts as protection against an attack.
- * @param stack ItemStack to check
- * @param player Player being attacked
- * @param cause Optional cause of attack, such as a bee effect identifier
+ *
+ * @param stack ItemStack to check
+ * @param player Player 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
* @deprecated since Forestry 4.2. use the EntityLivingBase version
@@ -51,8 +54,9 @@ public interface IArmorApiaristHelper {
/**
* Called when the apiarist's armor acts as protection against an attack.
- * @param player Player being attacked
- * @param cause Optional cause of attack, such as a bee effect identifier
+ *
+ * @param player Player 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
* @deprecated since Forestry 4.2. use the EntityLivingBase version
diff --git a/src/main/java/forestry/api/apiculture/IBee.java b/src/main/java/forestry/api/apiculture/IBee.java
index 7d5fd84cb..6a3d1421c 100644
--- a/src/main/java/forestry/api/apiculture/IBee.java
+++ b/src/main/java/forestry/api/apiculture/IBee.java
@@ -5,14 +5,16 @@
******************************************************************************/
package forestry.api.apiculture;
+import java.util.List;
+import java.util.Set;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.biome.BiomeGenBase;
+
import forestry.api.core.IErrorState;
import forestry.api.genetics.IEffectData;
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.IIndividualLiving;
-import java.util.List;
-import java.util.Set;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.biome.BiomeGenBase;
/**
* Other implementations than Forestry's default one are not supported.
@@ -43,6 +45,7 @@ public interface IBee extends IIndividualLiving {
/**
* Set the natural flag on this bee.
+ *
* @param flag
*/
void setIsNatural(boolean flag);
@@ -58,6 +61,7 @@ public interface IBee extends IIndividualLiving {
/**
* Determines whether the queen can work.
+ *
* @param housing the {@link IBeeHousing} the bee currently resides in.
* @return an empty set if the queen can work, a set of error states if the queen can not work
*/
diff --git a/src/main/java/forestry/api/apiculture/IBeeFactory.java b/src/main/java/forestry/api/apiculture/IBeeFactory.java
index 515466ea4..7976764dd 100644
--- a/src/main/java/forestry/api/apiculture/IBeeFactory.java
+++ b/src/main/java/forestry/api/apiculture/IBeeFactory.java
@@ -10,37 +10,30 @@ import forestry.api.genetics.IClassification;
public interface IBeeFactory {
/**
- * Creates a new bee species.
- * Automatically registered with AlleleManager.alleleRegistry.registerAllele()
- * See IAlleleBeeSpeciesCustom and IAlleleSpeciesCustom for adding additional properties to the returned species.
+ * Creates a new bee species. Automatically registered with AlleleManager.alleleRegistry.registerAllele() See
+ * IAlleleBeeSpeciesCustom and IAlleleSpeciesCustom 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.
*/
- IAlleleBeeSpeciesCustom createSpecies(
- String uid,
- boolean dominant,
- String authority,
- String unlocalizedName,
- String unlocalizedDescription,
- IClassification branch,
- String binomial,
- int primaryColor,
+ IAlleleBeeSpeciesCustom createSpecies(String uid, boolean dominant, String authority, String unlocalizedName,
+ String unlocalizedDescription, IClassification branch, String binomial, int primaryColor,
int secondaryColor);
/**
- * Creates a new bee branch.
- * Must be registered with AlleleManager.alleleRegistry.getClassification("family.apidae").addMemberGroup();
+ * 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/IBeeHousing.java b/src/main/java/forestry/api/apiculture/IBeeHousing.java
index fb0c182d2..55d7552fd 100644
--- a/src/main/java/forestry/api/apiculture/IBeeHousing.java
+++ b/src/main/java/forestry/api/apiculture/IBeeHousing.java
@@ -5,25 +5,29 @@
******************************************************************************/
package forestry.api.apiculture;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.core.IClimateProvider;
import forestry.api.core.IErrorLogicSource;
import forestry.api.genetics.IHousing;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
public interface IBeeHousing extends IHousing, IClimateProvider, IErrorLogicSource {
/**
- * Used by BeeManager.beeRoot.createBeeHousingModifier(IBeeHousing housing)
- * to combine bee modifiers from several sources that can change over time.
+ * Used by BeeManager.beeRoot.createBeeHousingModifier(IBeeHousing housing) to combine bee modifiers from several
+ * sources that can change over time.
+ *
* @return IBeeModifiers from the housing, frames, etc.
*/
Iterable getBeeModifiers();
/**
- * Used by BeeManager.beeRoot.createBeeHousingListener(IBeeHousing housing)
- * to combine bee listeners from several sources that can change over time.
+ * Used by BeeManager.beeRoot.createBeeHousingListener(IBeeHousing housing) to combine bee listeners from several
+ * sources that can change over time.
+ *
* @return IBeeListeners from the housing, multiblock parts, etc.
*/
Iterable getBeeListeners();
diff --git a/src/main/java/forestry/api/apiculture/IBeeHousingInventory.java b/src/main/java/forestry/api/apiculture/IBeeHousingInventory.java
index 90f9a4102..d2fb804a1 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/IBeeIconColourProvider.java b/src/main/java/forestry/api/apiculture/IBeeIconColourProvider.java
index a663e9c5a..97814ec50 100644
--- a/src/main/java/forestry/api/apiculture/IBeeIconColourProvider.java
+++ b/src/main/java/forestry/api/apiculture/IBeeIconColourProvider.java
@@ -9,5 +9,6 @@ package forestry.api.apiculture;
* Custom colour provider for bees with complicated colors.
*/
public interface IBeeIconColourProvider {
+
int getIconColour(int renderPass);
}
diff --git a/src/main/java/forestry/api/apiculture/IBeeIconProvider.java b/src/main/java/forestry/api/apiculture/IBeeIconProvider.java
index 1424a0929..b1cf8a324 100644
--- a/src/main/java/forestry/api/apiculture/IBeeIconProvider.java
+++ b/src/main/java/forestry/api/apiculture/IBeeIconProvider.java
@@ -9,6 +9,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
public interface IBeeIconProvider {
+
void registerIcons(IIconRegister register);
IIcon getIcon(EnumBeeType type, int renderPass);
diff --git a/src/main/java/forestry/api/apiculture/IBeeListener.java b/src/main/java/forestry/api/apiculture/IBeeListener.java
index 8e9e9bcfa..1bc62ee4f 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/IBeeModifier.java b/src/main/java/forestry/api/apiculture/IBeeModifier.java
index 5185848d2..fd44927f9 100644
--- a/src/main/java/forestry/api/apiculture/IBeeModifier.java
+++ b/src/main/java/forestry/api/apiculture/IBeeModifier.java
@@ -6,30 +6,31 @@
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 38bfbf81f..b27d2a850 100644
--- a/src/main/java/forestry/api/apiculture/IBeeMutation.java
+++ b/src/main/java/forestry/api/apiculture/IBeeMutation.java
@@ -12,12 +12,9 @@ public interface IBeeMutation extends IMutation {
IBeeRoot getRoot();
/**
- * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously!
+ * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an
+ * integer previously!
*/
- float getChance(
- IBeeHousing housing,
- IAlleleBeeSpecies allele0,
- IAlleleBeeSpecies allele1,
- IBeeGenome genome0,
+ float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, IBeeGenome genome0,
IBeeGenome genome1);
}
diff --git a/src/main/java/forestry/api/apiculture/IBeeMutationCustom.java b/src/main/java/forestry/api/apiculture/IBeeMutationCustom.java
index 22b60129d..cf06a483e 100644
--- a/src/main/java/forestry/api/apiculture/IBeeMutationCustom.java
+++ b/src/main/java/forestry/api/apiculture/IBeeMutationCustom.java
@@ -7,4 +7,5 @@ package forestry.api.apiculture;
import forestry.api.genetics.IMutationCustom;
-public interface IBeeMutationCustom extends IBeeMutation, IMutationCustom {}
+public interface IBeeMutationCustom extends IBeeMutation, IMutationCustom {
+}
diff --git a/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java b/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java
index dd9f1c864..b0a6b62ea 100644
--- a/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java
+++ b/src/main/java/forestry/api/apiculture/IBeeMutationFactory.java
@@ -8,17 +8,17 @@ package forestry.api.apiculture;
import forestry.api.genetics.IAllele;
public interface IBeeMutationFactory {
+
/**
- * Creates a new bee mutation.
- * Automatically registered with BeeManager.beeRoot.registerMutation()
- * See IBeeMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
+ * Creates a new bee mutation. Automatically registered with BeeManager.beeRoot.registerMutation() See
+ * IBeeMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
*
* @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.
*/
- IBeeMutationCustom createMutation(
- IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance);
+ IBeeMutationCustom createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result,
+ int chance);
}
diff --git a/src/main/java/forestry/api/apiculture/IBeeRoot.java b/src/main/java/forestry/api/apiculture/IBeeRoot.java
index 0e1480030..f49ed1f32 100644
--- a/src/main/java/forestry/api/apiculture/IBeeRoot.java
+++ b/src/main/java/forestry/api/apiculture/IBeeRoot.java
@@ -5,15 +5,18 @@
******************************************************************************/
package forestry.api.apiculture;
-import com.mojang.authlib.GameProfile;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.ISpeciesRoot;
import java.util.ArrayList;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
+import com.mojang.authlib.GameProfile;
+
+import forestry.api.genetics.IAllele;
+import forestry.api.genetics.ISpeciesRoot;
+
public interface IBeeRoot extends ISpeciesRoot {
/**
@@ -69,8 +72,7 @@ public interface IBeeRoot extends ISpeciesRoot {
boolean isMated(ItemStack stack);
/**
- * @param genome
- * Valid {@link IBeeGenome}
+ * @param genome Valid {@link IBeeGenome}
* @return {@link IBee} from the passed genome
*/
IBee getBee(World world, IBeeGenome genome);
@@ -78,10 +80,8 @@ public interface IBeeRoot extends ISpeciesRoot {
/**
* Creates an IBee suitable for a queen containing the necessary second genome for the mate.
*
- * @param genome
- * Valid {@link IBeeGenome}
- * @param mate
- * Valid {@link IBee} representing the mate.
+ * @param genome Valid {@link IBeeGenome}
+ * @param mate Valid {@link IBee} representing the mate.
* @return Mated {@link IBee} from the passed genomes.
*/
IBee getBee(World world, IBeeGenome genome, IBee mate);
@@ -109,20 +109,19 @@ public interface IBeeRoot extends ISpeciesRoot {
/* MISC */
/**
- * Creates beekeepingLogic for a housing.
- * Should be used when the housing is created, see IBeekeepingLogic
+ * Creates beekeepingLogic for a housing. Should be used when the housing is created, see IBeekeepingLogic
*/
IBeekeepingLogic createBeekeepingLogic(IBeeHousing housing);
/**
- * Combines multiple modifiers from an IBeeHousing into one.
- * Stays up to date with changes to the housing's modifiers.
+ * Combines multiple modifiers from an IBeeHousing into one. Stays up to date with changes to the housing's
+ * modifiers.
*/
IBeeModifier createBeeHousingModifier(IBeeHousing housing);
/**
- * Combines multiple listeners from an IBeeHousing into one.
- * Stays up to date with changes to the housing's listeners.
+ * Combines multiple listeners from an IBeeHousing into one. Stays up to date with changes to the housing's
+ * listeners.
*/
IBeeListener createBeeHousingListener(IBeeHousing housing);
}
diff --git a/src/main/java/forestry/api/apiculture/IBeekeepingLogic.java b/src/main/java/forestry/api/apiculture/IBeekeepingLogic.java
index a28972c5c..4c577d012 100644
--- a/src/main/java/forestry/api/apiculture/IBeekeepingLogic.java
+++ b/src/main/java/forestry/api/apiculture/IBeekeepingLogic.java
@@ -5,12 +5,12 @@
******************************************************************************/
package forestry.api.apiculture;
-import forestry.api.core.INBTTagable;
import net.minecraft.entity.player.EntityPlayerMP;
+import forestry.api.core.INBTTagable;
+
/**
- * Stores beekeeping logic for bee housings.
- * Get one with BeeManager.beeRoot.createBeekeepingLogic(IBeeHousing housing)
+ * Stores beekeeping logic for bee housings. Get one with BeeManager.beeRoot.createBeekeepingLogic(IBeeHousing housing)
* Save and load it to NBT using the INBTTagable methods.
*/
public interface IBeekeepingLogic extends INBTTagable {
@@ -19,6 +19,7 @@ public interface IBeekeepingLogic extends INBTTagable {
/**
* Checks that the bees can work, setting error conditions on the housing where needed
+ *
* @return true if no errors are present and doWork should be called
*/
boolean canWork();
@@ -31,29 +32,26 @@ public interface IBeekeepingLogic extends INBTTagable {
/* CLIENT */
/**
- * Call this when the housing comes into view of the client.
- * (i.e. when tile.getDescriptionPacket() is called)
+ * Call this when the housing comes into view of the client. (i.e. when tile.getDescriptionPacket() is called)
*/
void syncToClient();
void syncToClient(EntityPlayerMP player);
/**
- * Get the progress bar for breeding and production.
- * To avoid network spam, this is only available server-side,
- * and must be synced manually to the client when a GUI is open.
+ * Get the progress bar for breeding and production. To avoid network spam, this is only available server-side, and
+ * must be synced manually to the client when a GUI is open.
*/
int getBeeProgressPercent();
/**
- * Whether bee fx should be active.
- * Internally, this is automatically synced to the client.
+ * Whether bee fx should be active. Internally, this is automatically synced to the client.
*/
boolean canDoBeeFX();
/**
- * Display bee fx. Calls IBee.doFX(IEffectData[] storedData, IBeeHousing housing) on the queen.
- * Internally, the queen is automatically synced to the client for the fx.
+ * Display bee fx. Calls IBee.doFX(IEffectData[] storedData, IBeeHousing housing) on the queen. Internally, the
+ * queen is automatically synced to the client for the fx.
*/
void doBeeFX();
}
diff --git a/src/main/java/forestry/api/apiculture/IBeekeepingMode.java b/src/main/java/forestry/api/apiculture/IBeekeepingMode.java
index 3eae06269..fa420edf3 100644
--- a/src/main/java/forestry/api/apiculture/IBeekeepingMode.java
+++ b/src/main/java/forestry/api/apiculture/IBeekeepingMode.java
@@ -6,6 +6,7 @@
package forestry.api.apiculture;
import java.util.ArrayList;
+
import net.minecraft.world.World;
public interface IBeekeepingMode {
@@ -49,7 +50,8 @@ public interface IBeekeepingMode {
* @param queen
* @param offspring
* @param housing
- * @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect.
+ * @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with
+ * chance). will trigger a negative effect.
*/
boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing);
diff --git a/src/main/java/forestry/api/apiculture/IHiveDrop.java b/src/main/java/forestry/api/apiculture/IHiveDrop.java
index c1c338448..c54f73ebf 100644
--- a/src/main/java/forestry/api/apiculture/IHiveDrop.java
+++ b/src/main/java/forestry/api/apiculture/IHiveDrop.java
@@ -6,6 +6,7 @@
package forestry.api.apiculture;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -28,9 +29,9 @@ public interface IHiveDrop {
* Chance to drop. Default drops have 80 (= 80 %).
*
* @param world Minecraft world this is called for.
- * @param x x-Coordinate of the broken hive.
- * @param y y-Coordinate of the broken hive.
- * @param z z-Coordinate of the broken hive.
+ * @param x x-Coordinate of the broken hive.
+ * @param y y-Coordinate of the broken hive.
+ * @param z z-Coordinate of the broken hive.
* @return Chance for drop as an integer of 0 - 100.
*/
int getChance(World world, int x, int y, int z);
diff --git a/src/main/java/forestry/api/apiculture/IHiveFrame.java b/src/main/java/forestry/api/apiculture/IHiveFrame.java
index e0690ba27..4fde6a58a 100644
--- a/src/main/java/forestry/api/apiculture/IHiveFrame.java
+++ b/src/main/java/forestry/api/apiculture/IHiveFrame.java
@@ -13,9 +13,10 @@ 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.
*/
ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear);
diff --git a/src/main/java/forestry/api/apiculture/IJubilanceFactory.java b/src/main/java/forestry/api/apiculture/IJubilanceFactory.java
index fcbfcce54..877793127 100644
--- a/src/main/java/forestry/api/apiculture/IJubilanceFactory.java
+++ b/src/main/java/forestry/api/apiculture/IJubilanceFactory.java
@@ -8,6 +8,7 @@ package forestry.api.apiculture;
import net.minecraft.block.Block;
public interface IJubilanceFactory {
+
/** The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. */
IJubilanceProvider getDefault();
diff --git a/src/main/java/forestry/api/apiculture/IJubilanceProvider.java b/src/main/java/forestry/api/apiculture/IJubilanceProvider.java
index 8a5a025f5..e99d04a88 100644
--- a/src/main/java/forestry/api/apiculture/IJubilanceProvider.java
+++ b/src/main/java/forestry/api/apiculture/IJubilanceProvider.java
@@ -8,8 +8,8 @@ package forestry.api.apiculture;
public interface IJubilanceProvider {
/**
- * Returns true when conditions are right to make this species Jubilant.
- * Jubilant bees can produce their Specialty products.
+ * Returns true when conditions are right to make this species Jubilant. Jubilant bees can produce their Specialty
+ * products.
*/
boolean isJubilant(IAlleleBeeSpecies species, IBeeGenome genome, IBeeHousing housing);
diff --git a/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java b/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java
index 10ca5004f..a1d0ac9d0 100644
--- a/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java
+++ b/src/main/java/forestry/api/apiculture/hives/IHiveDescription.java
@@ -5,12 +5,13 @@
******************************************************************************/
package forestry.api.apiculture.hives;
-import forestry.api.core.EnumHumidity;
-import forestry.api.core.EnumTemperature;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
+import forestry.api.core.EnumHumidity;
+import forestry.api.core.EnumTemperature;
+
public interface IHiveDescription {
/**
@@ -26,8 +27,8 @@ public interface IHiveDescription {
int getMeta();
/**
- * returns true if the hive can be generated in these conditions.
- * Used as a fast early-elimination check for hives that have no hope of spawning in the area.
+ * returns true if the hive can be generated in these conditions. Used as a fast early-elimination check for hives
+ * that have no hope of spawning in the area.
*/
boolean isGoodBiome(BiomeGenBase biome);
@@ -36,15 +37,14 @@ public interface IHiveDescription {
boolean isGoodTemperature(EnumTemperature temperature);
/**
- * float representing the relative chance a hive will generate in a chunk.
- * Default is 1.0, higher numbers result in more hives, smaller will result in fewer.
- * Tree hives want around 3.0 to 4.0 since there are less locations to generate on.
+ * float representing the relative chance a hive will generate in a chunk. Default is 1.0, higher numbers result in
+ * more hives, smaller will result in fewer. Tree hives want around 3.0 to 4.0 since there are less locations to
+ * generate on.
*/
float getGenChance();
/**
- * Called after successful hive generation.
- * world, x, y, z give the location of the new hive.
+ * Called after successful hive generation. world, x, y, z give the location of the new hive.
**/
void postGen(World world, int x, int y, int z);
}
diff --git a/src/main/java/forestry/api/apiculture/hives/IHiveGen.java b/src/main/java/forestry/api/apiculture/hives/IHiveGen.java
index e0be1ddfb..3b3867f4b 100644
--- a/src/main/java/forestry/api/apiculture/hives/IHiveGen.java
+++ b/src/main/java/forestry/api/apiculture/hives/IHiveGen.java
@@ -10,14 +10,13 @@ import net.minecraft.world.World;
public interface IHiveGen {
/**
- * return a Y value that the hive should try to generate at.
- * returns negative if the hive can't be placed anywhere.
+ * return a Y value that the hive should try to generate at. returns negative if the hive can't be placed anywhere.
*/
int getYForHive(World world, int x, int z);
/**
- * returns true if the hive can be generated at this location.
- * Used for advanced conditions, like checking that the ground below the hive is a certain type.
+ * returns true if the hive can be generated at this location. Used for advanced conditions, like checking that the
+ * ground below the hive is a certain type.
*/
boolean isValidLocation(World world, int x, int y, int z);
diff --git a/src/main/java/forestry/api/apiculture/hives/IHiveGenHelper.java b/src/main/java/forestry/api/apiculture/hives/IHiveGenHelper.java
index 04b0ec82c..23f91a771 100644
--- a/src/main/java/forestry/api/apiculture/hives/IHiveGenHelper.java
+++ b/src/main/java/forestry/api/apiculture/hives/IHiveGenHelper.java
@@ -10,8 +10,8 @@ import net.minecraft.block.Block;
public interface IHiveGenHelper {
/**
- * Returns a hiveGen for a hive that spawns on the ground.
- * validGroundBlocks specifies which block materials it can spawn on.
+ * Returns a hiveGen for a hive that spawns on the ground. validGroundBlocks specifies which block materials it can
+ * spawn on.
*/
IHiveGen ground(Block... validGroundBlocks);
diff --git a/src/main/java/forestry/api/apiculture/hives/IHiveRegistry.java b/src/main/java/forestry/api/apiculture/hives/IHiveRegistry.java
index 20b871a5f..9e598c061 100644
--- a/src/main/java/forestry/api/apiculture/hives/IHiveRegistry.java
+++ b/src/main/java/forestry/api/apiculture/hives/IHiveRegistry.java
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.apiculture.hives;
-import forestry.api.apiculture.IHiveDrop;
import java.util.List;
+import forestry.api.apiculture.IHiveDrop;
+
public interface IHiveRegistry {
/* Forestry Hive Names */
diff --git a/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java b/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java
index dd1234d21..49c732b9c 100644
--- a/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java
+++ b/src/main/java/forestry/api/arboriculture/EnumFruitFamily.java
@@ -5,11 +5,13 @@
******************************************************************************/
package forestry.api.arboriculture;
-import forestry.api.genetics.AlleleManager;
-import forestry.api.genetics.IFruitFamily;
import net.minecraft.util.StatCollector;
+import forestry.api.genetics.AlleleManager;
+import forestry.api.genetics.IFruitFamily;
+
public enum EnumFruitFamily implements IFruitFamily {
+
PRUNES("prunes", "Prunus domestica"),
POMES("pomes", "Pomum"),
JUNGLE("jungle", "Tropicus"),
diff --git a/src/main/java/forestry/api/arboriculture/EnumGermlingType.java b/src/main/java/forestry/api/arboriculture/EnumGermlingType.java
index 813da063a..32c0ac8b0 100644
--- a/src/main/java/forestry/api/arboriculture/EnumGermlingType.java
+++ b/src/main/java/forestry/api/arboriculture/EnumGermlingType.java
@@ -8,6 +8,7 @@ package forestry.api.arboriculture;
import forestry.api.genetics.ISpeciesType;
public enum EnumGermlingType implements ISpeciesType {
+
SAPLING("sapling"),
BLOSSOM("blossom"),
POLLEN("pollen"),
diff --git a/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java b/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java
index 9a30c90ff..e8581ac12 100644
--- a/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java
+++ b/src/main/java/forestry/api/arboriculture/EnumTreeChromosome.java
@@ -5,6 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
+import java.util.Locale;
+
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleArea;
import forestry.api.genetics.IAlleleBoolean;
@@ -14,14 +18,13 @@ import forestry.api.genetics.IAllelePlantType;
import forestry.api.genetics.IChromosomeType;
import forestry.api.genetics.IFruitFamily;
import forestry.api.genetics.ISpeciesRoot;
-import java.util.Locale;
-import net.minecraftforge.common.EnumPlantType;
public enum EnumTreeChromosome implements IChromosomeType {
/**
- * Determines the following: - WorldGen, including the used wood blocks - {@link IFruitFamily}s supported. Limits which {@link IFruitProvider}
- * will actually yield fruit with this species. - Native {@link EnumPlantType} for this tree. Combines with the PLANT chromosome.
+ * Determines the following: - WorldGen, including the used wood blocks - {@link IFruitFamily}s supported. Limits
+ * which {@link IFruitProvider} will actually yield fruit with this species. - Native {@link EnumPlantType} for this
+ * tree. Combines with the PLANT chromosome.
*/
SPECIES(IAlleleTreeSpecies.class),
/**
@@ -37,7 +40,8 @@ public enum EnumTreeChromosome implements IChromosomeType {
*/
FERTILITY(IAlleleFloat.class),
/**
- * {@link IFruitProvider}, determines if and what fruits are grown on the tree. Limited by the {@link IFruitFamily}s the species supports.
+ * {@link IFruitProvider}, determines if and what fruits are grown on the tree. Limited by the {@link IFruitFamily}s
+ * the species supports.
*/
FRUITS(IAlleleFruit.class),
/**
@@ -69,8 +73,7 @@ public enum EnumTreeChromosome implements IChromosomeType {
/**
* Determines if the tree can burn.
*/
- FIREPROOF(IAlleleBoolean.class),
- ;
+ FIREPROOF(IAlleleBoolean.class),;
Class extends IAllele> clss;
diff --git a/src/main/java/forestry/api/arboriculture/EnumWoodType.java b/src/main/java/forestry/api/arboriculture/EnumWoodType.java
index 290f05b41..3f7c816eb 100644
--- a/src/main/java/forestry/api/arboriculture/EnumWoodType.java
+++ b/src/main/java/forestry/api/arboriculture/EnumWoodType.java
@@ -7,9 +7,11 @@ package forestry.api.arboriculture;
import java.util.Locale;
import java.util.Random;
+
import net.minecraft.nbt.NBTTagCompound;
public enum EnumWoodType {
+
LARCH,
TEAK,
ACACIA,
diff --git a/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java b/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java
index 525393824..35387be2a 100644
--- a/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java
+++ b/src/main/java/forestry/api/arboriculture/IAlleleLeafEffect.java
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
+import net.minecraft.world.World;
+
import forestry.api.genetics.IAlleleEffect;
import forestry.api.genetics.IEffectData;
-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 9412a65f7..d57d506ae 100644
--- a/src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java
+++ b/src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java
@@ -5,13 +5,15 @@
******************************************************************************/
package forestry.api.arboriculture;
+import java.util.Collection;
+
+import net.minecraft.util.IIcon;
+import net.minecraftforge.common.EnumPlantType;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IFruitFamily;
-import java.util.Collection;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.common.EnumPlantType;
public interface IAlleleTreeSpecies extends IAlleleSpecies {
diff --git a/src/main/java/forestry/api/arboriculture/IAlleleTreeSpeciesCustom.java b/src/main/java/forestry/api/arboriculture/IAlleleTreeSpeciesCustom.java
index 088b80670..ce47c6b71 100644
--- a/src/main/java/forestry/api/arboriculture/IAlleleTreeSpeciesCustom.java
+++ b/src/main/java/forestry/api/arboriculture/IAlleleTreeSpeciesCustom.java
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.genetics.IAlleleSpeciesCustom;
import forestry.api.genetics.IFruitFamily;
-import net.minecraftforge.common.EnumPlantType;
public interface IAlleleTreeSpeciesCustom extends IAlleleSpeciesCustom, IAlleleTreeSpecies {
diff --git a/src/main/java/forestry/api/arboriculture/IArboristTracker.java b/src/main/java/forestry/api/arboriculture/IArboristTracker.java
index 66329b342..0a5907cbf 100644
--- a/src/main/java/forestry/api/arboriculture/IArboristTracker.java
+++ b/src/main/java/forestry/api/arboriculture/IArboristTracker.java
@@ -7,4 +7,5 @@ package forestry.api.arboriculture;
import forestry.api.genetics.IBreedingTracker;
-public interface IArboristTracker extends IBreedingTracker {}
+public interface IArboristTracker extends IBreedingTracker {
+}
diff --git a/src/main/java/forestry/api/arboriculture/IFruitProvider.java b/src/main/java/forestry/api/arboriculture/IFruitProvider.java
index fd083c542..c9058ca44 100644
--- a/src/main/java/forestry/api/arboriculture/IFruitProvider.java
+++ b/src/main/java/forestry/api/arboriculture/IFruitProvider.java
@@ -5,14 +5,15 @@
******************************************************************************/
package forestry.api.arboriculture;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.genetics.IFruitFamily;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.genetics.IFruitFamily;
+
public interface IFruitProvider {
IFruitFamily getFamily();
@@ -43,8 +44,7 @@ public interface IFruitProvider {
* @param x
* @param y
* @param z
- * @param ripeningTime
- * Elapsed ripening time for the fruit.
+ * @param ripeningTime Elapsed ripening time for the fruit.
* @param fancy
* @return IIcon index of the texture to overlay on the leaf block.
*/
diff --git a/src/main/java/forestry/api/arboriculture/IGermlingIconProvider.java b/src/main/java/forestry/api/arboriculture/IGermlingIconProvider.java
index c96dea9cc..c2d9db384 100644
--- a/src/main/java/forestry/api/arboriculture/IGermlingIconProvider.java
+++ b/src/main/java/forestry/api/arboriculture/IGermlingIconProvider.java
@@ -9,11 +9,11 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
/**
- * Provides icons for saplings, pollen, etc.
- * You must implement this yourself to use TreeManager.treeFactory.createSpecies()
- * There is no default implementation because every sapling has a unique icon.
+ * Provides icons for saplings, pollen, etc. You must implement this yourself to use
+ * TreeManager.treeFactory.createSpecies() There is no default implementation because every sapling has a unique icon.
*/
public interface IGermlingIconProvider {
+
void registerIcons(IIconRegister register);
IIcon getIcon(EnumGermlingType type, int renderPass);
diff --git a/src/main/java/forestry/api/arboriculture/IGrowthProvider.java b/src/main/java/forestry/api/arboriculture/IGrowthProvider.java
index c3c872241..2c3efadc5 100644
--- a/src/main/java/forestry/api/arboriculture/IGrowthProvider.java
+++ b/src/main/java/forestry/api/arboriculture/IGrowthProvider.java
@@ -12,17 +12,17 @@ public interface IGrowthProvider {
/**
* Check to see whether a sapling at the given location with the given genome can grow into a tree.
*
- * @param genome Genome of the tree this is called for.
- * @param world Minecraft world the tree will inhabit.
- * @param xPos x-Coordinate to attempt growth at.
- * @param yPos y-Coordinate to attempt growth at.
- * @param zPos z-Coordinate to attempt growth at.
- * @param expectedGirth Trunk size of the tree to generate.
+ * @param genome Genome of the tree this is called for.
+ * @param world Minecraft world the tree will inhabit.
+ * @param xPos x-Coordinate to attempt growth at.
+ * @param yPos y-Coordinate to attempt growth at.
+ * @param zPos z-Coordinate to attempt growth at.
+ * @param expectedGirth Trunk size of the tree to generate.
* @param expectedHeight Height of the tree to generate.
* @return true if the tree can grow at the given coordinates, false otherwise.
*/
- boolean canGrow(
- ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth, int expectedHeight);
+ boolean canGrow(ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth,
+ int expectedHeight);
EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, int xPos, int yPos, int zPos);
diff --git a/src/main/java/forestry/api/arboriculture/ILeafIconProvider.java b/src/main/java/forestry/api/arboriculture/ILeafIconProvider.java
index 43f81159f..9b9d9d1f2 100644
--- a/src/main/java/forestry/api/arboriculture/ILeafIconProvider.java
+++ b/src/main/java/forestry/api/arboriculture/ILeafIconProvider.java
@@ -8,13 +8,14 @@ package forestry.api.arboriculture;
import net.minecraft.util.IIcon;
/**
- * Provides icons for leaves. Used by TreeManager.treeFactory.createSpecies()
- * Get a default Forestry implementation from TreeManager.treeFactory.getLeafIconProvider() or implement your own.
+ * Provides icons for leaves. Used by TreeManager.treeFactory.createSpecies() Get a default Forestry implementation from
+ * TreeManager.treeFactory.getLeafIconProvider() or implement your own.
*
- * If you implement your own, be sure to register the icons.
- * Icon registration is not done here because these icons are heavily reused.
+ * If you implement your own, be sure to register the icons. Icon registration is not done here because these icons are
+ * heavily reused.
*/
public interface ILeafIconProvider {
+
IIcon getIcon(boolean pollinated, boolean fancy);
int getColor(boolean pollinated);
diff --git a/src/main/java/forestry/api/arboriculture/ILeafTickHandler.java b/src/main/java/forestry/api/arboriculture/ILeafTickHandler.java
index e1d596496..99eef2194 100644
--- a/src/main/java/forestry/api/arboriculture/ILeafTickHandler.java
+++ b/src/main/java/forestry/api/arboriculture/ILeafTickHandler.java
@@ -8,5 +8,6 @@ package forestry.api.arboriculture;
import net.minecraft.world.World;
public interface ILeafTickHandler {
+
boolean onRandomLeafTick(ITree tree, World world, int x, int y, int z, boolean isDestroyed);
}
diff --git a/src/main/java/forestry/api/arboriculture/IToolGrafter.java b/src/main/java/forestry/api/arboriculture/IToolGrafter.java
index 205e15dde..cda21c32e 100644
--- a/src/main/java/forestry/api/arboriculture/IToolGrafter.java
+++ b/src/main/java/forestry/api/arboriculture/IToolGrafter.java
@@ -10,14 +10,15 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public interface IToolGrafter {
+
/**
* Called by leaves to determine the increase in sapling droprate.
*
* @param stack ItemStack containing the grafter.
* @param world Minecraft world the player and the target block inhabit.
- * @param x x-Coordinate of the broken leaf block.
- * @param y y-Coordinate of the broken leaf block.
- * @param z z-Coordinate of the broken leaf block.
+ * @param x x-Coordinate of the broken leaf block.
+ * @param y y-Coordinate of the broken leaf block.
+ * @param z z-Coordinate of the broken leaf block.
* @return Float representing the factor the usual drop chance is to be multiplied by.
*/
float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, int x, int y, int z);
diff --git a/src/main/java/forestry/api/arboriculture/ITree.java b/src/main/java/forestry/api/arboriculture/ITree.java
index 2279da229..1cdf241c2 100644
--- a/src/main/java/forestry/api/arboriculture/ITree.java
+++ b/src/main/java/forestry/api/arboriculture/ITree.java
@@ -5,16 +5,19 @@
******************************************************************************/
package forestry.api.arboriculture;
-import com.mojang.authlib.GameProfile;
-import forestry.api.genetics.IEffectData;
-import forestry.api.genetics.IIndividual;
-import forestry.api.world.ITreeGenData;
import java.util.EnumSet;
+
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.common.EnumPlantType;
+import com.mojang.authlib.GameProfile;
+
+import forestry.api.genetics.IEffectData;
+import forestry.api.genetics.IIndividual;
+import forestry.api.world.ITreeGenData;
+
public interface ITree extends IIndividual, ITreeGenData {
void mate(ITree other);
diff --git a/src/main/java/forestry/api/arboriculture/ITreeFactory.java b/src/main/java/forestry/api/arboriculture/ITreeFactory.java
index fbcaf2d5c..963e56e4c 100644
--- a/src/main/java/forestry/api/arboriculture/ITreeFactory.java
+++ b/src/main/java/forestry/api/arboriculture/ITreeFactory.java
@@ -5,38 +5,32 @@
******************************************************************************/
package forestry.api.arboriculture;
-import forestry.api.genetics.IClassification;
import java.awt.Color;
+import forestry.api.genetics.IClassification;
+
public interface ITreeFactory {
+
/**
- * Creates a new tree species.
- * Automatically registered with AlleleManager.alleleRegistry.registerAllele()
- * See IAlleleTreeSpeciesCustom and IAlleleSpeciesCustom for adding additional properties to the returned species.
+ * Creates a new tree species. Automatically registered with AlleleManager.alleleRegistry.registerAllele() See
+ * IAlleleTreeSpeciesCustom and IAlleleSpeciesCustom 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 leafIconProvider The leaf icon provider for this species
- * @param germlingIconProvider The germling icon provider for this species
- * @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 leafIconProvider The leaf icon provider for this species
+ * @param germlingIconProvider The germling icon provider for this species
+ * @param generator The tree generator
* @return a new tree species allele.
*/
- IAlleleTreeSpeciesCustom createSpecies(
- String uid,
- String unlocalizedName,
- String authority,
- String unlocalizedDescription,
- boolean dominant,
- IClassification branch,
- String binomial,
- ILeafIconProvider leafIconProvider,
- IGermlingIconProvider germlingIconProvider,
- ITreeGenerator generator);
+ IAlleleTreeSpeciesCustom createSpecies(String uid, String unlocalizedName, String authority,
+ String unlocalizedDescription, boolean dominant, IClassification branch, String binomial,
+ ILeafIconProvider leafIconProvider, IGermlingIconProvider germlingIconProvider, ITreeGenerator generator);
/** Get one of the built-in Forestry leaf types. Default type is deciduous. */
ILeafIconProvider 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 ff94c3323..4ddecfc16 100644
--- a/src/main/java/forestry/api/arboriculture/ITreeGenerator.java
+++ b/src/main/java/forestry/api/arboriculture/ITreeGenerator.java
@@ -5,16 +5,18 @@
******************************************************************************/
package forestry.api.arboriculture;
-import com.mojang.authlib.GameProfile;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.common.util.ForgeDirection;
+import com.mojang.authlib.GameProfile;
+import forestry.api.world.ITreeGenData;
+
/**
* Implements the tree generation for a tree species.
*/
public interface ITreeGenerator {
+
WorldGenerator getWorldGenerator(ITreeGenData tree);
void setLogBlock(ITreeGenome genome, World world, int x, int y, int z, ForgeDirection facing);
diff --git a/src/main/java/forestry/api/arboriculture/ITreeGenome.java b/src/main/java/forestry/api/arboriculture/ITreeGenome.java
index 02098945f..32742960b 100644
--- a/src/main/java/forestry/api/arboriculture/ITreeGenome.java
+++ b/src/main/java/forestry/api/arboriculture/ITreeGenome.java
@@ -5,10 +5,12 @@
******************************************************************************/
package forestry.api.arboriculture;
-import forestry.api.genetics.IGenome;
import java.util.EnumSet;
+
import net.minecraftforge.common.EnumPlantType;
+import forestry.api.genetics.IGenome;
+
public interface ITreeGenome extends IGenome {
IAlleleTreeSpecies getPrimary();
@@ -24,8 +26,8 @@ public interface ITreeGenome extends IGenome {
float getFertility();
/**
- * @return Determines either a) how many fruit leaves there are or b) the chance for any fruit leave to drop a sapling. Exact usage determined by the
- * IFruitProvider
+ * @return Determines either a) how many fruit leaves there are or b) the chance for any fruit leave to drop a
+ * sapling. Exact usage determined by the IFruitProvider
*/
float getYield();
diff --git a/src/main/java/forestry/api/arboriculture/ITreeMutation.java b/src/main/java/forestry/api/arboriculture/ITreeMutation.java
index ee33b625c..41cb62f27 100644
--- a/src/main/java/forestry/api/arboriculture/ITreeMutation.java
+++ b/src/main/java/forestry/api/arboriculture/ITreeMutation.java
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.arboriculture;
+import net.minecraft.world.World;
+
import forestry.api.genetics.IMutation;
import forestry.api.genetics.ISpeciesRoot;
-import net.minecraft.world.World;
public interface ITreeMutation extends IMutation {
@@ -20,13 +21,6 @@ public interface ITreeMutation extends IMutation {
* @return float representing the percent chance for mutation to occur, from 0.0 to 100.0.
* @since Forestry 4.0
*/
- float getChance(
- World world,
- int x,
- int y,
- int z,
- IAlleleTreeSpecies allele0,
- IAlleleTreeSpecies allele1,
- ITreeGenome genome0,
- ITreeGenome genome1);
+ float getChance(World world, int x, int y, int z, IAlleleTreeSpecies allele0, IAlleleTreeSpecies allele1,
+ ITreeGenome genome0, ITreeGenome genome1);
}
diff --git a/src/main/java/forestry/api/arboriculture/ITreeMutationCustom.java b/src/main/java/forestry/api/arboriculture/ITreeMutationCustom.java
index fe0e705c5..8c0f19095 100644
--- a/src/main/java/forestry/api/arboriculture/ITreeMutationCustom.java
+++ b/src/main/java/forestry/api/arboriculture/ITreeMutationCustom.java
@@ -7,4 +7,5 @@ package forestry.api.arboriculture;
import forestry.api.genetics.IMutationCustom;
-public interface ITreeMutationCustom extends ITreeMutation, IMutationCustom {}
+public interface ITreeMutationCustom extends ITreeMutation, IMutationCustom {
+}
diff --git a/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java b/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java
index f646ff70b..684a07bc0 100644
--- a/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java
+++ b/src/main/java/forestry/api/arboriculture/ITreeMutationFactory.java
@@ -8,17 +8,17 @@ package forestry.api.arboriculture;
import forestry.api.genetics.IAllele;
public interface ITreeMutationFactory {
+
/**
- * Creates a new tree mutation.
- * Automatically registered with TreeManager.treeRoot.registerMutation()
- * See ITreeMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
+ * Creates a new tree mutation. Automatically registered with TreeManager.treeRoot.registerMutation() See
+ * ITreeMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
*
* @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.
*/
- ITreeMutationCustom createMutation(
- IAlleleTreeSpecies parentTree0, IAlleleTreeSpecies parentTree1, IAllele[] result, int chance);
+ ITreeMutationCustom createMutation(IAlleleTreeSpecies parentTree0, IAlleleTreeSpecies parentTree1, IAllele[] result,
+ int chance);
}
diff --git a/src/main/java/forestry/api/arboriculture/ITreeRoot.java b/src/main/java/forestry/api/arboriculture/ITreeRoot.java
index 4b7c7ae54..e1260d670 100644
--- a/src/main/java/forestry/api/arboriculture/ITreeRoot.java
+++ b/src/main/java/forestry/api/arboriculture/ITreeRoot.java
@@ -5,16 +5,19 @@
******************************************************************************/
package forestry.api.arboriculture;
-import com.mojang.authlib.GameProfile;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IChromosome;
-import forestry.api.genetics.ISpeciesRoot;
import java.util.ArrayList;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
+import com.mojang.authlib.GameProfile;
+
+import forestry.api.genetics.IAllele;
+import forestry.api.genetics.IChromosome;
+import forestry.api.genetics.ISpeciesRoot;
+
public interface ITreeRoot extends ISpeciesRoot {
@Override
@@ -48,6 +51,7 @@ public interface ITreeRoot extends ISpeciesRoot {
/* TREE SPECIFIC */
/**
* Register a leaf tick handler.
+ *
* @param handler the {@link ILeafTickHandler} to register.
*/
void registerLeafTickHandler(ILeafTickHandler handler);
diff --git a/src/main/java/forestry/api/arboriculture/IWoodItemAccess.java b/src/main/java/forestry/api/arboriculture/IWoodItemAccess.java
index ad5bce076..8835feccd 100644
--- a/src/main/java/forestry/api/arboriculture/IWoodItemAccess.java
+++ b/src/main/java/forestry/api/arboriculture/IWoodItemAccess.java
@@ -8,6 +8,7 @@ package forestry.api.arboriculture;
import net.minecraft.item.ItemStack;
public interface IWoodItemAccess {
+
ItemStack getLog(EnumWoodType woodType, boolean fireproof);
ItemStack getPlanks(EnumWoodType woodType, boolean fireproof);
diff --git a/src/main/java/forestry/api/circuits/CircuitSocketType.java b/src/main/java/forestry/api/circuits/CircuitSocketType.java
index 0fa2ed345..b642f90dd 100644
--- a/src/main/java/forestry/api/circuits/CircuitSocketType.java
+++ b/src/main/java/forestry/api/circuits/CircuitSocketType.java
@@ -6,6 +6,7 @@
package forestry.api.circuits;
public enum CircuitSocketType implements ICircuitSocketType {
+
NONE("none"),
FARM("forestry.farm"),
ELECTRIC_ENGINE("forestry.electric.engine"),
diff --git a/src/main/java/forestry/api/circuits/ICircuit.java b/src/main/java/forestry/api/circuits/ICircuit.java
index 4986dc290..6a944645e 100644
--- a/src/main/java/forestry/api/circuits/ICircuit.java
+++ b/src/main/java/forestry/api/circuits/ICircuit.java
@@ -8,6 +8,7 @@ package forestry.api.circuits;
import java.util.List;
public interface ICircuit {
+
String getUID();
boolean requiresDiscovery();
diff --git a/src/main/java/forestry/api/circuits/ICircuitBoard.java b/src/main/java/forestry/api/circuits/ICircuitBoard.java
index 605c21fc6..161eef9ed 100644
--- a/src/main/java/forestry/api/circuits/ICircuitBoard.java
+++ b/src/main/java/forestry/api/circuits/ICircuitBoard.java
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.circuits;
-import forestry.api.core.INBTTagable;
import java.util.List;
+import forestry.api.core.INBTTagable;
+
public interface ICircuitBoard extends INBTTagable {
int getPrimaryColor();
@@ -28,6 +29,7 @@ public interface ICircuitBoard extends INBTTagable {
/**
* Specifies where a circuit can be used.
+ *
* @since Forestry 4.0
*/
ICircuitSocketType getSocketType();
diff --git a/src/main/java/forestry/api/circuits/ICircuitLayout.java b/src/main/java/forestry/api/circuits/ICircuitLayout.java
index dd25e1c22..8743c1682 100644
--- a/src/main/java/forestry/api/circuits/ICircuitLayout.java
+++ b/src/main/java/forestry/api/circuits/ICircuitLayout.java
@@ -18,6 +18,7 @@ public interface ICircuitLayout {
/**
* Specifies where a circuit layout is used.
+ *
* @since Forestry 4.0
*/
ICircuitSocketType getSocketType();
diff --git a/src/main/java/forestry/api/circuits/ICircuitLibrary.java b/src/main/java/forestry/api/circuits/ICircuitLibrary.java
index 34a1d600f..981a5f2b8 100644
--- a/src/main/java/forestry/api/circuits/ICircuitLibrary.java
+++ b/src/main/java/forestry/api/circuits/ICircuitLibrary.java
@@ -5,4 +5,5 @@
******************************************************************************/
package forestry.api.circuits;
-public interface ICircuitLibrary {}
+public interface ICircuitLibrary {
+}
diff --git a/src/main/java/forestry/api/circuits/ICircuitRegistry.java b/src/main/java/forestry/api/circuits/ICircuitRegistry.java
index 003d552e4..f2b4698c8 100644
--- a/src/main/java/forestry/api/circuits/ICircuitRegistry.java
+++ b/src/main/java/forestry/api/circuits/ICircuitRegistry.java
@@ -6,6 +6,7 @@
package forestry.api.circuits;
import java.util.Map;
+
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
diff --git a/src/main/java/forestry/api/circuits/ICircuitSocketType.java b/src/main/java/forestry/api/circuits/ICircuitSocketType.java
index f033058f6..bd5e71d9a 100644
--- a/src/main/java/forestry/api/circuits/ICircuitSocketType.java
+++ b/src/main/java/forestry/api/circuits/ICircuitSocketType.java
@@ -6,10 +6,11 @@
package forestry.api.circuits;
/**
- * Specifies where a circuit layout can be used. (i.e. farm, machine, engine, etc)
- * See CircuitSocketType for Forestry's uses.
+ * Specifies where a circuit layout can be used. (i.e. farm, machine, engine, etc) See CircuitSocketType for Forestry's
+ * uses.
*/
public interface ICircuitSocketType {
+
/** unique identifier for this socket type */
String getUid();
diff --git a/src/main/java/forestry/api/core/BiomeHelper.java b/src/main/java/forestry/api/core/BiomeHelper.java
index 2ef71c8b2..0a7612fa0 100644
--- a/src/main/java/forestry/api/core/BiomeHelper.java
+++ b/src/main/java/forestry/api/core/BiomeHelper.java
@@ -2,6 +2,7 @@ package forestry.api.core;
import java.util.HashMap;
import java.util.Map;
+
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
@@ -17,8 +18,9 @@ public class BiomeHelper {
}
/**
- * Determines if a given BiomeGenBase is of HELLISH temperature, since it is treated separately from actual temperature values.
- * Uses the BiomeDictionary.
+ * Determines if a given BiomeGenBase is of HELLISH temperature, since it is treated separately from actual
+ * temperature values. Uses the BiomeDictionary.
+ *
* @param biomeGen BiomeGenBase of the biome in question
* @return true, if the BiomeGenBase is a Nether-type biome; false otherwise.
*/
diff --git a/src/main/java/forestry/api/core/EnumHumidity.java b/src/main/java/forestry/api/core/EnumHumidity.java
index 50594afcf..0f4d6592b 100644
--- a/src/main/java/forestry/api/core/EnumHumidity.java
+++ b/src/main/java/forestry/api/core/EnumHumidity.java
@@ -6,11 +6,13 @@
package forestry.api.core;
/**
- * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location.
+ * 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.
+ * This enum concerns humidity.
*/
public enum EnumHumidity {
+
ARID("Arid"),
NORMAL("Normal"),
DAMP("Damp");
@@ -26,8 +28,9 @@ public enum EnumHumidity {
}
/**
- * Determines the EnumHumidity given a floating point representation of Minecraft Rainfall.
- * To check if rainfall is possible in a biome, use BiomeHelper.canRainOrSnow().
+ * Determines the EnumHumidity given a floating point representation of Minecraft Rainfall. To check if rainfall is
+ * possible in a biome, use BiomeHelper.canRainOrSnow().
+ *
* @param rawHumidity raw rainfall value
* @return EnumHumidity corresponding to rainfall value
*/
diff --git a/src/main/java/forestry/api/core/EnumTemperature.java b/src/main/java/forestry/api/core/EnumTemperature.java
index b183465ff..9bc57eb52 100644
--- a/src/main/java/forestry/api/core/EnumTemperature.java
+++ b/src/main/java/forestry/api/core/EnumTemperature.java
@@ -5,17 +5,20 @@
******************************************************************************/
package forestry.api.core;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.util.IIcon;
import net.minecraft.world.biome.BiomeGenBase;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
/**
- * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location.
+ * 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.
+ * This enum concerns temperature.
*/
public enum EnumTemperature {
+
NONE("None", "habitats/ocean"),
ICY("Icy", "habitats/snow"),
COLD("Cold", "habitats/taiga"),
@@ -42,9 +45,9 @@ 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.
+ * 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 394bac3a9..eb9d5ff95 100644
--- a/src/main/java/forestry/api/core/ForestryAPI.java
+++ b/src/main/java/forestry/api/core/ForestryAPI.java
@@ -5,27 +5,25 @@
******************************************************************************/
package forestry.api.core;
+import java.util.Set;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import java.util.Set;
/**
* 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.
+ * 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.
+ * .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.
+ * Note that if Forestry is not present, all these references will be null.
*/
public class ForestryAPI {
@@ -53,15 +51,13 @@ public class ForestryAPI {
public static IForestryConstants forestryConstants;
/**
- * The currently enabled Forestry plugins.
- * Can be used to check if certain features are available, for example:
+ * The currently enabled Forestry plugins. Can be used to check if certain features are available, for example:
* ForestryAPI.enabledPlugins.contains("APICULTURE")
*/
public static Set enabledPlugins;
/**
- * Instance of the errorStateRegistry for registering errors.
- * Also creates new instances of IErrorLogic.
+ * Instance of the errorStateRegistry for registering errors. Also creates new instances of IErrorLogic.
*/
public static IErrorStateRegistry errorStateRegistry;
}
diff --git a/src/main/java/forestry/api/core/ForestryEvent.java b/src/main/java/forestry/api/core/ForestryEvent.java
index 629a694a4..a8a521c84 100644
--- a/src/main/java/forestry/api/core/ForestryEvent.java
+++ b/src/main/java/forestry/api/core/ForestryEvent.java
@@ -5,17 +5,20 @@
******************************************************************************/
package forestry.api.core;
+import net.minecraft.entity.player.EntityPlayer;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.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;
public abstract class ForestryEvent extends Event {
private abstract static class BreedingEvent extends ForestryEvent {
+
public final ISpeciesRoot root;
public final IBreedingTracker tracker;
public final GameProfile username;
@@ -29,16 +32,18 @@ public abstract class ForestryEvent extends Event {
}
public static class SpeciesDiscovered extends BreedingEvent {
+
public final IAlleleSpecies species;
- public SpeciesDiscovered(
- ISpeciesRoot root, GameProfile username, IAlleleSpecies species, IBreedingTracker tracker) {
+ public SpeciesDiscovered(ISpeciesRoot root, GameProfile username, IAlleleSpecies species,
+ IBreedingTracker tracker) {
super(root, username, tracker);
this.species = species;
}
}
public static class MutationDiscovered extends BreedingEvent {
+
public final IMutation allele;
public MutationDiscovered(ISpeciesRoot root, GameProfile username, IMutation allele, IBreedingTracker tracker) {
@@ -48,6 +53,7 @@ public abstract class ForestryEvent extends Event {
}
public static class SyncedBreedingTracker extends ForestryEvent {
+
public final IBreedingTracker tracker;
public final EntityPlayer player;
diff --git a/src/main/java/forestry/api/core/IArmorNaturalist.java b/src/main/java/forestry/api/core/IArmorNaturalist.java
index ab4766f30..f78481cd6 100644
--- a/src/main/java/forestry/api/core/IArmorNaturalist.java
+++ b/src/main/java/forestry/api/core/IArmorNaturalist.java
@@ -13,12 +13,9 @@ public interface IArmorNaturalist {
/**
* Called when the naturalist's armor acts as spectacles for seeing pollinated tree leaves/flowers.
*
- * @param player
- * Player doing the viewing
- * @param armor
- * Armor item
- * @param doSee
- * Whether or not to actually do the side effects of viewing
+ * @param player Player doing the viewing
+ * @param armor Armor item
+ * @param doSee Whether or not to actually do the side effects of viewing
* @return true if the armor actually allows the player to see pollination.
*/
public boolean canSeePollination(EntityPlayer player, ItemStack armor, boolean doSee);
diff --git a/src/main/java/forestry/api/core/IClimateControlled.java b/src/main/java/forestry/api/core/IClimateControlled.java
index 94e9de024..0ae4ae6d1 100644
--- a/src/main/java/forestry/api/core/IClimateControlled.java
+++ b/src/main/java/forestry/api/core/IClimateControlled.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.api.core;
public interface IClimateControlled {
+
/**
* Change the temperature, but not lower than boundaryDown or higher than boundaryUp.
*/
diff --git a/src/main/java/forestry/api/core/IClimateProvider.java b/src/main/java/forestry/api/core/IClimateProvider.java
index 856e32ff8..039ec86ee 100644
--- a/src/main/java/forestry/api/core/IClimateProvider.java
+++ b/src/main/java/forestry/api/core/IClimateProvider.java
@@ -3,6 +3,7 @@ package forestry.api.core;
import net.minecraft.world.biome.BiomeGenBase;
public interface IClimateProvider {
+
BiomeGenBase getBiome();
EnumTemperature getTemperature();
diff --git a/src/main/java/forestry/api/core/IErrorLogic.java b/src/main/java/forestry/api/core/IErrorLogic.java
index 0b4bec3e0..83efbba69 100644
--- a/src/main/java/forestry/api/core/IErrorLogic.java
+++ b/src/main/java/forestry/api/core/IErrorLogic.java
@@ -10,13 +10,14 @@ import java.io.DataOutputStream;
import java.io.IOException;
/**
- * Keeps track of all the IErrorStates for an object.
- * Create a new IErrorLogic instance for your object with ForestryAPI.errorStateRegistry.createErrorLogic().
+ * Keeps track of all the IErrorStates for an object. Create a new IErrorLogic instance for your object with
+ * ForestryAPI.errorStateRegistry.createErrorLogic().
*/
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/IErrorLogicSource.java b/src/main/java/forestry/api/core/IErrorLogicSource.java
index d0d69d90d..115d336b1 100644
--- a/src/main/java/forestry/api/core/IErrorLogicSource.java
+++ b/src/main/java/forestry/api/core/IErrorLogicSource.java
@@ -9,5 +9,6 @@ package forestry.api.core;
* An IErrorLogicSource uses an instance of IErrorLogic to deal with its errors.
*/
public interface IErrorLogicSource {
+
IErrorLogic getErrorLogic();
}
diff --git a/src/main/java/forestry/api/core/IErrorSource.java b/src/main/java/forestry/api/core/IErrorSource.java
index bde502412..78f1e59ac 100644
--- a/src/main/java/forestry/api/core/IErrorSource.java
+++ b/src/main/java/forestry/api/core/IErrorSource.java
@@ -8,6 +8,7 @@ package forestry.api.core;
import com.google.common.collect.ImmutableSet;
public interface IErrorSource {
+
/**
* @return the active error states. An empty Set indicates no errors.
*/
diff --git a/src/main/java/forestry/api/core/IErrorState.java b/src/main/java/forestry/api/core/IErrorState.java
index d50ab35a1..822d61675 100644
--- a/src/main/java/forestry/api/core/IErrorState.java
+++ b/src/main/java/forestry/api/core/IErrorState.java
@@ -5,11 +5,12 @@
******************************************************************************/
package forestry.api.core;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
/**
*
* @author CovertJaguar
diff --git a/src/main/java/forestry/api/core/IErrorStateRegistry.java b/src/main/java/forestry/api/core/IErrorStateRegistry.java
index bc033b9ec..524ef854b 100644
--- a/src/main/java/forestry/api/core/IErrorStateRegistry.java
+++ b/src/main/java/forestry/api/core/IErrorStateRegistry.java
@@ -8,6 +8,7 @@ package forestry.api.core;
import java.util.Set;
public interface IErrorStateRegistry {
+
void registerErrorState(IErrorState state);
void addAlias(IErrorState state, String name);
diff --git a/src/main/java/forestry/api/core/IIconProvider.java b/src/main/java/forestry/api/core/IIconProvider.java
index ae29102ec..c4e20071e 100644
--- a/src/main/java/forestry/api/core/IIconProvider.java
+++ b/src/main/java/forestry/api/core/IIconProvider.java
@@ -5,11 +5,12 @@
******************************************************************************/
package forestry.api.core;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
/**
* Provides icons, needed in some interfaces, most notably for bees and trees.
*/
diff --git a/src/main/java/forestry/api/core/INBTTagable.java b/src/main/java/forestry/api/core/INBTTagable.java
index cd09390ac..fb7d662ed 100644
--- a/src/main/java/forestry/api/core/INBTTagable.java
+++ b/src/main/java/forestry/api/core/INBTTagable.java
@@ -8,6 +8,7 @@ package forestry.api.core;
import net.minecraft.nbt.NBTTagCompound;
public interface INBTTagable {
+
void readFromNBT(NBTTagCompound nbttagcompound);
void writeToNBT(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/forestry/api/core/ITextureManager.java b/src/main/java/forestry/api/core/ITextureManager.java
index 1114ab661..6f1d2af67 100644
--- a/src/main/java/forestry/api/core/ITextureManager.java
+++ b/src/main/java/forestry/api/core/ITextureManager.java
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.core;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.util.IIcon;
@SideOnly(Side.CLIENT)
public interface ITextureManager {
diff --git a/src/main/java/forestry/api/core/IToolPipette.java b/src/main/java/forestry/api/core/IToolPipette.java
index 9ef992fdd..91a7e32fd 100644
--- a/src/main/java/forestry/api/core/IToolPipette.java
+++ b/src/main/java/forestry/api/core/IToolPipette.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.api.core;
@@ -19,8 +17,7 @@ import net.minecraftforge.fluids.FluidStack;
public interface IToolPipette {
/**
- * @param pipette
- * ItemStack of the pipette.
+ * @param pipette ItemStack of the pipette.
* @return Capacity of the pipette.
*/
int getCapacity(ItemStack pipette);
diff --git a/src/main/java/forestry/api/core/IToolScoop.java b/src/main/java/forestry/api/core/IToolScoop.java
index 1fe6f392b..6263c1e8f 100644
--- a/src/main/java/forestry/api/core/IToolScoop.java
+++ b/src/main/java/forestry/api/core/IToolScoop.java
@@ -8,4 +8,5 @@ package forestry.api.core;
/**
* Marks a tool as a scoop.
*/
-public interface IToolScoop {}
+public interface IToolScoop {
+}
diff --git a/src/main/java/forestry/api/core/Tabs.java b/src/main/java/forestry/api/core/Tabs.java
index c11cc250a..8877c52d2 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/DefaultFarmListener.java b/src/main/java/forestry/api/farming/DefaultFarmListener.java
index 4dcd24937..9cca71082 100644
--- a/src/main/java/forestry/api/farming/DefaultFarmListener.java
+++ b/src/main/java/forestry/api/farming/DefaultFarmListener.java
@@ -6,14 +6,15 @@
package forestry.api.farming;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
/**
- * Easily extendable default farmListener.
- * By itself, this farmListener does nothing.
- * FarmListeners should inherit from this class unless they need to listen for everything.
+ * Easily extendable default farmListener. By itself, this farmListener does nothing. FarmListeners should inherit from
+ * this class unless they need to listen for everything.
*/
public class DefaultFarmListener implements IFarmListener {
+
@Override
public boolean beforeCropHarvest(ICrop crop) {
return false;
@@ -29,8 +30,8 @@ public class DefaultFarmListener implements IFarmListener {
public void hasCultivated(IFarmLogic logic, int x, int y, int z, FarmDirection direction, int extent) {}
@Override
- public void hasScheduledHarvest(
- Collection harvested, IFarmLogic logic, int x, int y, int z, FarmDirection direction, int extent) {}
+ public void hasScheduledHarvest(Collection harvested, IFarmLogic logic, int x, int y, int z,
+ FarmDirection direction, int extent) {}
@Override
public boolean cancelTask(IFarmLogic logic, FarmDirection direction) {
diff --git a/src/main/java/forestry/api/farming/FarmDirection.java b/src/main/java/forestry/api/farming/FarmDirection.java
index 051170e54..755583890 100644
--- a/src/main/java/forestry/api/farming/FarmDirection.java
+++ b/src/main/java/forestry/api/farming/FarmDirection.java
@@ -8,6 +8,7 @@ package forestry.api.farming;
import net.minecraftforge.common.util.ForgeDirection;
public enum FarmDirection {
+
NORTH(ForgeDirection.NORTH),
EAST(ForgeDirection.EAST),
SOUTH(ForgeDirection.SOUTH),
diff --git a/src/main/java/forestry/api/farming/Farmables.java b/src/main/java/forestry/api/farming/Farmables.java
index 3a864b7b4..3d1711e02 100644
--- a/src/main/java/forestry/api/farming/Farmables.java
+++ b/src/main/java/forestry/api/farming/Farmables.java
@@ -9,6 +9,7 @@ import java.util.Collection;
import java.util.HashMap;
public class Farmables {
+
/**
* Can be used to add IFarmables to some of the vanilla farm logics.
*
diff --git a/src/main/java/forestry/api/farming/ICrop.java b/src/main/java/forestry/api/farming/ICrop.java
index c766d57bf..f74b59eed 100644
--- a/src/main/java/forestry/api/farming/ICrop.java
+++ b/src/main/java/forestry/api/farming/ICrop.java
@@ -6,6 +6,7 @@
package forestry.api.farming;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
public interface ICrop {
diff --git a/src/main/java/forestry/api/farming/IFarmHousing.java b/src/main/java/forestry/api/farming/IFarmHousing.java
index 0fdb0caf0..f872c987f 100644
--- a/src/main/java/forestry/api/farming/IFarmHousing.java
+++ b/src/main/java/forestry/api/farming/IFarmHousing.java
@@ -5,10 +5,11 @@
******************************************************************************/
package forestry.api.farming;
-import forestry.api.core.IErrorLogicSource;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
+import forestry.api.core.IErrorLogicSource;
+
public interface IFarmHousing extends IErrorLogicSource {
int[] getCoords();
@@ -29,9 +30,8 @@ public interface IFarmHousing extends IErrorLogicSource {
void removeLiquid(FluidStack liquid);
/**
- * Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem.
- * Will remove the appropriate germling from the farm's inventory.
- * It's up to the logic to only call this on a valid location.
+ * Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem. Will remove the appropriate germling
+ * from the farm's inventory. It's up to the logic to only call this on a valid location.
*
* @return true if planting was successful, false otherwise.
*/
diff --git a/src/main/java/forestry/api/farming/IFarmInventory.java b/src/main/java/forestry/api/farming/IFarmInventory.java
index 10d3f74f5..833cf3860 100644
--- a/src/main/java/forestry/api/farming/IFarmInventory.java
+++ b/src/main/java/forestry/api/farming/IFarmInventory.java
@@ -9,6 +9,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
public interface IFarmInventory {
+
boolean hasResources(ItemStack[] resources);
void removeResources(ItemStack[] resources);
diff --git a/src/main/java/forestry/api/farming/IFarmListener.java b/src/main/java/forestry/api/farming/IFarmListener.java
index 9b25f1bb9..87365890f 100644
--- a/src/main/java/forestry/api/farming/IFarmListener.java
+++ b/src/main/java/forestry/api/farming/IFarmListener.java
@@ -6,6 +6,7 @@
package forestry.api.farming;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
public interface IFarmListener {
@@ -21,15 +22,18 @@ 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 harvested Collection of harvested stacks. May be manipulated. Ensure removal of stacks with 0 or less
+ * items!
+ * @param crop Harvested {@link ICrop}
*/
void afterCropHarvest(Collection harvested, ICrop crop);
/**
- * Called after the stack of collected items has been returned by the farm logic, but before it is added to the farm's pending queue.
+ * Called after the stack of collected items has been returned by the farm logic, but before it is added to the
+ * farm's pending queue.
*
- * @param collected Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less items!
+ * @param collected Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less
+ * items!
*/
void hasCollected(Collection collected, IFarmLogic logic);
@@ -39,10 +43,11 @@ public interface IFarmListener {
void hasCultivated(IFarmLogic logic, int x, int y, int z, FarmDirection direction, int extent);
/**
- * Called after the stack of harvested crops has been returned by the farm logic, but before it is added to the farm's pending queue.
+ * Called after the stack of harvested crops has been returned by the farm logic, but before it is added to the
+ * farm's pending queue.
*/
- void hasScheduledHarvest(
- Collection harvested, IFarmLogic logic, int x, int y, int z, FarmDirection direction, int extent);
+ void hasScheduledHarvest(Collection harvested, IFarmLogic logic, int x, int y, int z,
+ FarmDirection direction, int extent);
/**
* Can be used to cancel farm task on a per side/{@link IFarmLogic} basis.
diff --git a/src/main/java/forestry/api/farming/IFarmLogic.java b/src/main/java/forestry/api/farming/IFarmLogic.java
index b0ad53afd..8e8028f3c 100644
--- a/src/main/java/forestry/api/farming/IFarmLogic.java
+++ b/src/main/java/forestry/api/farming/IFarmLogic.java
@@ -5,13 +5,15 @@
******************************************************************************/
package forestry.api.farming;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public interface IFarmLogic {
int getFertilizerConsumption();
diff --git a/src/main/java/forestry/api/farming/IFarmable.java b/src/main/java/forestry/api/farming/IFarmable.java
index c2fb1c7bc..cd74de8c0 100644
--- a/src/main/java/forestry/api/farming/IFarmable.java
+++ b/src/main/java/forestry/api/farming/IFarmable.java
@@ -15,7 +15,8 @@ import net.minecraft.world.World;
public interface IFarmable {
/**
- * @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop.
+ * @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature
+ * version of the crop.
*/
boolean isSaplingAt(World world, int x, int y, int z);
@@ -30,13 +31,14 @@ public interface IFarmable {
boolean isGermling(ItemStack itemstack);
/**
- * @return true if the item is something that can drop from this type without actually being harvested as a crop. (Apples or sapling from decaying leaves.)
+ * @return true if the item is something that can drop from this type without actually being harvested as a crop.
+ * (Apples or sapling from decaying leaves.)
*/
boolean isWindfall(ItemStack itemstack);
/**
- * Plants a sapling by manipulating the world. The {@link IFarmLogic} should have verified the given location as valid. Called by the {@link IFarmHousing}
- * which handles resources.
+ * Plants a sapling by manipulating the world. The {@link IFarmLogic} should have verified the given location as
+ * valid. Called by the {@link IFarmHousing} which handles resources.
*
* @return true on success, false otherwise.
*/
diff --git a/src/main/java/forestry/api/farming/IFarmableBasic.java b/src/main/java/forestry/api/farming/IFarmableBasic.java
index e6a20f49d..c1d9bdb88 100644
--- a/src/main/java/forestry/api/farming/IFarmableBasic.java
+++ b/src/main/java/forestry/api/farming/IFarmableBasic.java
@@ -9,12 +9,14 @@ import net.minecraft.block.Block;
import net.minecraft.world.World;
/**
- * A basic form of {@link IFarmable}. It adds one more variant of isSapling, allowing much better runtime performance than otherwise.
+ * A basic form of {@link IFarmable}. It adds one more variant of isSapling, allowing much better runtime performance
+ * than otherwise.
*/
public interface IFarmableBasic extends IFarmable {
/**
- * @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop.
+ * @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature
+ * version of the crop.
*/
default boolean isSaplingAt(World world, int x, int y, int z) {
return world.blockExists(x, y, z)
@@ -22,7 +24,8 @@ public interface IFarmableBasic extends IFarmable {
}
/**
- * @return true if given block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop.
+ * @return true if given block at the given location is a "sapling" for this type, i.e. a non-harvestable immature
+ * version of the crop.
*/
boolean isSapling(Block block, int meta);
diff --git a/src/main/java/forestry/api/food/BeverageManager.java b/src/main/java/forestry/api/food/BeverageManager.java
index 576a3d7c0..0a14e5137 100644
--- a/src/main/java/forestry/api/food/BeverageManager.java
+++ b/src/main/java/forestry/api/food/BeverageManager.java
@@ -6,6 +6,7 @@
package forestry.api.food;
public class BeverageManager {
+
public static IBeverageEffect[] effectList = new IBeverageEffect[128];
public static IInfuserManager infuserManager;
diff --git a/src/main/java/forestry/api/food/IBeverageEffect.java b/src/main/java/forestry/api/food/IBeverageEffect.java
index b452db31d..893e8a2e4 100644
--- a/src/main/java/forestry/api/food/IBeverageEffect.java
+++ b/src/main/java/forestry/api/food/IBeverageEffect.java
@@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public interface IBeverageEffect {
+
int getId();
void doEffect(World world, EntityPlayer player);
diff --git a/src/main/java/forestry/api/fuels/EngineBronzeFuel.java b/src/main/java/forestry/api/fuels/EngineBronzeFuel.java
index 5c427b1c9..f43e48d32 100644
--- a/src/main/java/forestry/api/fuels/EngineBronzeFuel.java
+++ b/src/main/java/forestry/api/fuels/EngineBronzeFuel.java
@@ -8,6 +8,7 @@ package forestry.api.fuels;
import net.minecraftforge.fluids.Fluid;
public class EngineBronzeFuel {
+
/**
* Item that is valid fuel for a biogas engine.
*/
diff --git a/src/main/java/forestry/api/fuels/FermenterFuel.java b/src/main/java/forestry/api/fuels/FermenterFuel.java
index ad2ddfd11..61e0ff55f 100644
--- a/src/main/java/forestry/api/fuels/FermenterFuel.java
+++ b/src/main/java/forestry/api/fuels/FermenterFuel.java
@@ -8,6 +8,7 @@ package forestry.api.fuels;
import net.minecraft.item.ItemStack;
public class FermenterFuel {
+
/**
* Item that is a valid fuel for the fermenter (i.e. fertilizer).
*/
diff --git a/src/main/java/forestry/api/fuels/FuelManager.java b/src/main/java/forestry/api/fuels/FuelManager.java
index 606f4b95d..3efd4a827 100644
--- a/src/main/java/forestry/api/fuels/FuelManager.java
+++ b/src/main/java/forestry/api/fuels/FuelManager.java
@@ -6,10 +6,12 @@
package forestry.api.fuels;
import java.util.HashMap;
+
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
public class FuelManager {
+
/**
* Add new fuels for the fermenter here (i.e. fertilizer).
*/
diff --git a/src/main/java/forestry/api/fuels/MoistenerFuel.java b/src/main/java/forestry/api/fuels/MoistenerFuel.java
index 15f5ab0fa..a11924038 100644
--- a/src/main/java/forestry/api/fuels/MoistenerFuel.java
+++ b/src/main/java/forestry/api/fuels/MoistenerFuel.java
@@ -8,6 +8,7 @@ package forestry.api.fuels;
import net.minecraft.item.ItemStack;
public class MoistenerFuel {
+
/**
* The item to use
*/
diff --git a/src/main/java/forestry/api/fuels/RainSubstrate.java b/src/main/java/forestry/api/fuels/RainSubstrate.java
index 4373719c7..729b3edea 100644
--- a/src/main/java/forestry/api/fuels/RainSubstrate.java
+++ b/src/main/java/forestry/api/fuels/RainSubstrate.java
@@ -8,6 +8,7 @@ package forestry.api.fuels;
import net.minecraft.item.ItemStack;
public class RainSubstrate {
+
/**
* Rain substrate capable of activating the rainmaker.
*/
diff --git a/src/main/java/forestry/api/genetics/AlleleManager.java b/src/main/java/forestry/api/genetics/AlleleManager.java
index 977c59d33..c90379e29 100644
--- a/src/main/java/forestry/api/genetics/AlleleManager.java
+++ b/src/main/java/forestry/api/genetics/AlleleManager.java
@@ -6,18 +6,21 @@
package forestry.api.genetics;
import java.util.HashMap;
+
import net.minecraft.item.ItemStack;
/**
* Holds a static reference to the {@link IAlleleRegistry}.
*/
public class AlleleManager {
+
/**
* Main access point for all things related to genetics. See {@link IAlleleRegistry} for details.
*/
public static IAlleleRegistry alleleRegistry;
/**
- * Translates plain leaf blocks into genetic data. Used by bees and butterflies to convert and pollinate foreign leaf blocks.
+ * Translates plain leaf blocks into genetic data. Used by bees and butterflies to convert and pollinate foreign
+ * leaf blocks.
*/
public static HashMap ersatzSpecimen = new HashMap();
/**
diff --git a/src/main/java/forestry/api/genetics/IAllele.java b/src/main/java/forestry/api/genetics/IAllele.java
index cdb0d05a4..042154ec7 100644
--- a/src/main/java/forestry/api/genetics/IAllele.java
+++ b/src/main/java/forestry/api/genetics/IAllele.java
@@ -6,9 +6,11 @@
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}.
+ * 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.
+ * {@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.
*
diff --git a/src/main/java/forestry/api/genetics/IAlleleEffect.java b/src/main/java/forestry/api/genetics/IAlleleEffect.java
index 10aa4bfac..279ccbb50 100644
--- a/src/main/java/forestry/api/genetics/IAlleleEffect.java
+++ b/src/main/java/forestry/api/genetics/IAlleleEffect.java
@@ -9,14 +9,16 @@ package forestry.api.genetics;
* Basic effect allele.
*/
public interface IAlleleEffect extends IAllele {
+
/**
- * @return true if this effect can combine with the effect on other allele (i.e. run before or after). combination can only occur if both effects are
- * combinable.
+ * @return true if this effect can combine with the effect on other allele (i.e. run before or after). combination
+ * can only occur if both effects are combinable.
*/
boolean isCombinable();
/**
- * Returns the passed data storage if it is valid for this effect or a new one if the passed storage object was invalid for this effect.
+ * Returns the passed data storage if it is valid for this effect or a new one if the passed storage object was
+ * invalid for this effect.
*
* @param storedData
* @return {@link IEffectData} for the next cycle.
diff --git a/src/main/java/forestry/api/genetics/IAlleleFactory.java b/src/main/java/forestry/api/genetics/IAlleleFactory.java
index 8ce84a04f..6793912eb 100644
--- a/src/main/java/forestry/api/genetics/IAlleleFactory.java
+++ b/src/main/java/forestry/api/genetics/IAlleleFactory.java
@@ -4,112 +4,93 @@ package forestry.api.genetics;
* Creates new alleles with smart localization.
*
*
- * UID is created like this:
- * modId + '.' + category + WordUtils.capitalize(valueName);
- * For Example:
- * modId:forestry, category:height, valueName:smallest => forestry.heightSmallest
- * This is mainly for legacy compatibility and may change in future major versions.
+ * UID is created like this: modId + '.' + category + WordUtils.capitalize(valueName); For Example: 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]
+ * The default localization uses: [modId].allele.[valueName]
*
- * Languages that need category-specific names can override it by defining:
- * [modId].allele.[category].[valueName]
+ * Languages that need category-specific names can override it by defining: [modId].allele.[category].[valueName]
*
- * For example:
- * en_US
- * forestry.allele.smallest=Smallest
- * ru_RU
- * forestry.allele.smallest=????? ?????????
- * forestry.allele.height.smallest=????? ??????
+ * For example: en_US forestry.allele.smallest=Smallest ru_RU 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);
+ 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 xDimValue allele area X Size
- * @param yDimValue allele area Y Size
- * @param zDimValue allele area 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 xDimValue allele area X Size
+ * @param yDimValue allele area Y Size
+ * @param zDimValue allele area 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,
- int xDimValue,
- int yDimValue,
- int zDimValue,
- boolean isDominant,
- IChromosomeType... types);
+ IAlleleArea createArea(String modId, String category, String valueName, int xDimValue, int yDimValue, int zDimValue,
+ 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 isDominant allele dominance
- * @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
- */
- 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 isDominant allele dominance
- * @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
- */
- IAlleleFlowers createFlowers(
- String modId,
- String category,
- String valueName,
- IFlowerProvider value,
- boolean isDominant,
+ 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. "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. "fireproof")
+ * @param value allele boolean value
+ * @param isDominant allele dominance
+ * @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
+ */
+ 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 isDominant allele dominance
+ * @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
+ */
+ IAlleleFlowers createFlowers(String modId, String category, String valueName, IFlowerProvider 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. "height")
+ * @param valueName allele value name for uid and localization (i.e. "smallest")
+ * @param value allele float value
* @param isDominant allele dominance
* @return a new IAlleleFloat, registered with the allele registry.
* @deprecated since Forestry 4.2. Use the IChromosomeType version.
@@ -118,31 +99,25 @@ public interface IAlleleFactory {
IAlleleFloat createFloat(String modId, String category, String valueName, float value, boolean isDominant);
/**
- * @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 xDimValue allele area X Size
- * @param yDimValue allele area Y Size
- * @param zDimValue allele area 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 xDimValue allele area X Size
+ * @param yDimValue allele area Y Size
+ * @param zDimValue allele area Z Size
* @param isDominant allele dominance
* @return a new IAlleleArea, registered with the allele registry.
* @deprecated since Forestry 4.2. Use the IChromosomeType version.
*/
@Deprecated
- IAlleleArea createArea(
- String modId,
- String category,
- String valueName,
- int xDimValue,
- int yDimValue,
- int zDimValue,
+ IAlleleArea createArea(String modId, String category, String valueName, int xDimValue, int yDimValue, int zDimValue,
boolean isDominant);
/**
- * @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
* @return a new IAlleleInteger, registered with the allele registry.
* @deprecated since Forestry 4.2. Use the IChromosomeType version.
@@ -151,28 +126,28 @@ public interface IAlleleFactory {
IAlleleInteger createInteger(String modId, String category, String valueName, int value, boolean isDominant);
/**
- * @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
- * @return a new IAlleleBoolean, registered with the allele registry.
- * Note that valueName will always be "true" or "false"
+ * @return a new IAlleleBoolean, registered with the allele registry. Note that valueName will always be "true" or
+ * "false"
* @deprecated since Forestry 4.2. Use the IChromosomeType version.
*/
@Deprecated
IAlleleBoolean createBoolean(String modId, String category, boolean value, boolean isDominant);
/**
- * @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
- * @return a new IAlleleFlowers, registered with the allele registry.
- * IAlleleFlowers localization is handled by the IFlowerProvider.getDescription(), unlike the other alleles.
+ * @return a new IAlleleFlowers, registered with the allele registry. IAlleleFlowers localization is handled by the
+ * IFlowerProvider.getDescription(), unlike the other alleles.
* @deprecated since Forestry 4.2. Use the IChromosomeType version.
*/
@Deprecated
- IAlleleFlowers createFlowers(
- String modId, String category, String valueName, IFlowerProvider value, boolean isDominant);
+ IAlleleFlowers createFlowers(String modId, String category, String valueName, IFlowerProvider value,
+ boolean isDominant);
}
diff --git a/src/main/java/forestry/api/genetics/IAlleleHandler.java b/src/main/java/forestry/api/genetics/IAlleleHandler.java
index e16e359c3..08b492bae 100644
--- a/src/main/java/forestry/api/genetics/IAlleleHandler.java
+++ b/src/main/java/forestry/api/genetics/IAlleleHandler.java
@@ -8,8 +8,8 @@ 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.)
+ * 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 {
@@ -17,24 +17,21 @@ public interface IAlleleHandler {
/**
* Called when an allele is registered with {@link IAlleleRegistry}.
*
- * @param allele
- * Allele which was registered.
+ * @param allele Allele which was registered.
*/
public void onRegisterAllele(IAllele allele);
/**
* Called when a classification is registered with {@link IAlleleRegistry}.
*
- * @param classification
- * Classification which was registered.
+ * @param classification Classification which was registered.
*/
public void onRegisterClassification(IClassification classification);
/**
* Called when a fruit family is registered with {@link IAlleleRegistry}.
*
- * @param family
- * Fruit family which was registered.
+ * @param family Fruit family which was registered.
*/
public void onRegisterFruitFamily(IFruitFamily family);
}
diff --git a/src/main/java/forestry/api/genetics/IAllelePlantType.java b/src/main/java/forestry/api/genetics/IAllelePlantType.java
index 9684bf25b..ce9b00b68 100644
--- a/src/main/java/forestry/api/genetics/IAllelePlantType.java
+++ b/src/main/java/forestry/api/genetics/IAllelePlantType.java
@@ -6,6 +6,7 @@
package forestry.api.genetics;
import java.util.EnumSet;
+
import net.minecraftforge.common.EnumPlantType;
public interface IAllelePlantType extends IAllele {
diff --git a/src/main/java/forestry/api/genetics/IAlleleRegistry.java b/src/main/java/forestry/api/genetics/IAlleleRegistry.java
index af920e8ab..50ea033d1 100644
--- a/src/main/java/forestry/api/genetics/IAlleleRegistry.java
+++ b/src/main/java/forestry/api/genetics/IAlleleRegistry.java
@@ -5,14 +5,17 @@
******************************************************************************/
package forestry.api.genetics;
-import com.mojang.authlib.GameProfile;
-import forestry.api.genetics.IClassification.EnumClassLevel;
import java.util.Collection;
import java.util.Map;
+
import net.minecraft.item.ItemStack;
+import com.mojang.authlib.GameProfile;
+import forestry.api.genetics.IClassification.EnumClassLevel;
+
/**
- * Manages {@link ISpeciesRoot}, {@link IAllele}s, {@link IFruitFamily}s, {@link IClassification}, the blacklist and allows creation of research notes.
+ * Manages {@link ISpeciesRoot}, {@link IAllele}s, {@link IFruitFamily}s, {@link IClassification}, the blacklist and
+ * allows creation of research notes.
*
* @author SirSengir
*/
@@ -21,6 +24,7 @@ public interface IAlleleRegistry {
/* SPECIES ROOT CLASSES */
/**
* Register a {@link ISpeciesRoot}.
+ *
* @param root {@link ISpeciesRoot} to register.
*/
void registerSpeciesRoot(ISpeciesRoot root);
@@ -32,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.
*/
@@ -39,6 +44,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.
*/
@@ -46,6 +52,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.
*/
@@ -63,8 +70,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.
*/
IIndividual getIndividual(ItemStack stack);
@@ -88,10 +94,10 @@ public interface IAlleleRegistry {
/**
* Registers an allele.
*
- * NOTE: Where possible, it is recommended to use IAlleleFactory instead
- * because it has built-in advanced localization support.
+ * NOTE: Where possible, it is recommended to use IAlleleFactory instead 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
*/
@@ -105,18 +111,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);
@@ -136,32 +139,28 @@ 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);
- IClassification createAndRegisterClassification(
- EnumClassLevel level, String uid, String scientific, IClassification... members);
+ IClassification createAndRegisterClassification(EnumClassLevel level, String uid, String scientific,
+ IClassification... members);
/**
* 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);
@@ -193,8 +192,7 @@ public interface IAlleleRegistry {
/**
* Registers a new IAlleleHandler
*
- * @param handler
- * IAlleleHandler to register.
+ * @param handler IAlleleHandler to register.
*/
void registerAlleleHandler(IAlleleHandler handler);
@@ -202,8 +200,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);
@@ -213,8 +210,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);
@@ -222,14 +218,14 @@ public interface IAlleleRegistry {
/* RESEARCH */
/**
* @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 fbd62eb63..0276fdfa0 100644
--- a/src/main/java/forestry/api/genetics/IAlleleSpecies.java
+++ b/src/main/java/forestry/api/genetics/IAlleleSpecies.java
@@ -5,14 +5,16 @@
******************************************************************************/
package forestry.api.genetics;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.IIconProvider;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
/**
* Basic species allele.
@@ -30,8 +32,8 @@ public interface IAlleleSpecies extends IAllele {
String getDescription();
/**
- * Binomial name of the species sans genus ("Apis"). Returning "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun
- * names or return null.
+ * Binomial name of the species sans genus ("Apis"). Returning "humboldti" will have the bee species flavour name be
+ * "Apis humboldti". Feel free to use fun names or return null.
*
* @return flavour text (may be null)
*/
@@ -51,8 +53,9 @@ public interface IAlleleSpecies extends IAllele {
/* RESEARCH */
/**
- * Complexity determines the difficulty researching a species. The values of primary and secondary are
- * added together (and rounded) to determine the amount of pairs needed for successful research.
+ * 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/IBreedingTracker.java b/src/main/java/forestry/api/genetics/IBreedingTracker.java
index fd1c62fbd..d69f45c34 100644
--- a/src/main/java/forestry/api/genetics/IBreedingTracker.java
+++ b/src/main/java/forestry/api/genetics/IBreedingTracker.java
@@ -5,10 +5,11 @@
******************************************************************************/
package forestry.api.genetics;
-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.
*
@@ -62,8 +63,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);
@@ -71,17 +71,14 @@ 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);
/**
- * Register a successfully researched mutation.
- * Mutations are normally researched in the Escritoire.
- * Researched mutations may have bonuses such as occurring at a higher rate.
- * Researched mutations count as discovered.
+ * Register a successfully researched mutation. Mutations are normally researched in the Escritoire. Researched
+ * mutations may have bonuses such as occurring at a higher rate. Researched mutations count as discovered.
*/
void researchMutation(IMutation mutation);
@@ -91,9 +88,9 @@ public interface IBreedingTracker {
boolean isResearched(IMutation mutation);
/**
- * Synchronizes the tracker to the client side.
- * Before Forestry 4.2.1: Should be called before opening any gui needing that information.
- * Since Forestry 4.2.1: Breeding tracker should be automatically synced, only Forestry should need to call this.
+ * Synchronizes the tracker to the client side. Before Forestry 4.2.1: Should be called before opening any gui
+ * needing that information. Since Forestry 4.2.1: Breeding tracker should be automatically synced, only Forestry
+ * should need to call this.
*/
void synchToPlayer(EntityPlayer player);
diff --git a/src/main/java/forestry/api/genetics/IClassification.java b/src/main/java/forestry/api/genetics/IClassification.java
index fac4850ad..c948e153c 100644
--- a/src/main/java/forestry/api/genetics/IClassification.java
+++ b/src/main/java/forestry/api/genetics/IClassification.java
@@ -13,6 +13,7 @@ package forestry.api.genetics;
public interface IClassification {
public enum EnumClassLevel {
+
DOMAIN(0x777fff, true),
KINGDOM(0x77c3ff),
PHYLUM(0x77ffb6, true),
diff --git a/src/main/java/forestry/api/genetics/IClimateHelper.java b/src/main/java/forestry/api/genetics/IClimateHelper.java
index 6e7138fda..e8181ee00 100644
--- a/src/main/java/forestry/api/genetics/IClimateHelper.java
+++ b/src/main/java/forestry/api/genetics/IClimateHelper.java
@@ -1,27 +1,25 @@
package forestry.api.genetics;
+import java.util.Collection;
+
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
-import java.util.Collection;
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);
+ boolean isWithinLimits(EnumTemperature temperature, EnumHumidity humidity, EnumTemperature baseTemp,
+ EnumTolerance tolTemp, EnumHumidity baseHumid, EnumTolerance tolHumid);
boolean isWithinLimits(EnumTemperature temperature, EnumTemperature baseTemp, EnumTolerance tolTemp);
@@ -29,14 +27,17 @@ public interface IClimateHelper {
/**
* 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.
*/
Collection getToleratedHumidity(EnumHumidity prefered, EnumTolerance tolerance);
+
/**
* Gets a collection of temperatures which fit the given parameters.
- * @param prefered Base temperature from which to measure.
+ *
+ * @param 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.
*/
@@ -44,12 +45,15 @@ public interface IClimateHelper {
/**
* Gets a localized, human readable string for the given temperature.
+ *
* @param temperature Temperature to generate the string for.
* @return A localized, human readable string for the given temperature.
*/
String toDisplay(EnumTemperature temperature);
+
/**
* Gets a localized, human readable string for the given humidity.
+ *
* @param humidity Humidity to generate the string for.
* @return A localized, human readable string for the given humidity.
*/
diff --git a/src/main/java/forestry/api/genetics/IEffectData.java b/src/main/java/forestry/api/genetics/IEffectData.java
index 8493da433..1d12b12dc 100644
--- a/src/main/java/forestry/api/genetics/IEffectData.java
+++ b/src/main/java/forestry/api/genetics/IEffectData.java
@@ -13,6 +13,7 @@ import forestry.api.core.INBTTagable;
* @author SirSengir
*/
public interface IEffectData extends INBTTagable {
+
void setInteger(int index, int val);
void setFloat(int index, float val);
diff --git a/src/main/java/forestry/api/genetics/IFlowerAcceptableRule.java b/src/main/java/forestry/api/genetics/IFlowerAcceptableRule.java
index 0b6f2c622..7879770d7 100644
--- a/src/main/java/forestry/api/genetics/IFlowerAcceptableRule.java
+++ b/src/main/java/forestry/api/genetics/IFlowerAcceptableRule.java
@@ -8,9 +8,10 @@ package forestry.api.genetics;
import net.minecraft.world.World;
public interface IFlowerAcceptableRule {
+
/**
- * Checks if the flower at this position is accepted by this rule.
- * flowerType is passed in case this rule is registered for multiple flower types.
+ * Checks if the flower at this position is accepted by this rule. flowerType is passed in case this rule is
+ * registered for multiple flower types.
*/
boolean isAcceptableFlower(String flowerType, World world, int x, int y, int z);
}
diff --git a/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java b/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java
index f17357fe4..287ff6e1e 100644
--- a/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java
+++ b/src/main/java/forestry/api/genetics/IFlowerGrowthHelper.java
@@ -8,8 +8,10 @@ package forestry.api.genetics;
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, int x, int y, int z);
diff --git a/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java b/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java
index 1aefce01f..3ea46adc3 100644
--- a/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java
+++ b/src/main/java/forestry/api/genetics/IFlowerGrowthRule.java
@@ -11,18 +11,19 @@ import net.minecraft.world.World;
* Basic condition for flower growing, such as checking that the soil is the correct type.
*/
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
+ * 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, int x, int y, int z);
/**
- * Checks a position for suitability, and then plants a flower there.
- * Returns true on success.
- * For implementers, get a flower to grow using IFlowerRegistry.getRandomPlantableFlower
+ * Checks a position for suitability, and then plants a flower there. Returns true on success. For implementers, get
+ * a flower to grow using IFlowerRegistry.getRandomPlantableFlower
+ *
* @deprecated since Forestry 4.0 Use the IFlowerGrowthHelper version.
*/
@Deprecated
diff --git a/src/main/java/forestry/api/genetics/IFlowerProvider.java b/src/main/java/forestry/api/genetics/IFlowerProvider.java
index 44e8e77e5..03a60d6b8 100644
--- a/src/main/java/forestry/api/genetics/IFlowerProvider.java
+++ b/src/main/java/forestry/api/genetics/IFlowerProvider.java
@@ -6,6 +6,7 @@
package forestry.api.genetics;
import java.util.Set;
+
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -25,15 +26,16 @@ public interface IFlowerProvider {
String getDescription();
/**
- * 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.
+ * 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.
*/
ItemStack[] affectProducts(World world, IIndividual individual, int x, int y, int z, ItemStack[] products);
/**
- * @return Set of valid flowers for the flower provider.
- * Returns an empty set if the flower provider does not have any valid flowers.
+ * @return Set of valid flowers for the flower provider. Returns an empty set if the flower provider does not have
+ * any valid flowers.
* @deprecated since Forestry 4.0.8 Use more specific methods in IFlowerRegistry.
*/
@Deprecated
@@ -41,8 +43,8 @@ public interface IFlowerProvider {
/**
* @return True if a flower was planted.
- * @deprecated since Forestry 4.0.8 Use IFlowerRegistry.growFlower.
- * Implementers can move logic into a IFlowerGrowthRule and register with IFlowerRegistry.registerGrowthRule
+ * @deprecated since Forestry 4.0.8 Use IFlowerRegistry.growFlower. Implementers can move logic into a
+ * IFlowerGrowthRule and register with IFlowerRegistry.registerGrowthRule
*/
@Deprecated
boolean growFlower(World world, IIndividual individual, int x, int y, int z);
diff --git a/src/main/java/forestry/api/genetics/IFlowerRegistry.java b/src/main/java/forestry/api/genetics/IFlowerRegistry.java
index 06ad8029b..64c12d63d 100644
--- a/src/main/java/forestry/api/genetics/IFlowerRegistry.java
+++ b/src/main/java/forestry/api/genetics/IFlowerRegistry.java
@@ -5,15 +5,17 @@
******************************************************************************/
package forestry.api.genetics;
-import forestry.api.apiculture.IBee;
-import forestry.api.apiculture.IBeeHousing;
import java.util.Collection;
import java.util.Random;
import java.util.Set;
+
import net.minecraft.block.Block;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.apiculture.IBee;
+import forestry.api.apiculture.IBeeHousing;
+
// See {@link forestry.api.apiculture.FlowerManager}.FlowerType___ for basic Forestry flower types.
// Each IFlowerProvider has one flower type, and multiple IFlowerProviders may share one type.
// "Acceptable flowers" allow nearby bees to do work.
@@ -21,9 +23,8 @@ import net.minecraft.world.World;
public interface IFlowerRegistry {
/**
- * Register a new flower growth rule.
- * This defines the flower planting logic for the specified flower types.
- * Without a flower growth rule, no flowers of that type can be planted.
+ * Register a new flower growth rule. This defines the flower planting logic for the specified flower types. Without
+ * a flower growth rule, no flowers of that type can be planted.
*/
void registerGrowthRule(IFlowerGrowthRule rule, String... flowerTypes);
@@ -31,24 +32,26 @@ public interface IFlowerRegistry {
* Registers an accepted flower with any meta value.
*/
void registerAcceptableFlower(Block flowerBlock, String... flowerTypes);
+
/**
* Registers an accepted flower with a specific meta value.
*/
void registerAcceptableFlower(Block flowerBlock, int flowerMeta, String... flowerTypes);
/**
- * Registers custom logic for accepted flowers.
- * These rules are inefficient compared to ones made with registerAcceptableFlower, but may be necessary for tile entity flowers.
- * The flower types built into Forestry can not be used here.
+ * Registers custom logic for accepted flowers. These rules are inefficient compared to ones made with
+ * registerAcceptableFlower, but may be necessary for tile entity flowers. The flower types built into Forestry can
+ * not be used here.
+ *
* @since Forestry 4.0.8
*/
void registerAcceptableFlowerRule(IFlowerAcceptableRule flowerAcceptableRule, String... flowerTypes);
/**
- * Registers a plantable flower.
- * The distribution is based on its own weight and the total number of plants for this flowerType.
+ * Registers a plantable flower. The distribution is based on its own weight and the total number of plants for this
+ * flowerType.
*
- * @param weight Weight for the Flower (Vanilla = 1.0, Modded flowers < 1.0)
+ * @param weight Weight for the Flower (Vanilla = 1.0, Modded flowers < 1.0)
* @param flowerTypes See {@link forestry.api.apiculture.FlowerManager}.FlowerTypeXXX
*/
void registerPlantableFlower(Block flowerBlock, int flowerMeta, double weight, String... flowerTypes);
@@ -70,6 +73,7 @@ public interface IFlowerRegistry {
/**
* For use by IFlowerGrowthRule implementations
+ *
* @deprecated since Forestry 4.0.8 This will be accessible to IFlowerGrowthRule via IFlowerGrowthHelper
*/
@Deprecated
@@ -77,6 +81,7 @@ public interface IFlowerRegistry {
/**
* Returns all known flower types.
+ *
* @deprecated since Forestry 4.0.8 This should only be used internally.
*/
@Deprecated
diff --git a/src/main/java/forestry/api/genetics/IFruitBearer.java b/src/main/java/forestry/api/genetics/IFruitBearer.java
index d5af699e2..d74297c3c 100644
--- a/src/main/java/forestry/api/genetics/IFruitBearer.java
+++ b/src/main/java/forestry/api/genetics/IFruitBearer.java
@@ -6,6 +6,7 @@
package forestry.api.genetics;
import java.util.Collection;
+
import net.minecraft.item.ItemStack;
/**
@@ -28,8 +29,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 null.
+ * @param tool Tool used in picking the fruits. May be null.
* @return Picked fruits.
*/
Collection pickFruit(ItemStack tool);
@@ -42,8 +42,7 @@ public interface IFruitBearer {
/**
* Increases the ripeness of 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 9bc13c53a..1d79620d2 100644
--- a/src/main/java/forestry/api/genetics/IIndividual.java
+++ b/src/main/java/forestry/api/genetics/IIndividual.java
@@ -5,9 +5,10 @@
******************************************************************************/
package forestry.api.genetics;
-import forestry.api.core.INBTTagable;
import java.util.List;
+import forestry.api.core.INBTTagable;
+
/**
* An actual individual with genetic information.
*
@@ -23,6 +24,7 @@ public interface IIndividual extends INBTTagable {
/**
* Call to mark the IIndividual as analyzed.
+ *
* @return true if the IIndividual has not been analyzed previously.
*/
boolean analyze();
@@ -36,7 +38,9 @@ public interface IIndividual extends INBTTagable {
IGenome getGenome();
/**
- * Check whether the genetic makeup of two IIndividuals is identical. Ignores additional data like generations, irregular mating, etc..
+ * 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 8a08e46eb..51fc69723 100644
--- a/src/main/java/forestry/api/genetics/IIndividualLiving.java
+++ b/src/main/java/forestry/api/genetics/IIndividualLiving.java
@@ -26,6 +26,7 @@ public interface IIndividualLiving extends IIndividual {
/**
* Age the individual.
+ *
* @param world
* @param ageModifier
*/
@@ -33,6 +34,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/IMutation.java b/src/main/java/forestry/api/genetics/IMutation.java
index faf91f0cf..e8ae3b6af 100644
--- a/src/main/java/forestry/api/genetics/IMutation.java
+++ b/src/main/java/forestry/api/genetics/IMutation.java
@@ -34,7 +34,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();
diff --git a/src/main/java/forestry/api/genetics/IMutationCondition.java b/src/main/java/forestry/api/genetics/IMutationCondition.java
index bc626d19c..fe1be75f4 100644
--- a/src/main/java/forestry/api/genetics/IMutationCondition.java
+++ b/src/main/java/forestry/api/genetics/IMutationCondition.java
@@ -5,26 +5,18 @@
******************************************************************************/
package forestry.api.genetics;
-import forestry.api.core.IClimateProvider;
import net.minecraft.world.World;
+import forestry.api.core.IClimateProvider;
+
public interface IMutationCondition {
/**
- * Returns a float from 0 to 1 representing the chance for mutation to occur.
- * Most will return 1 if the condition is met and 0 otherwise,
- * but the float offers flexibility for more advanced conditions.
+ * Returns a float from 0 to 1 representing the chance for mutation to occur. Most will return 1 if the condition is
+ * met and 0 otherwise, but the float offers flexibility for more advanced conditions.
*/
- float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate);
+ float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate);
/**
* A localized description of the mutation condition. (i.e. "A temperature of HOT is required.")
diff --git a/src/main/java/forestry/api/genetics/IMutationCustom.java b/src/main/java/forestry/api/genetics/IMutationCustom.java
index 122fe9c09..73bfd67ba 100644
--- a/src/main/java/forestry/api/genetics/IMutationCustom.java
+++ b/src/main/java/forestry/api/genetics/IMutationCustom.java
@@ -5,11 +5,12 @@
******************************************************************************/
package forestry.api.genetics;
-import forestry.api.core.EnumHumidity;
-import forestry.api.core.EnumTemperature;
import net.minecraft.block.Block;
import net.minecraftforge.common.BiomeDictionary;
+import forestry.api.core.EnumHumidity;
+import forestry.api.core.EnumTemperature;
+
/** Set custom mutation requirements */
public interface IMutationCustom extends IMutation {
@@ -28,6 +29,7 @@ public interface IMutationCustom extends IMutation {
/**
* Restrict this mutation to certain types of biomes.
+ *
* @param types The types of biomes this mutation can occur.
*/
IMutationCustom restrictBiomeType(BiomeDictionary.Type... types);
diff --git a/src/main/java/forestry/api/genetics/IPollinatable.java b/src/main/java/forestry/api/genetics/IPollinatable.java
index 8d44d2559..cf1df8ecd 100644
--- a/src/main/java/forestry/api/genetics/IPollinatable.java
+++ b/src/main/java/forestry/api/genetics/IPollinatable.java
@@ -6,6 +6,7 @@
package forestry.api.genetics;
import java.util.EnumSet;
+
import net.minecraftforge.common.EnumPlantType;
/**
@@ -16,7 +17,8 @@ import net.minecraftforge.common.EnumPlantType;
public interface IPollinatable {
/**
- * @return plant types this pollinatable is classified as. (Can be used by bees to determine whether to interact or not.
+ * @return plant types this pollinatable is classified as. (Can be used by bees to determine whether to interact or
+ * not.
*/
EnumSet getPlantType();
@@ -30,8 +32,7 @@ public interface IPollinatable {
*
* Must be the one to check genetic equivalency.
*
- * @param pollen
- * IIndividual representing the pollen.
+ * @param pollen IIndividual representing the pollen.
* @return true if mating is possible, false otherwise.
*/
boolean canMateWith(IIndividual pollen);
@@ -39,8 +40,7 @@ public interface IPollinatable {
/**
* 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/ISpeciesRoot.java b/src/main/java/forestry/api/genetics/ISpeciesRoot.java
index ea9ef59bd..467b91246 100644
--- a/src/main/java/forestry/api/genetics/ISpeciesRoot.java
+++ b/src/main/java/forestry/api/genetics/ISpeciesRoot.java
@@ -5,24 +5,28 @@
******************************************************************************/
package forestry.api.genetics;
-import com.mojang.authlib.GameProfile;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Random;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
+import com.mojang.authlib.GameProfile;
+
/**
- * Describes a class of species (i.e. bees, trees, butterflies), provides helper functions and access to common functionality.
+ * Describes a class of species (i.e. bees, trees, butterflies), provides helper functions and access to common
+ * functionality.
*/
public interface ISpeciesRoot {
/**
- * @return A unique identifier for the species class. Should consist of "root" + a common name for the species class in camel-case, i.e. "rootBees", "rootTrees", "rootButterflies".
+ * @return A unique identifier for the species class. Should consist of "root" + a common name for the species class
+ * in camel-case, i.e. "rootBees", "rootTrees", "rootButterflies".
*/
String getUID();
@@ -37,22 +41,28 @@ public interface ISpeciesRoot {
int getSpeciesCount();
/**
- * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class.
+ * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this
+ * class.
+ *
* @param stack itemstack to check.
* @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise.
*/
boolean isMember(ItemStack stack);
/**
- * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class and matches the given type.
+ * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this
+ * class and matches the given type.
+ *
* @param stack itemstack to check.
- * @param type Integer denoting the type needed to match. (i.e. butterfly vs. butterfly serum; bee queens, princesses, drones; etc.)
+ * @param type Integer denoting the type needed to match. (i.e. butterfly vs. butterfly serum; bee queens,
+ * princesses, drones; etc.)
* @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise.
*/
boolean isMember(ItemStack stack, int type);
/**
* Used to check whether the given {@link IIndividual} is member of this class.
+ *
* @param individual {@link IIndividual} to check.
* @return true if the individual is member of this class, false otherwise.
*/
@@ -161,7 +171,8 @@ public interface ISpeciesRoot {
/**
* Sets an item stack as a valid (generic) research catalyst for this class.
- * @param itemstack ItemStack to set as suitable.
+ *
+ * @param itemstack ItemStack to set as suitable.
* @param suitability Float between 0 and 1 to indicate suitability.
*/
void setResearchSuitability(ItemStack itemstack, float suitability);
diff --git a/src/main/java/forestry/api/genetics/ISpeciesType.java b/src/main/java/forestry/api/genetics/ISpeciesType.java
index a677a0d44..036b9b8cd 100644
--- a/src/main/java/forestry/api/genetics/ISpeciesType.java
+++ b/src/main/java/forestry/api/genetics/ISpeciesType.java
@@ -6,4 +6,5 @@
package forestry.api.genetics;
/** Species types, implemented by enums and compared with == */
-public interface ISpeciesType {}
+public interface ISpeciesType {
+}
diff --git a/src/main/java/forestry/api/lepidopterology/ButterflyManager.java b/src/main/java/forestry/api/lepidopterology/ButterflyManager.java
index 81f224edb..26d599a04 100644
--- a/src/main/java/forestry/api/lepidopterology/ButterflyManager.java
+++ b/src/main/java/forestry/api/lepidopterology/ButterflyManager.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.api.lepidopterology;
diff --git a/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java b/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java
index e4be1fd53..353f8d2cf 100644
--- a/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java
+++ b/src/main/java/forestry/api/lepidopterology/EnumButterflyChromosome.java
@@ -5,6 +5,8 @@
******************************************************************************/
package forestry.api.lepidopterology;
+import java.util.Locale;
+
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleArea;
import forestry.api.genetics.IAlleleBoolean;
@@ -14,9 +16,9 @@ import forestry.api.genetics.IAlleleInteger;
import forestry.api.genetics.IAlleleTolerance;
import forestry.api.genetics.IChromosomeType;
import forestry.api.genetics.ISpeciesRoot;
-import java.util.Locale;
public enum EnumButterflyChromosome implements IChromosomeType {
+
/**
* Species of the bee. Alleles here must implement {@link IAlleleButterflySpecies}.
*/
@@ -38,7 +40,8 @@ public enum EnumButterflyChromosome implements IChromosomeType {
*/
METABOLISM(IAlleleInteger.class),
/**
- * Determines likelyhood of caterpillars and length of caterpillar/pupation phase. Also: Number of max caterpillars after mating?
+ * Determines likelyhood of caterpillars and length of caterpillar/pupation phase. Also: Number of max caterpillars
+ * after mating?
*/
FERTILITY(IAlleleInteger.class),
/**
@@ -72,8 +75,7 @@ public enum EnumButterflyChromosome implements IChromosomeType {
/**
* Not used yet
*/
- TERRITORY(IAlleleArea.class),
- ;
+ TERRITORY(IAlleleArea.class),;
Class extends IAllele> clss;
diff --git a/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java b/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java
index e8e40b631..f90d38545 100644
--- a/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java
+++ b/src/main/java/forestry/api/lepidopterology/EnumFlutterType.java
@@ -8,6 +8,7 @@ package forestry.api.lepidopterology;
import forestry.api.genetics.ISpeciesType;
public enum EnumFlutterType implements ISpeciesType {
+
BUTTERFLY,
SERUM,
CATERPILLAR,
diff --git a/src/main/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java b/src/main/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java
index 8617cf7b7..711f366c7 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/IAlleleButterflySpecies.java b/src/main/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java
index dfa2abd52..74abdacac 100644
--- a/src/main/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java
+++ b/src/main/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java
@@ -5,12 +5,14 @@
******************************************************************************/
package forestry.api.lepidopterology;
-import forestry.api.genetics.IAlleleSpecies;
import java.util.EnumSet;
import java.util.Map;
+
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.BiomeDictionary;
+import forestry.api.genetics.IAlleleSpecies;
+
public interface IAlleleButterflySpecies extends IAlleleSpecies {
/**
@@ -41,7 +43,8 @@ public interface IAlleleButterflySpecies extends IAlleleSpecies {
float getRarity();
/**
- * @return Float representing the distance below which this butterfly will take flight if it detects a player which is not sneaking.
+ * @return Float representing the distance below which this butterfly will take flight if it detects a player which
+ * is not sneaking.
*/
float getFlightDistance();
diff --git a/src/main/java/forestry/api/lepidopterology/IAlleleButterflySpeciesCustom.java b/src/main/java/forestry/api/lepidopterology/IAlleleButterflySpeciesCustom.java
index 9c1527197..4709bd645 100644
--- a/src/main/java/forestry/api/lepidopterology/IAlleleButterflySpeciesCustom.java
+++ b/src/main/java/forestry/api/lepidopterology/IAlleleButterflySpeciesCustom.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.api.lepidopterology;
import forestry.api.genetics.IAlleleSpeciesCustom;
public interface IAlleleButterflySpeciesCustom extends IAlleleButterflySpecies, IAlleleSpeciesCustom {
+
IAlleleButterflySpeciesCustom setRarity(float rarity);
IAlleleButterflySpeciesCustom setFlightDistance(float flightDistance);
diff --git a/src/main/java/forestry/api/lepidopterology/IButterfly.java b/src/main/java/forestry/api/lepidopterology/IButterfly.java
index cbb909c1a..1b3f0aeda 100644
--- a/src/main/java/forestry/api/lepidopterology/IButterfly.java
+++ b/src/main/java/forestry/api/lepidopterology/IButterfly.java
@@ -5,10 +5,11 @@
******************************************************************************/
package forestry.api.lepidopterology;
-import forestry.api.genetics.IIndividualLiving;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+import forestry.api.genetics.IIndividualLiving;
+
public interface IButterfly extends IIndividualLiving {
IButterflyGenome getGenome();
@@ -28,7 +29,8 @@ public interface IButterfly extends IIndividualLiving {
* @param x
* @param y
* @param z
- * @return true if the butterfly can naturally spawn at the given location at this time. (Used to auto-spawn butterflies from tree leaves.)
+ * @return true if the butterfly can naturally spawn at the given location at this time. (Used to auto-spawn
+ * butterflies from tree leaves.)
*/
boolean canSpawn(World world, double x, double y, double z);
@@ -37,7 +39,8 @@ public interface IButterfly extends IIndividualLiving {
* @param x
* @param y
* @param z
- * @return true if the butterfly can take flight at the given location at this time. (Used to auto-spawn butterflies from dropped items.)
+ * @return true if the butterfly can take flight at the given location at this time. (Used to auto-spawn butterflies
+ * from dropped items.)
*/
boolean canTakeFlight(World world, double x, double y, double z);
@@ -55,7 +58,7 @@ public interface IButterfly extends IIndividualLiving {
/**
* @param entity
* @param playerKill Whether or not the butterfly was killed by a player.
- * @param lootLevel Loot level according to the weapon used to kill the butterfly.
+ * @param lootLevel Loot level according to the weapon used to kill the butterfly.
* @return Array of itemstacks to drop on death of the given entity.
*/
ItemStack[] getLootDrop(IEntityButterfly entity, boolean playerKill, int lootLevel);
@@ -63,7 +66,7 @@ public interface IButterfly extends IIndividualLiving {
/**
* @param nursery
* @param playerKill Whether or not the nursery was broken by a player.
- * @param lootLevel Fortune level.
+ * @param lootLevel Fortune level.
* @return Array of itemstacks to drop on breaking of the nursery.
*/
ItemStack[] getCaterpillarDrop(IButterflyNursery nursery, boolean playerKill, int lootLevel);
diff --git a/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java b/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java
index 2ed88623d..a082662c9 100644
--- a/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java
+++ b/src/main/java/forestry/api/lepidopterology/IButterflyFactory.java
@@ -1,43 +1,37 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.api.lepidopterology;
-import forestry.api.genetics.IClassification;
import java.awt.Color;
+import forestry.api.genetics.IClassification;
+
public interface IButterflyFactory {
+
/**
- * Creates a new butterfly species.
- * Automatically registered with AlleleManager.alleleRegistry.registerAllele()
- * See IAlleleButterflySpeciesCustom and IAlleleSpeciesCustom for adding additional properties to the returned species.
+ * Creates a new butterfly species. Automatically registered with AlleleManager.alleleRegistry.registerAllele() See
+ * IAlleleButterflySpeciesCustom and IAlleleSpeciesCustom 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 texturePath String texture path for this butterfly e.g. "forestry:textures/entities/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 texturePath String texture path for this butterfly e.g.
+ * "forestry:textures/entities/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.
*/
- IAlleleButterflySpeciesCustom createSpecies(
- String uid,
- String unlocalizedName,
- String authority,
- String unlocalizedDescription,
- String texturePath,
- boolean dominant,
- IClassification branch,
- String binomial,
- Color serumColour);
+ IAlleleButterflySpeciesCustom createSpecies(String uid, String unlocalizedName, String authority,
+ String unlocalizedDescription, String texturePath, boolean dominant, IClassification branch,
+ String binomial, Color serumColour);
}
diff --git a/src/main/java/forestry/api/lepidopterology/IButterflyMutation.java b/src/main/java/forestry/api/lepidopterology/IButterflyMutation.java
index 413d21799..8450a413c 100644
--- a/src/main/java/forestry/api/lepidopterology/IButterflyMutation.java
+++ b/src/main/java/forestry/api/lepidopterology/IButterflyMutation.java
@@ -10,5 +10,6 @@ import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutation;
public interface IButterflyMutation extends IMutation {
+
float getChance(IButterflyNursery housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1);
}
diff --git a/src/main/java/forestry/api/lepidopterology/IButterflyRoot.java b/src/main/java/forestry/api/lepidopterology/IButterflyRoot.java
index b597b7333..e1b1b981b 100644
--- a/src/main/java/forestry/api/lepidopterology/IButterflyRoot.java
+++ b/src/main/java/forestry/api/lepidopterology/IButterflyRoot.java
@@ -5,17 +5,20 @@
******************************************************************************/
package forestry.api.lepidopterology;
-import com.mojang.authlib.GameProfile;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IIndividual;
-import forestry.api.genetics.ISpeciesRoot;
import java.util.ArrayList;
import java.util.Collection;
+
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
+import com.mojang.authlib.GameProfile;
+
+import forestry.api.genetics.IAllele;
+import forestry.api.genetics.IIndividual;
+import forestry.api.genetics.ISpeciesRoot;
+
public interface IButterflyRoot extends ISpeciesRoot {
@Override
@@ -48,6 +51,7 @@ public interface IButterflyRoot extends ISpeciesRoot {
/**
* Spawns the given butterfly in the world.
+ *
* @param butterfly
* @return butterfly entity on success, null otherwise.
*/
diff --git a/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java b/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java
index 72906889a..2f5420d48 100644
--- a/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java
+++ b/src/main/java/forestry/api/lepidopterology/IEntityButterfly.java
@@ -5,10 +5,11 @@
******************************************************************************/
package forestry.api.lepidopterology;
-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);
diff --git a/src/main/java/forestry/api/mail/EnumAddressee.java b/src/main/java/forestry/api/mail/EnumAddressee.java
index 630362da7..2ea0d3dcf 100644
--- a/src/main/java/forestry/api/mail/EnumAddressee.java
+++ b/src/main/java/forestry/api/mail/EnumAddressee.java
@@ -8,6 +8,7 @@ package forestry.api.mail;
import java.util.Locale;
public enum EnumAddressee {
+
PLAYER,
TRADER;
diff --git a/src/main/java/forestry/api/mail/EnumPostage.java b/src/main/java/forestry/api/mail/EnumPostage.java
index 385053bc6..0d1434c2a 100644
--- a/src/main/java/forestry/api/mail/EnumPostage.java
+++ b/src/main/java/forestry/api/mail/EnumPostage.java
@@ -6,6 +6,7 @@
package forestry.api.mail;
public enum EnumPostage {
+
P_0(0),
P_1(1),
P_2(2),
diff --git a/src/main/java/forestry/api/mail/ILetter.java b/src/main/java/forestry/api/mail/ILetter.java
index f53932dbc..449d5d76e 100644
--- a/src/main/java/forestry/api/mail/ILetter.java
+++ b/src/main/java/forestry/api/mail/ILetter.java
@@ -5,11 +5,13 @@
******************************************************************************/
package forestry.api.mail;
-import forestry.api.core.INBTTagable;
import java.util.List;
+
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+import forestry.api.core.INBTTagable;
+
public interface ILetter extends IInventory, INBTTagable {
ItemStack[] getPostage();
diff --git a/src/main/java/forestry/api/mail/ILetterHandler.java b/src/main/java/forestry/api/mail/ILetterHandler.java
index 1df3db80a..15b40c126 100644
--- a/src/main/java/forestry/api/mail/ILetterHandler.java
+++ b/src/main/java/forestry/api/mail/ILetterHandler.java
@@ -9,5 +9,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public interface ILetterHandler {
+
IPostalState handleLetter(World world, IMailAddress recipient, ItemStack letterStack, boolean doLodge);
}
diff --git a/src/main/java/forestry/api/mail/IPostOffice.java b/src/main/java/forestry/api/mail/IPostOffice.java
index 10af3eb0b..d9ce2a967 100644
--- a/src/main/java/forestry/api/mail/IPostOffice.java
+++ b/src/main/java/forestry/api/mail/IPostOffice.java
@@ -6,6 +6,7 @@
package forestry.api.mail;
import java.util.Map;
+
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
diff --git a/src/main/java/forestry/api/mail/IPostRegistry.java b/src/main/java/forestry/api/mail/IPostRegistry.java
index 648c4c972..fcd3466b4 100644
--- a/src/main/java/forestry/api/mail/IPostRegistry.java
+++ b/src/main/java/forestry/api/mail/IPostRegistry.java
@@ -5,11 +5,13 @@
******************************************************************************/
package forestry.api.mail;
-import com.mojang.authlib.GameProfile;
import java.util.Map;
+
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+import com.mojang.authlib.GameProfile;
+
public interface IPostRegistry {
/* POST OFFICE */
@@ -32,6 +34,7 @@ public interface IPostRegistry {
/* CARRIERS */
/**
* Registers a new {@link IPostalCarrier}. See {@link IPostalCarrier} for details.
+ *
* @param carrier {@link IPostalCarrier} to register.
*/
void registerCarrier(IPostalCarrier carrier);
diff --git a/src/main/java/forestry/api/mail/IPostalCarrier.java b/src/main/java/forestry/api/mail/IPostalCarrier.java
index 8afe2680b..5577d4a06 100644
--- a/src/main/java/forestry/api/mail/IPostalCarrier.java
+++ b/src/main/java/forestry/api/mail/IPostalCarrier.java
@@ -5,18 +5,18 @@
******************************************************************************/
package forestry.api.mail;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
/**
- * Postal Carriers are systems which can be hooked into Forestry's mail system to handle mail delivery.
+ * 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.
+ * The two available carriers in vanilla Forestry are "player" - Delivers mail to individual players. "trader" - Handles
+ * mail addressed to trade stations.
*/
public interface IPostalCarrier {
@@ -35,13 +35,16 @@ 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 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 world The world the {@link IPostOffice} handles.
+ * @param office {link @IPostOffice} which received this letter and handed it to the carrier.
+ * @param recipient An identifier for the recipient as typed by the player into the address field.
+ * @param letterstack ItemStack representing the letter. See {@link IPostRegistry} for helper functions to validate
+ * and extract it.
+ * @param doDeliver Whether or not the letter is supposed to actually be delivered or if delivery is only to be
+ * simulated.
* @return {link IPostalState} holding information on success or failure for delivery.
*/
- IPostalState deliverLetter(
- World world, IPostOffice office, IMailAddress recipient, ItemStack letterstack, boolean doDeliver);
+ 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 97fe77d61..883ef7f94 100644
--- a/src/main/java/forestry/api/mail/IPostalState.java
+++ b/src/main/java/forestry/api/mail/IPostalState.java
@@ -6,6 +6,7 @@
package forestry.api.mail;
public interface IPostalState {
+
boolean isOk();
String getIdentifier();
diff --git a/src/main/java/forestry/api/mail/PostManager.java b/src/main/java/forestry/api/mail/PostManager.java
index 98bd34375..03b8fdb04 100644
--- a/src/main/java/forestry/api/mail/PostManager.java
+++ b/src/main/java/forestry/api/mail/PostManager.java
@@ -6,5 +6,6 @@
package forestry.api.mail;
public class PostManager {
+
public static IPostRegistry postRegistry;
}
diff --git a/src/main/java/forestry/api/mail/TradeStationInfo.java b/src/main/java/forestry/api/mail/TradeStationInfo.java
index e37dc8474..61692d51a 100644
--- a/src/main/java/forestry/api/mail/TradeStationInfo.java
+++ b/src/main/java/forestry/api/mail/TradeStationInfo.java
@@ -5,18 +5,20 @@
******************************************************************************/
package forestry.api.mail;
-import com.mojang.authlib.GameProfile;
import net.minecraft.item.ItemStack;
+import com.mojang.authlib.GameProfile;
+
public class TradeStationInfo {
+
public final IMailAddress address;
public final GameProfile owner;
public final ItemStack tradegood;
public final ItemStack[] required;
public final IPostalState state;
- public TradeStationInfo(
- IMailAddress address, GameProfile owner, ItemStack tradegood, ItemStack[] required, IPostalState state) {
+ public TradeStationInfo(IMailAddress address, GameProfile owner, ItemStack tradegood, ItemStack[] required,
+ IPostalState state) {
if (!address.isTrader()) {
throw new IllegalArgumentException("TradeStation address must be a trader");
}
diff --git a/src/main/java/forestry/api/multiblock/IAlvearyComponent.java b/src/main/java/forestry/api/multiblock/IAlvearyComponent.java
index 1d52f25f9..13a904caa 100644
--- a/src/main/java/forestry/api/multiblock/IAlvearyComponent.java
+++ b/src/main/java/forestry/api/multiblock/IAlvearyComponent.java
@@ -10,11 +10,12 @@ import forestry.api.apiculture.IBeeModifier;
import forestry.api.core.IClimateControlled;
/**
- * Needs to be implemented by TileEntities that want to be part of an alveary.
- * The sub-interfaces can be implemented to alter the operation of the alveary.
- * They are automatically detected and handled by the alveary when they join its structure.
+ * Needs to be implemented by TileEntities that want to be part of an alveary. The sub-interfaces can be implemented to
+ * alter the operation of the alveary. They are automatically detected and handled by the alveary when they join its
+ * structure.
*/
public interface IAlvearyComponent extends IMultiblockComponent {
+
/**
* @return the multiblock logic for this component
*/
@@ -24,6 +25,7 @@ public interface IAlvearyComponent extends IM
* Implemented by alveary parts to apply a beeListener to the completed structure.
*/
interface BeeListener extends IAlvearyComponent {
+
IBeeListener getBeeListener();
}
@@ -31,6 +33,7 @@ public interface IAlvearyComponent extends IM
* Implemented by alveary parts to apply a beeModifier to the completed structure.
*/
interface BeeModifier extends IAlvearyComponent {
+
IBeeModifier getBeeModifier();
}
@@ -38,10 +41,12 @@ public interface IAlvearyComponent extends IM
* Implemented by alveary parts to apply a climate change to the completed structure.
*/
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);
}
@@ -50,6 +55,7 @@ public interface IAlvearyComponent extends IM
* Implemented by alveary parts to receive ticks from the completed structure.
*/
interface Active extends IAlvearyComponent {
+
void updateServer(int tickCount);
void updateClient(int tickCount);
diff --git a/src/main/java/forestry/api/multiblock/IAlvearyController.java b/src/main/java/forestry/api/multiblock/IAlvearyController.java
index cb24ca218..aec43bb09 100644
--- a/src/main/java/forestry/api/multiblock/IAlvearyController.java
+++ b/src/main/java/forestry/api/multiblock/IAlvearyController.java
@@ -8,7 +8,8 @@ package forestry.api.multiblock;
import forestry.api.apiculture.IBeeHousing;
/**
- * The IAlvearyController provides access to all the IMultiblockController and IBeeHousing methods
- * necessary for an IAlvearyComponent to function.
+ * The IAlvearyController provides access to all the IMultiblockController and IBeeHousing methods necessary for an
+ * IAlvearyComponent to function.
*/
-public interface IAlvearyController extends IMultiblockController, IBeeHousing {}
+public interface IAlvearyController extends IMultiblockController, IBeeHousing {
+}
diff --git a/src/main/java/forestry/api/multiblock/IFarmComponent.java b/src/main/java/forestry/api/multiblock/IFarmComponent.java
index 890ac13d9..afc9c9ca0 100644
--- a/src/main/java/forestry/api/multiblock/IFarmComponent.java
+++ b/src/main/java/forestry/api/multiblock/IFarmComponent.java
@@ -8,9 +8,9 @@ package forestry.api.multiblock;
import forestry.api.farming.IFarmListener;
/**
- * Needs to be implemented by TileEntities that want to be part of a farm.
- * The sub-interfaces can be implemented to alter the operation of the farm.
- * They are automatically detected and handled by the farm when they join its structure.
+ * Needs to be implemented by TileEntities that want to be part of a farm. The sub-interfaces can be implemented to
+ * alter the operation of the farm. They are automatically detected and handled by the farm when they join its
+ * structure.
*/
public interface IFarmComponent extends IMultiblockComponent {
@@ -23,6 +23,7 @@ public interface IFarmComponent extends IMultibl
* Implemented by farm parts to apply a farmListener to the completed structure.
*/
interface Listener extends IFarmComponent {
+
IFarmListener getFarmListener();
}
@@ -30,6 +31,7 @@ public interface IFarmComponent extends IMultibl
* Implemented by farm parts to receive ticks from the completed structure.
*/
interface Active extends IFarmComponent {
+
void updateServer(int tickCount);
void updateClient(int tickCount);
diff --git a/src/main/java/forestry/api/multiblock/IFarmController.java b/src/main/java/forestry/api/multiblock/IFarmController.java
index 0e6872418..b739da38b 100644
--- a/src/main/java/forestry/api/multiblock/IFarmController.java
+++ b/src/main/java/forestry/api/multiblock/IFarmController.java
@@ -8,7 +8,8 @@ package forestry.api.multiblock;
import forestry.api.farming.IFarmHousing;
/**
- * The IFarmController provides access to all the IMultiblockController and IFarmHousing methods
- * necessary for an IFarmComponent to function.
+ * The IFarmController provides access to all the IMultiblockController and IFarmHousing methods necessary for an
+ * IFarmComponent to function.
*/
-public interface IFarmController extends IMultiblockController, IFarmHousing {}
+public interface IFarmController extends IMultiblockController, IFarmHousing {
+}
diff --git a/src/main/java/forestry/api/multiblock/IMultiblockComponent.java b/src/main/java/forestry/api/multiblock/IMultiblockComponent.java
index 6bb0d918d..ef5e5b705 100644
--- a/src/main/java/forestry/api/multiblock/IMultiblockComponent.java
+++ b/src/main/java/forestry/api/multiblock/IMultiblockComponent.java
@@ -5,17 +5,18 @@
******************************************************************************/
package forestry.api.multiblock;
-import com.mojang.authlib.GameProfile;
import net.minecraft.util.ChunkCoordinates;
+import com.mojang.authlib.GameProfile;
+
/**
- * Basic interface for a multiblock machine component.
- * Implemented by TileEntities.
+ * 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.
*/
ChunkCoordinates getCoordinates();
@@ -31,18 +32,17 @@ public interface IMultiblockComponent {
IMultiblockLogic getMultiblockLogic();
/**
- * Called when a machine is fully assembled from the disassembled state, meaning
- * 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.
+ * Called when a machine is fully assembled from the disassembled state, meaning 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, ChunkCoordinates minCoord, ChunkCoordinates maxCoord);
+ void onMachineAssembled(IMultiblockController multiblockController, ChunkCoordinates minCoord,
+ ChunkCoordinates maxCoord);
/**
- * Called when the machine is broken for game reasons, e.g. a player removed a block
- * or an explosion occurred.
+ * Called when the machine is broken for game reasons, e.g. a player removed a block or an explosion occurred.
*/
void onMachineBroken();
}
diff --git a/src/main/java/forestry/api/multiblock/IMultiblockController.java b/src/main/java/forestry/api/multiblock/IMultiblockController.java
index 07b104e32..408ba59f7 100644
--- a/src/main/java/forestry/api/multiblock/IMultiblockController.java
+++ b/src/main/java/forestry/api/multiblock/IMultiblockController.java
@@ -6,30 +6,31 @@
package forestry.api.multiblock;
import java.util.Collection;
+
import javax.annotation.Nonnull;
/**
- * IMultiblockController is used to handle the assembly of Multiblocks.
- * This class is created and updated by IMultiblockLogic and Forestry.
- * This is a minimal interface to hide the ugly details from the multiblock tile entities.
+ * IMultiblockController is used to handle the assembly of Multiblocks. This class is created and updated by
+ * IMultiblockLogic and Forestry. This is a minimal interface to hide the ugly details from the multiblock tile
+ * entities.
*/
public interface IMultiblockController {
+
/**
* @return True if this multiblock machine is considered assembled and ready to go.
*/
boolean isAssembled();
/**
- * Call to force the controller to check the multiblock's validity.
- * Use when important conditions around the multiblock change
- * (i.e. Alveary slabs are removed and the alveary block detects it's neighbor changed)
- * Changes to multiblock components are handled automatically and should not call this.
+ * Call to force the controller to check the multiblock's validity. Use when important conditions around the
+ * multiblock change (i.e. Alveary slabs are removed and the alveary block detects it's neighbor changed) Changes to
+ * multiblock components are handled automatically and should not call this.
*/
void reassemble();
/**
- * @return A string representing the last error encountered when trying to assemble this
- * multiblock, or null if there is no error.
+ * @return A string representing the last error encountered when trying to assemble this multiblock, or null if
+ * there is no error.
*/
String getLastValidationError();
diff --git a/src/main/java/forestry/api/multiblock/IMultiblockLogic.java b/src/main/java/forestry/api/multiblock/IMultiblockLogic.java
index 5183b983f..1b5a5d957 100644
--- a/src/main/java/forestry/api/multiblock/IMultiblockLogic.java
+++ b/src/main/java/forestry/api/multiblock/IMultiblockLogic.java
@@ -5,16 +5,17 @@
******************************************************************************/
package forestry.api.multiblock;
-import forestry.api.core.INBTTagable;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
+import forestry.api.core.INBTTagable;
+
/**
- * Multiblock Logic implements the basic logic for IMultiblockComponent tile entities.
- * Instances must come from MultiblockManager.logicFactory, most of the implementation is hidden.
+ * 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.
+ * IMultiblockComponent tile entities must wire up the methods in the "Updating and Synchronization" section. As a
+ * starting point, you can use MultiblockTileEntityBase.
*/
public interface IMultiblockLogic extends INBTTagable {
@@ -46,27 +47,23 @@ public interface IMultiblockLogic extends INBTTagable {
void onChunkUnload(World world, IMultiblockComponent part);
/**
- * Writes data for client synchronization.
- * Use this in Tile.getDescriptionPacket()
+ * Writes data for client synchronization. Use this in Tile.getDescriptionPacket()
*/
void encodeDescriptionPacket(NBTTagCompound packetData);
/**
- * Reads data for client synchronization.
- * Use this in Tile.onDataPacket()
+ * Reads data for client synchronization. Use this in Tile.onDataPacket()
*/
void decodeDescriptionPacket(NBTTagCompound packetData);
/**
- * Read the logic's data from file.
- * Use this in Tile.readFromNBT()
+ * Read the logic's data from file. Use this in Tile.readFromNBT()
*/
@Override
void readFromNBT(NBTTagCompound nbttagcompound);
/**
- * Write the logic's data to file.
- * Use this in Tile.writeToNBT()
+ * Write the logic's data to file. Use this in Tile.writeToNBT()
*/
@Override
void writeToNBT(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/forestry/api/multiblock/IMultiblockLogicAlveary.java b/src/main/java/forestry/api/multiblock/IMultiblockLogicAlveary.java
index 1af46e819..80f7af415 100644
--- a/src/main/java/forestry/api/multiblock/IMultiblockLogicAlveary.java
+++ b/src/main/java/forestry/api/multiblock/IMultiblockLogicAlveary.java
@@ -6,6 +6,7 @@
package forestry.api.multiblock;
public interface IMultiblockLogicAlveary extends IMultiblockLogic {
+
/**
* @return the multiblock controller for this logic
*/
diff --git a/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java b/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java
index 4ceabb54b..d19a58bfc 100644
--- a/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java
+++ b/src/main/java/forestry/api/multiblock/IMultiblockLogicFactory.java
@@ -6,10 +6,10 @@
package forestry.api.multiblock;
/**
- * Creates new instances of IMultiblockLogic.
- * Each IMultiblockComponent needs its own instance of IMultiblockLogic.
+ * Creates new instances of IMultiblockLogic. Each IMultiblockComponent needs its own instance of IMultiblockLogic.
*/
public interface IMultiblockLogicFactory {
+
IMultiblockLogicAlveary createAlvearyLogic();
IMultiblockLogicFarm createFarmLogic();
diff --git a/src/main/java/forestry/api/multiblock/IMultiblockLogicFarm.java b/src/main/java/forestry/api/multiblock/IMultiblockLogicFarm.java
index e32661e2a..b2e05c1b4 100644
--- a/src/main/java/forestry/api/multiblock/IMultiblockLogicFarm.java
+++ b/src/main/java/forestry/api/multiblock/IMultiblockLogicFarm.java
@@ -6,6 +6,7 @@
package forestry.api.multiblock;
public interface IMultiblockLogicFarm extends IMultiblockLogic {
+
/**
* @return the multiblock controller for this logic
*/
diff --git a/src/main/java/forestry/api/multiblock/MultiblockManager.java b/src/main/java/forestry/api/multiblock/MultiblockManager.java
index 9b0017ee9..10e1208e8 100644
--- a/src/main/java/forestry/api/multiblock/MultiblockManager.java
+++ b/src/main/java/forestry/api/multiblock/MultiblockManager.java
@@ -6,5 +6,6 @@
package forestry.api.multiblock;
public class MultiblockManager {
+
public static IMultiblockLogicFactory logicFactory;
}
diff --git a/src/main/java/forestry/api/multiblock/MultiblockTileEntityBase.java b/src/main/java/forestry/api/multiblock/MultiblockTileEntityBase.java
index 99373542b..9e5b385e6 100644
--- a/src/main/java/forestry/api/multiblock/MultiblockTileEntityBase.java
+++ b/src/main/java/forestry/api/multiblock/MultiblockTileEntityBase.java
@@ -13,12 +13,12 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
/**
- * Base logic class for Multiblock-connected tile entities.
- * Most multiblock components should derive from this.
- * Supply it an IMultiblockLogic from MultiblockManager.logicFactory
+ * Base logic class for Multiblock-connected tile entities. Most multiblock components should derive from this. Supply
+ * it an IMultiblockLogic from MultiblockManager.logicFactory
*/
public abstract class MultiblockTileEntityBase extends TileEntity
implements IMultiblockComponent {
+
private final T multiblockLogic;
public MultiblockTileEntityBase(T multiblockLogic) {
@@ -36,8 +36,8 @@ public abstract class MultiblockTileEntityBase exten
}
@Override
- public abstract void onMachineAssembled(
- IMultiblockController multiblockController, ChunkCoordinates minCoord, ChunkCoordinates maxCoord);
+ public abstract void onMachineAssembled(IMultiblockController multiblockController, ChunkCoordinates minCoord,
+ ChunkCoordinates maxCoord);
@Override
public abstract void onMachineBroken();
@@ -55,9 +55,10 @@ public abstract class MultiblockTileEntityBase exten
}
/**
- * Generally, TileEntities that are part of a multiblock should not subscribe to updates
- * from the main game loop. Instead, you should have lists of TileEntities which need to
- * be notified during an update() in your Controller and perform callbacks from there.
+ * Generally, TileEntities that are part of a multiblock should not subscribe to updates from the main game loop.
+ * Instead, you should have lists of TileEntities which need to be notified during an update() in your Controller
+ * and perform callbacks from there.
+ *
* @see net.minecraft.tileentity.TileEntity#canUpdate()
*/
@Override
diff --git a/src/main/java/forestry/api/recipes/ICarpenterManager.java b/src/main/java/forestry/api/recipes/ICarpenterManager.java
index 13d10fb2e..a37593eed 100644
--- a/src/main/java/forestry/api/recipes/ICarpenterManager.java
+++ b/src/main/java/forestry/api/recipes/ICarpenterManager.java
@@ -12,8 +12,8 @@ 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.
+ * 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}
*
@@ -22,45 +22,40 @@ import net.minecraftforge.fluids.FluidStack;
* @author SirSengir
*/
public interface ICarpenterManager extends ICraftingProvider {
+
/**
* Add a shaped recipe to the carpenter.
*
- * @param box
- * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null.
- * @param product
- * Crafting result.
- * @param materials
- * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same.
+ * @param box ItemStack of one item representing the required box (carton, crate) for this recipe. May be
+ * null.
+ * @param product Crafting result.
+ * @param materials Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}.
+ * Notation is the same.
*/
public void addRecipe(ItemStack box, ItemStack product, Object... materials);
/**
* Add a shaped recipe to the carpenter.
*
- * @param packagingTime
- * Number of work cycles required to craft the recipe once.
- * @param box
- * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null.
- * @param product
- * Crafting result.
- * @param materials
- * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same.
+ * @param packagingTime Number of work cycles required to craft the recipe once.
+ * @param box ItemStack of one item representing the required box (carton, crate) for this recipe. May be
+ * null.
+ * @param product Crafting result.
+ * @param materials Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}.
+ * Notation is the same.
*/
public void addRecipe(int packagingTime, ItemStack box, ItemStack product, Object... materials);
/**
* Add a shaped recipe to the carpenter.
*
- * @param packagingTime
- * Number of work cycles required to craft the recipe once.
- * @param liquid
- * Liquid required in carpenter's tank.
- * @param box
- * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null.
- * @param product
- * Crafting result.
- * @param materials
- * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same.
+ * @param packagingTime Number of work cycles required to craft the recipe once.
+ * @param liquid Liquid required in carpenter's tank.
+ * @param box ItemStack of one item representing the required box (carton, crate) for this recipe. May be
+ * null.
+ * @param product Crafting result.
+ * @param materials Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}.
+ * Notation is the same.
*/
public void addRecipe(int packagingTime, FluidStack liquid, ItemStack box, ItemStack product, Object... materials);
}
diff --git a/src/main/java/forestry/api/recipes/ICarpenterRecipe.java b/src/main/java/forestry/api/recipes/ICarpenterRecipe.java
index 287e6a94f..0cb276ecf 100644
--- a/src/main/java/forestry/api/recipes/ICarpenterRecipe.java
+++ b/src/main/java/forestry/api/recipes/ICarpenterRecipe.java
@@ -6,6 +6,7 @@
package forestry.api.recipes;
import javax.annotation.Nullable;
+
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -17,13 +18,14 @@ public interface ICarpenterRecipe extends IForestryRecipe {
int getPackagingTime();
/**
- * @return the crafting grid recipe. The crafting recipe's getRecipeOutput() is used as the ICarpenterRecipe's output.
+ * @return the crafting grid recipe. The crafting recipe's getRecipeOutput() is used as the ICarpenterRecipe's
+ * output.
*/
IDescriptiveRecipe getCraftingGridRecipe();
/**
- * @return the box required for this recipe. return null if there is no required box.
- * Examples of boxes are the Forestry cartons and crates.
+ * @return the box required for this recipe. return null if there is no required box. Examples of boxes are the
+ * Forestry cartons and crates.
*/
@Nullable
ItemStack getBox();
diff --git a/src/main/java/forestry/api/recipes/ICentrifugeManager.java b/src/main/java/forestry/api/recipes/ICentrifugeManager.java
index 8c655dab1..a8ccbccde 100644
--- a/src/main/java/forestry/api/recipes/ICentrifugeManager.java
+++ b/src/main/java/forestry/api/recipes/ICentrifugeManager.java
@@ -6,13 +6,14 @@
package forestry.api.recipes;
import java.util.Map;
+
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.
+ * 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}
*
@@ -24,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 2f6a7d321..3820fd357 100644
--- a/src/main/java/forestry/api/recipes/ICentrifugeRecipe.java
+++ b/src/main/java/forestry/api/recipes/ICentrifugeRecipe.java
@@ -8,6 +8,7 @@ package forestry.api.recipes;
import java.util.Collection;
import java.util.Map;
import java.util.Random;
+
import net.minecraft.item.ItemStack;
public interface ICentrifugeRecipe extends IForestryRecipe {
@@ -22,8 +23,8 @@ public interface ICentrifugeRecipe extends IForestryRecipe {
Collection getProducts(Random random);
/**
- * Returns a list of all possible products and their estimated probabilities (0.0 to 1.0],
- * to help mods that display recipes
+ * Returns a list of all possible products and their estimated probabilities (0.0 to 1.0], to help mods that display
+ * recipes
**/
Map getAllProducts();
}
diff --git a/src/main/java/forestry/api/recipes/ICraftingProvider.java b/src/main/java/forestry/api/recipes/ICraftingProvider.java
index e49a168d5..2b63a1e4f 100644
--- a/src/main/java/forestry/api/recipes/ICraftingProvider.java
+++ b/src/main/java/forestry/api/recipes/ICraftingProvider.java
@@ -9,8 +9,10 @@ import java.util.Collection;
import java.util.Map;
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
*/
@@ -18,6 +20,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
*/
@@ -32,7 +35,8 @@ public interface ICraftingProvider {
/**
* Access to the full list of recipes contained in the crafting provider.
*
- * @return List of the given format where the first array represents inputs and the second outputs. Objects can be either ItemStack or LiquidStack.
+ * @return List of the given format where the first array represents inputs and the second outputs. Objects can be
+ * either ItemStack or LiquidStack.
* @deprecated since Forestry 4.1.0. Use recipes()
*/
@Deprecated
diff --git a/src/main/java/forestry/api/recipes/IDescriptiveRecipe.java b/src/main/java/forestry/api/recipes/IDescriptiveRecipe.java
index 6020ddc93..6d9fbf9b8 100644
--- a/src/main/java/forestry/api/recipes/IDescriptiveRecipe.java
+++ b/src/main/java/forestry/api/recipes/IDescriptiveRecipe.java
@@ -10,9 +10,8 @@ import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
/**
- * Extension of IRecipe to give better access to the expected crafting inputs.
- * It can be matched against regular IInventory instead of just InventoryCrafting.
- * Useful for displaying crafting recipes.
+ * Extension of IRecipe to give better access to the expected crafting inputs. It can be matched against regular
+ * IInventory instead of just InventoryCrafting. Useful for displaying crafting recipes.
*/
public interface IDescriptiveRecipe extends IRecipe {
@@ -27,14 +26,14 @@ public interface IDescriptiveRecipe extends IRecipe {
int getHeight();
/**
- * @return array of all the ingredients in the crafting table.
- * Ingredients may be null, ItemStack, ItemStack[], or a List of ItemStack
+ * @return array of all the ingredients in the crafting table. Ingredients may be null, ItemStack, ItemStack[], or a
+ * List of ItemStack
*/
Object[] getIngredients();
/**
- * @return true if the recipe manager should copy NBT from input items to the output item.
- * If true, all input items must have the same NBT for it to succeed.
+ * @return true if the recipe manager should copy NBT from input items to the output item. If true, all input items
+ * must have the same NBT for it to succeed.
* @deprecated since Forestry 4.2 wood itemStacks use item damage (meta) instead of NBT
*/
@Deprecated
@@ -42,6 +41,7 @@ public interface IDescriptiveRecipe extends IRecipe {
/**
* Used to check if a recipe matches current crafting inventory
+ *
* @deprecated Since Forestry 4.1. This is handled by Forestry.
*/
@Deprecated
diff --git a/src/main/java/forestry/api/recipes/IFabricatorRecipe.java b/src/main/java/forestry/api/recipes/IFabricatorRecipe.java
index cba4871b9..12d678c81 100644
--- a/src/main/java/forestry/api/recipes/IFabricatorRecipe.java
+++ b/src/main/java/forestry/api/recipes/IFabricatorRecipe.java
@@ -6,6 +6,7 @@
package forestry.api.recipes;
import javax.annotation.Nullable;
+
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -52,13 +53,14 @@ public interface IFabricatorRecipe extends IForestryRecipe {
/**
* Returns an Item that is the result of this recipe
+ *
* @deprecated since Forestry 4.1. Forestry uses getRecipeOutput() and preservesNbt() to determine the result.
*/
@Deprecated
ItemStack getCraftingResult(IInventory craftingInventory);
/**
- * @param plan The Fabricator plan, the item in the top right slot.
+ * @param plan The Fabricator plan, the item in the top right slot.
* @param resources The resources in the crafting grid.
* @return true if the plan and resources match this recipe.
* @deprecated since Forestry 4.1. This is handled by Forestry instead.
diff --git a/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java b/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java
index 3d752a5c9..c9d763ffe 100644
--- a/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java
+++ b/src/main/java/forestry/api/recipes/IFabricatorSmeltingManager.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.api.recipes;
@@ -14,10 +12,12 @@ 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 88094cd8a..301dfddb5 100644
--- a/src/main/java/forestry/api/recipes/IFabricatorSmeltingRecipe.java
+++ b/src/main/java/forestry/api/recipes/IFabricatorSmeltingRecipe.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.api.recipes;
@@ -14,6 +12,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public interface IFabricatorSmeltingRecipe extends IForestryRecipe {
+
/**
* @return item to be melted down
*/
diff --git a/src/main/java/forestry/api/recipes/IFermenterManager.java b/src/main/java/forestry/api/recipes/IFermenterManager.java
index a571e1244..5be70d78a 100644
--- a/src/main/java/forestry/api/recipes/IFermenterManager.java
+++ b/src/main/java/forestry/api/recipes/IFermenterManager.java
@@ -11,9 +11,8 @@ 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.
+ * 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}
*
@@ -24,29 +23,27 @@ public interface IFermenterManager extends ICraftingProvider {
/**
* Add a recipe to the fermenter
*
- * @param resource ItemStack representing the resource.
- * @param fermentationValue Value of the given resource, i.e. how much needs
- * to be fermented for the output to be deposited into the product tank.
- * @param modifier Modifies the amount of liquid output per work cycle.
- * (water = 1.0f, honey = 1.5f)
- * @param output LiquidStack representing output liquid. Amount is
- * determined by fermentationValue*modifier.
- * @param liquid LiquidStack representing resource liquid and amount.
+ * @param resource ItemStack representing the resource.
+ * @param fermentationValue Value of the given resource, i.e. how much needs to be fermented for the output to be
+ * deposited into the product tank.
+ * @param modifier Modifies the amount of liquid output per work cycle. (water = 1.0f, honey = 1.5f)
+ * @param output LiquidStack representing output liquid. Amount is determined by
+ * fermentationValue*modifier.
+ * @param liquid LiquidStack representing resource liquid and amount.
* @throws NullPointerException if resource, output or liquid is null
*/
- public void addRecipe(
- ItemStack resource, int fermentationValue, float modifier, FluidStack output, FluidStack liquid);
+ public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output,
+ FluidStack liquid);
/**
* Add a recipe to the fermenter. Defaults to water as input liquid.
*
- * @param resource ItemStack representing the resource.
- * @param modifier Modifies the amount of liquid output per work cycle.
- * (water = 1.0f, honey = 1.5f)
- * @param fermentationValue Value of the given resource, i.e. how much needs
- * to be fermented for the output to be deposited into the product tank.
- * @param output LiquidStack representing output liquid. Amount is
- * determined by fermentationValue*modifier.
+ * @param resource ItemStack representing the resource.
+ * @param modifier Modifies the amount of liquid output per work cycle. (water = 1.0f, honey = 1.5f)
+ * @param fermentationValue Value of the given resource, i.e. how much needs to be fermented for the output to be
+ * deposited into the product tank.
+ * @param output LiquidStack representing output liquid. Amount is determined by
+ * fermentationValue*modifier.
* @throws NullPointerException if resource, output or liquid is null
*/
public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output);
diff --git a/src/main/java/forestry/api/recipes/IFermenterRecipe.java b/src/main/java/forestry/api/recipes/IFermenterRecipe.java
index 7c505d9a7..3ddf16215 100644
--- a/src/main/java/forestry/api/recipes/IFermenterRecipe.java
+++ b/src/main/java/forestry/api/recipes/IFermenterRecipe.java
@@ -10,6 +10,7 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
public interface IFermenterRecipe extends IForestryRecipe {
+
/**
* @return ItemStack representing the input resource.
*/
@@ -21,13 +22,13 @@ public interface IFermenterRecipe extends IForestryRecipe {
FluidStack getFluidResource();
/**
- * @return Value of the given resource, i.e. how much needs to be fermented for the output to be deposited into the product tank.
+ * @return Value of the given resource, i.e. how much needs to be fermented for the output to be deposited into the
+ * product tank.
*/
int getFermentationValue();
/**
- * @return Modifies the amount of liquid output per work cycle.
- * (water = 1.0f, honey = 1.5f)
+ * @return Modifies the amount of liquid output per work cycle. (water = 1.0f, honey = 1.5f)
*/
float getModifier();
diff --git a/src/main/java/forestry/api/recipes/IForestryRecipe.java b/src/main/java/forestry/api/recipes/IForestryRecipe.java
index af358ed25..7153ffa0b 100644
--- a/src/main/java/forestry/api/recipes/IForestryRecipe.java
+++ b/src/main/java/forestry/api/recipes/IForestryRecipe.java
@@ -5,4 +5,5 @@
******************************************************************************/
package forestry.api.recipes;
-public interface IForestryRecipe {}
+public interface IForestryRecipe {
+}
diff --git a/src/main/java/forestry/api/recipes/IMoistenerManager.java b/src/main/java/forestry/api/recipes/IMoistenerManager.java
index ca98314fa..e13620ed4 100644
--- a/src/main/java/forestry/api/recipes/IMoistenerManager.java
+++ b/src/main/java/forestry/api/recipes/IMoistenerManager.java
@@ -10,8 +10,8 @@ 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.
+ * 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}
*
@@ -22,12 +22,10 @@ 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.
*/
public 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 c3385d6b9..0febbf9aa 100644
--- a/src/main/java/forestry/api/recipes/IMoistenerRecipe.java
+++ b/src/main/java/forestry/api/recipes/IMoistenerRecipe.java
@@ -8,8 +8,11 @@ package forestry.api.recipes;
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.
+ * 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 cccb865d8..9b20a07cd 100644
--- a/src/main/java/forestry/api/recipes/ISqueezerManager.java
+++ b/src/main/java/forestry/api/recipes/ISqueezerManager.java
@@ -6,14 +6,15 @@
package forestry.api.recipes;
import javax.annotation.Nullable;
+
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
/**
* Provides an interface to the recipe manager of the suqeezer.
*
- * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
- * if your mod loads before Forestry.
+ * 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}
*
@@ -25,10 +26,11 @@ public interface ISqueezerManager extends ICraftingProvider {
* Add a recipe to the squeezer.
*
* @param timePerItem Number of work cycles required to squeeze one set of resources.
- * @param resources Array of item stacks representing the required resources for one process. Stack size will be taken into account.
- * @param liquid {@link FluidStack} representing the output of this recipe.
- * @param remnants Item stack representing the possible remnants from this recipe.
- * @param chance Chance remnants will be produced by a single recipe cycle, 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.
+ * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 100.
*/
public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid, ItemStack remnants, int chance);
@@ -36,19 +38,20 @@ 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.
*/
public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid);
/**
- * 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.
+ * 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.
- * @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.
+ * @param chance Chance remnants will be produced by a single recipe cycle, from 0 to 1.
*/
void addContainerRecipe(int timePerItem, ItemStack emptyContainer, @Nullable 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 23600f706..a6847bef0 100644
--- a/src/main/java/forestry/api/recipes/ISqueezerRecipe.java
+++ b/src/main/java/forestry/api/recipes/ISqueezerRecipe.java
@@ -11,7 +11,8 @@ import net.minecraftforge.fluids.FluidStack;
public interface ISqueezerRecipe extends IForestryRecipe {
/**
- * @return Array of item stacks representing the required resources for one process. Stack size will be taken into account.
+ * @return Array of item stacks representing the required resources for one process. Stack size will be taken into
+ * account.
*/
ItemStack[] getResources();
diff --git a/src/main/java/forestry/api/recipes/IStillManager.java b/src/main/java/forestry/api/recipes/IStillManager.java
index c634ce5a8..98224d709 100644
--- a/src/main/java/forestry/api/recipes/IStillManager.java
+++ b/src/main/java/forestry/api/recipes/IStillManager.java
@@ -10,8 +10,8 @@ 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.
+ * 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}
*
@@ -20,15 +20,13 @@ import net.minecraftforge.fluids.FluidStack;
* @author SirSengir
*/
public interface IStillManager extends ICraftingProvider {
+
/**
* Add a recipe to the still
*
- * @param cyclesPerUnit
- * Amount of work cycles required to run through the conversion once.
- * @param input
- * 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
*/
public void addRecipe(int cyclesPerUnit, FluidStack input, FluidStack output);
}
diff --git a/src/main/java/forestry/api/recipes/IStillRecipe.java b/src/main/java/forestry/api/recipes/IStillRecipe.java
index 35bcbe9c8..be0210b32 100644
--- a/src/main/java/forestry/api/recipes/IStillRecipe.java
+++ b/src/main/java/forestry/api/recipes/IStillRecipe.java
@@ -8,6 +8,7 @@ package forestry.api.recipes;
import net.minecraftforge.fluids.FluidStack;
public interface IStillRecipe extends IForestryRecipe {
+
/**
* @return Amount of work cycles required to run through the conversion once.
*/
diff --git a/src/main/java/forestry/api/recipes/IVariableFermentable.java b/src/main/java/forestry/api/recipes/IVariableFermentable.java
index 0469d0427..fa442ca2b 100644
--- a/src/main/java/forestry/api/recipes/IVariableFermentable.java
+++ b/src/main/java/forestry/api/recipes/IVariableFermentable.java
@@ -8,8 +8,8 @@ package forestry.api.recipes;
import net.minecraft.item.ItemStack;
/**
- * Fermenter checks any valid fermentation item for an implementation of this interface.
- * This does not supersede adding a proper recipe to the fermenter!
+ * Fermenter checks any valid fermentation item for an implementation of this interface. This does not supersede adding
+ * a proper recipe to the fermenter!
*/
public interface IVariableFermentable {
diff --git a/src/main/java/forestry/api/storage/BackpackEvent.java b/src/main/java/forestry/api/storage/BackpackEvent.java
index 39d30c3a5..081725dba 100644
--- a/src/main/java/forestry/api/storage/BackpackEvent.java
+++ b/src/main/java/forestry/api/storage/BackpackEvent.java
@@ -5,10 +5,11 @@
******************************************************************************/
package forestry.api.storage;
-import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
+import cpw.mods.fml.common.eventhandler.Event;
+
public abstract class BackpackEvent extends Event {
public final EntityPlayer player;
diff --git a/src/main/java/forestry/api/storage/BackpackManager.java b/src/main/java/forestry/api/storage/BackpackManager.java
index 54086b858..6902f6334 100644
--- a/src/main/java/forestry/api/storage/BackpackManager.java
+++ b/src/main/java/forestry/api/storage/BackpackManager.java
@@ -7,11 +7,14 @@ package forestry.api.storage;
import java.util.ArrayList;
import java.util.HashMap;
+
import net.minecraft.item.ItemStack;
public class BackpackManager {
+
/**
- * 0 - Miner's Backpack 1 - Digger's Backpack 2 - Forester's Backpack 3 - Hunter's Backpack 4 - Adventurer's Backpack
+ * 0 - Miner's Backpack 1 - Digger's Backpack 2 - Forester's Backpack 3 - Hunter's Backpack 4 - Adventurer's
+ * Backpack
*
* Use IMC messages to achieve the same effect!
*/
diff --git a/src/main/java/forestry/api/storage/BackpackResupplyEvent.java b/src/main/java/forestry/api/storage/BackpackResupplyEvent.java
index 95e506374..73900d291 100644
--- a/src/main/java/forestry/api/storage/BackpackResupplyEvent.java
+++ b/src/main/java/forestry/api/storage/BackpackResupplyEvent.java
@@ -5,19 +5,20 @@
******************************************************************************/
package forestry.api.storage;
-import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
+import cpw.mods.fml.common.eventhandler.Cancelable;
+
/**
- * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to resupply to a player inventory. Processing will stop
- * if the event is canceled.
+ * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to resupply to
+ * a player inventory. Processing will stop if the event is canceled.
*/
@Cancelable
public class BackpackResupplyEvent extends BackpackEvent {
- public BackpackResupplyEvent(
- EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory) {
+ public BackpackResupplyEvent(EntityPlayer player, IBackpackDefinition backpackDefinition,
+ IInventory backpackInventory) {
super(player, backpackDefinition, backpackInventory);
}
}
diff --git a/src/main/java/forestry/api/storage/BackpackStowEvent.java b/src/main/java/forestry/api/storage/BackpackStowEvent.java
index 24bfa1b00..6bf9fc4e4 100644
--- a/src/main/java/forestry/api/storage/BackpackStowEvent.java
+++ b/src/main/java/forestry/api/storage/BackpackStowEvent.java
@@ -5,24 +5,22 @@
******************************************************************************/
package forestry.api.storage;
-import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+import cpw.mods.fml.common.eventhandler.Cancelable;
+
/**
- * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to store an item. Processing will stop if the stacksize
- * of stackToStow drops to 0 or less or the event is canceled.
+ * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to store an
+ * item. Processing will stop if the stacksize of stackToStow drops to 0 or less or the event is canceled.
*/
@Cancelable
public class BackpackStowEvent extends BackpackEvent {
public final ItemStack stackToStow;
- public BackpackStowEvent(
- EntityPlayer player,
- IBackpackDefinition backpackDefinition,
- IInventory backpackInventory,
+ public BackpackStowEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory,
ItemStack stackToStow) {
super(player, backpackDefinition, backpackInventory);
this.stackToStow = stackToStow;
diff --git a/src/main/java/forestry/api/storage/IBackpackDefinition.java b/src/main/java/forestry/api/storage/IBackpackDefinition.java
index fa0085ee5..33241e8a9 100644
--- a/src/main/java/forestry/api/storage/IBackpackDefinition.java
+++ b/src/main/java/forestry/api/storage/IBackpackDefinition.java
@@ -6,6 +6,7 @@
package forestry.api.storage;
import java.util.List;
+
import net.minecraft.item.ItemStack;
public interface IBackpackDefinition {
diff --git a/src/main/java/forestry/api/storage/IBackpackInterface.java b/src/main/java/forestry/api/storage/IBackpackInterface.java
index e64b0641f..b54a24d20 100644
--- a/src/main/java/forestry/api/storage/IBackpackInterface.java
+++ b/src/main/java/forestry/api/storage/IBackpackInterface.java
@@ -12,10 +12,8 @@ public interface IBackpackInterface {
/**
* Adds a backpack with the given definition and type, returning the item.
*
- * @param definition
- * Definition of backpack behaviour.
- * @param type
- * Type of backpack. (T1 or T2 (= Woven)
+ * @param definition Definition of backpack behaviour.
+ * @param type Type of backpack. (T1 or T2 (= Woven)
* @return Created backpack item.
*/
Item addBackpack(IBackpackDefinition definition, EnumBackpackType type);
diff --git a/src/main/java/forestry/api/storage/ICrateRegistry.java b/src/main/java/forestry/api/storage/ICrateRegistry.java
index 7c4a0dcf8..1f4859326 100644
--- a/src/main/java/forestry/api/storage/ICrateRegistry.java
+++ b/src/main/java/forestry/api/storage/ICrateRegistry.java
@@ -12,9 +12,8 @@ import net.minecraft.item.ItemStack;
public interface ICrateRegistry {
/**
- * Makes a new crate, registers it with the game registry with uid,
- * and creates crating and uncrating recipes for the Carpenter.
- * The icon is rendered automatically from the contained item.
+ * Makes a new crate, registers it with the game registry with uid, and creates crating and uncrating recipes for
+ * the Carpenter. The icon is rendered automatically from the contained item.
*
* Can only be called during the Init stage.
*/
diff --git a/src/main/java/forestry/api/world/ITreeGenData.java b/src/main/java/forestry/api/world/ITreeGenData.java
index f42c013f2..394e846ea 100644
--- a/src/main/java/forestry/api/world/ITreeGenData.java
+++ b/src/main/java/forestry/api/world/ITreeGenData.java
@@ -5,11 +5,12 @@
******************************************************************************/
package forestry.api.world;
-import com.mojang.authlib.GameProfile;
-import forestry.api.arboriculture.ITreeGenome;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import com.mojang.authlib.GameProfile;
+import forestry.api.arboriculture.ITreeGenome;
+
public interface ITreeGenData {
int getGirth(World world, int x, int y, int z);
diff --git a/src/main/java/forestry/api/world/IWorldGenInterface.java b/src/main/java/forestry/api/world/IWorldGenInterface.java
index 636895fa2..bec90a25f 100644
--- a/src/main/java/forestry/api/world/IWorldGenInterface.java
+++ b/src/main/java/forestry/api/world/IWorldGenInterface.java
@@ -18,8 +18,8 @@ public interface IWorldGenInterface {
*
* Returned generator classes take an {@link ITreeGenData} in the constructor.
*
- * @param ident
- * Unique identifier for tree type. Forestry's convention is 'treeSpecies', i.e. 'treeBaobab', 'treeSequoia'.
+ * @param ident Unique identifier for tree type. Forestry's convention is 'treeSpecies', i.e. 'treeBaobab',
+ * 'treeSequoia'.
* @return All generators matching the given ident.
*/
Class extends WorldGenerator>[] getTreeGenerators(String ident);
diff --git a/src/main/java/forestry/api/world/WorldGenManager.java b/src/main/java/forestry/api/world/WorldGenManager.java
index 927539a01..23bb6842b 100644
--- a/src/main/java/forestry/api/world/WorldGenManager.java
+++ b/src/main/java/forestry/api/world/WorldGenManager.java
@@ -10,5 +10,6 @@ package forestry.api.world;
*/
@Deprecated
public class WorldGenManager {
+
public static IWorldGenInterface worldgenInterface;
}
diff --git a/src/main/java/forestry/apiculture/AlvearyBeeModifier.java b/src/main/java/forestry/apiculture/AlvearyBeeModifier.java
index 7cfc14e29..d1a91c7b5 100644
--- a/src/main/java/forestry/apiculture/AlvearyBeeModifier.java
+++ b/src/main/java/forestry/apiculture/AlvearyBeeModifier.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
@@ -14,6 +12,7 @@ import forestry.api.apiculture.DefaultBeeModifier;
import forestry.api.apiculture.IBeeGenome;
public class AlvearyBeeModifier extends DefaultBeeModifier {
+
@Override
public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
return 2.0f;
diff --git a/src/main/java/forestry/apiculture/ApiaryBeeListener.java b/src/main/java/forestry/apiculture/ApiaryBeeListener.java
index 6df2f2247..9dfdfe363 100644
--- a/src/main/java/forestry/apiculture/ApiaryBeeListener.java
+++ b/src/main/java/forestry/apiculture/ApiaryBeeListener.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
@@ -14,6 +12,7 @@ import forestry.api.apiculture.DefaultBeeListener;
import forestry.apiculture.inventory.IApiaryInventory;
public class ApiaryBeeListener extends DefaultBeeListener {
+
private final IApiary apiary;
public ApiaryBeeListener(IApiary apiary) {
diff --git a/src/main/java/forestry/apiculture/ApiaryBeeModifier.java b/src/main/java/forestry/apiculture/ApiaryBeeModifier.java
index 37acca238..4b516bb17 100644
--- a/src/main/java/forestry/apiculture/ApiaryBeeModifier.java
+++ b/src/main/java/forestry/apiculture/ApiaryBeeModifier.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
@@ -14,6 +12,7 @@ import forestry.api.apiculture.DefaultBeeModifier;
import forestry.api.apiculture.IBeeGenome;
public class ApiaryBeeModifier extends DefaultBeeModifier {
+
@Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
return 0.1f;
diff --git a/src/main/java/forestry/apiculture/ArmorApiaristHelper.java b/src/main/java/forestry/apiculture/ArmorApiaristHelper.java
index f26e5d91c..ba3fca33a 100644
--- a/src/main/java/forestry/apiculture/ArmorApiaristHelper.java
+++ b/src/main/java/forestry/apiculture/ArmorApiaristHelper.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
-import forestry.api.apiculture.IArmorApiarist;
-import forestry.api.apiculture.IArmorApiaristHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import forestry.api.apiculture.IArmorApiarist;
+import forestry.api.apiculture.IArmorApiaristHelper;
+
public class ArmorApiaristHelper implements IArmorApiaristHelper {
@Override
diff --git a/src/main/java/forestry/apiculture/BeeHousingListener.java b/src/main/java/forestry/apiculture/BeeHousingListener.java
index 343cba868..41e700f5f 100644
--- a/src/main/java/forestry/apiculture/BeeHousingListener.java
+++ b/src/main/java/forestry/apiculture/BeeHousingListener.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
@@ -15,6 +13,7 @@ import forestry.api.apiculture.IBeeListener;
import forestry.api.genetics.IIndividual;
public class BeeHousingListener implements IBeeListener {
+
private final IBeeHousing beeHousing;
public BeeHousingListener(IBeeHousing beeHousing) {
diff --git a/src/main/java/forestry/apiculture/BeeHousingModifier.java b/src/main/java/forestry/apiculture/BeeHousingModifier.java
index 628c8b445..aaeb5b3be 100644
--- a/src/main/java/forestry/apiculture/BeeHousingModifier.java
+++ b/src/main/java/forestry/apiculture/BeeHousingModifier.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
@@ -15,6 +13,7 @@ import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeeModifier;
public class BeeHousingModifier implements IBeeModifier {
+
private final IBeeHousing beeHousing;
public BeeHousingModifier(IBeeHousing beeHousing) {
diff --git a/src/main/java/forestry/apiculture/BeehouseBeeModifier.java b/src/main/java/forestry/apiculture/BeehouseBeeModifier.java
index 37fda3ccc..f4db9bd7a 100644
--- a/src/main/java/forestry/apiculture/BeehouseBeeModifier.java
+++ b/src/main/java/forestry/apiculture/BeehouseBeeModifier.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
@@ -14,6 +12,7 @@ import forestry.api.apiculture.DefaultBeeModifier;
import forestry.api.apiculture.IBeeGenome;
public class BeehouseBeeModifier extends DefaultBeeModifier {
+
@Override
public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
return 1.0f;
diff --git a/src/main/java/forestry/apiculture/BeekeepingLogic.java b/src/main/java/forestry/apiculture/BeekeepingLogic.java
index 7de89fd91..21f0a5acf 100755
--- a/src/main/java/forestry/apiculture/BeekeepingLogic.java
+++ b/src/main/java/forestry/apiculture/BeekeepingLogic.java
@@ -1,15 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+import java.util.Stack;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IApiaristTracker;
@@ -33,19 +46,6 @@ import forestry.core.network.IStreamable;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
import forestry.plugins.PluginApiculture;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-import java.util.Stack;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
@@ -335,9 +335,7 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
beeInventory.setQueen(queenStack);
// Register the new queen with the breeding tracker
- BeeManager.beeRoot
- .getBreedingTracker(housing.getWorld(), housing.getOwner())
- .registerQueen(princess);
+ BeeManager.beeRoot.getBreedingTracker(housing.getWorld(), housing.getOwner()).registerQueen(princess);
// Remove drone
beeInventory.getDrone().stackSize--;
@@ -473,6 +471,7 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
}
private static class QueenCanWorkCache {
+
private static final int ticksPerCheckQueenCanWork = 10;
private Set queenCanWorkCached = Collections.emptySet();
@@ -491,6 +490,7 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
}
private static class PollenHandler {
+
private static final int MAX_POLLINATION_ATTEMPTS = 20;
private IIndividual pollen;
diff --git a/src/main/java/forestry/apiculture/FakeBeekeepingLogic.java b/src/main/java/forestry/apiculture/FakeBeekeepingLogic.java
index 807777824..079a6510e 100644
--- a/src/main/java/forestry/apiculture/FakeBeekeepingLogic.java
+++ b/src/main/java/forestry/apiculture/FakeBeekeepingLogic.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
-import forestry.api.apiculture.IBeekeepingLogic;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
+import forestry.api.apiculture.IBeekeepingLogic;
+
public class FakeBeekeepingLogic implements IBeekeepingLogic {
+
public static final FakeBeekeepingLogic instance = new FakeBeekeepingLogic();
private FakeBeekeepingLogic() {}
diff --git a/src/main/java/forestry/apiculture/HasFlowersCache.java b/src/main/java/forestry/apiculture/HasFlowersCache.java
index 8f621f1f1..3ce2bf448 100644
--- a/src/main/java/forestry/apiculture/HasFlowersCache.java
+++ b/src/main/java/forestry/apiculture/HasFlowersCache.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
+import java.util.Random;
+
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.FlowerManager;
import forestry.api.apiculture.IBee;
@@ -19,12 +23,9 @@ import forestry.api.core.INBTTagable;
import forestry.api.genetics.IFlowerProvider;
import forestry.core.utils.vect.Vect;
import forestry.plugins.PluginApiculture;
-import java.util.Random;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
public class HasFlowersCache implements INBTTagable {
+
private static final String nbtKey = "hasFlowerCache";
private static final Random random = new Random();
private static final int flowerCheckInterval = 128;
@@ -74,13 +75,12 @@ public class HasFlowersCache implements INBTTagable {
if (!isFlowerCoordInRange(flowerCoords, min, max)) {
return false;
}
- return FlowerManager.flowerRegistry.isAcceptedFlower(
- flowerType, world, flowerCoords.posX, flowerCoords.posY, flowerCoords.posZ);
+ return FlowerManager.flowerRegistry
+ .isAcceptedFlower(flowerType, world, flowerCoords.posX, flowerCoords.posY, flowerCoords.posZ);
}
private static boolean isFlowerCoordInRange(ChunkCoordinates flowerCoords, Vect min, Vect max) {
- return flowerCoords.posX >= min.x
- && flowerCoords.posX <= max.x
+ return flowerCoords.posX >= min.x && flowerCoords.posX <= max.x
&& flowerCoords.posY >= min.y
&& flowerCoords.posY <= max.y
&& flowerCoords.posZ >= min.z
diff --git a/src/main/java/forestry/apiculture/IApiary.java b/src/main/java/forestry/apiculture/IApiary.java
index f55eeed9e..a089fd242 100644
--- a/src/main/java/forestry/apiculture/IApiary.java
+++ b/src/main/java/forestry/apiculture/IApiary.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
@@ -14,5 +12,6 @@ import forestry.api.apiculture.IBeeHousing;
import forestry.apiculture.inventory.IApiaryInventory;
public interface IApiary extends IBeeHousing {
+
IApiaryInventory getApiaryInventory();
}
diff --git a/src/main/java/forestry/apiculture/InventoryBeeHousing.java b/src/main/java/forestry/apiculture/InventoryBeeHousing.java
index 24401f399..ddaff98a3 100644
--- a/src/main/java/forestry/apiculture/InventoryBeeHousing.java
+++ b/src/main/java/forestry/apiculture/InventoryBeeHousing.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IBeeHousingInventory;
@@ -17,9 +17,9 @@ import forestry.core.access.IAccessHandler;
import forestry.core.inventory.InventoryAdapterRestricted;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.SlotUtil;
-import net.minecraft.item.ItemStack;
public class InventoryBeeHousing extends InventoryAdapterRestricted implements IBeeHousingInventory {
+
public static final int SLOT_QUEEN = 0;
public static final int SLOT_DRONE = 1;
public static final int SLOT_PRODUCT_1 = 2;
diff --git a/src/main/java/forestry/apiculture/MaterialBeehive.java b/src/main/java/forestry/apiculture/MaterialBeehive.java
index 50bf7e9d9..608c9566a 100755
--- a/src/main/java/forestry/apiculture/MaterialBeehive.java
+++ b/src/main/java/forestry/apiculture/MaterialBeehive.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
diff --git a/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java b/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java
index 16baaa84c..4b1b0a73d 100755
--- a/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java
+++ b/src/main/java/forestry/apiculture/SaveEventHandlerApiculture.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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/VillageHandlerApiculture.java b/src/main/java/forestry/apiculture/VillageHandlerApiculture.java
index 29931bb85..ce55d2a72 100755
--- a/src/main/java/forestry/apiculture/VillageHandlerApiculture.java
+++ b/src/main/java/forestry/apiculture/VillageHandlerApiculture.java
@@ -1,25 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture;
-import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler;
-import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler;
-import forestry.api.apiculture.EnumBeeType;
-import forestry.apiculture.blocks.BlockApicultureType;
-import forestry.apiculture.genetics.BeeDefinition;
-import forestry.apiculture.worldgen.ComponentVillageBeeHouse;
-import forestry.core.utils.Log;
-import forestry.plugins.PluginApiculture;
import java.util.List;
import java.util.Random;
+
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@@ -31,6 +22,15 @@ import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraft.world.gen.structure.StructureVillagePieces;
import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler;
+import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler;
+import forestry.api.apiculture.EnumBeeType;
+import forestry.apiculture.blocks.BlockApicultureType;
+import forestry.apiculture.genetics.BeeDefinition;
+import forestry.apiculture.worldgen.ComponentVillageBeeHouse;
+import forestry.core.utils.Log;
+import forestry.plugins.PluginApiculture;
+
public class VillageHandlerApiculture implements IVillageCreationHandler, IVillageTradeHandler {
public static void registerVillageComponents() {
@@ -44,8 +44,10 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
@SuppressWarnings("unchecked")
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) {
- ItemStack wildcardPrincess =
- new ItemStack(PluginApiculture.items.beePrincessGE, 1, OreDictionary.WILDCARD_VALUE);
+ ItemStack wildcardPrincess = new ItemStack(
+ PluginApiculture.items.beePrincessGE,
+ 1,
+ OreDictionary.WILDCARD_VALUE);
ItemStack wildcardDrone = new ItemStack(PluginApiculture.items.beeDroneGE, 4, OreDictionary.WILDCARD_VALUE);
recipeList.add(new MerchantRecipe(wildcardPrincess, new ItemStack(Items.emerald, 1)));
@@ -82,7 +84,9 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
@Override
public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int size) {
return new StructureVillagePieces.PieceWeight(
- ComponentVillageBeeHouse.class, 15, MathHelper.getRandomIntegerInRange(random, size, 1 + size));
+ ComponentVillageBeeHouse.class,
+ 15,
+ MathHelper.getRandomIntegerInRange(random, size, 1 + size));
}
@Override
@@ -92,15 +96,8 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
@SuppressWarnings("rawtypes")
@Override
- public Object buildComponent(
- StructureVillagePieces.PieceWeight villagePiece,
- StructureVillagePieces.Start startPiece,
- List pieces,
- Random random,
- int p1,
- int p2,
- int p3,
- int p4,
+ public Object buildComponent(StructureVillagePieces.PieceWeight villagePiece,
+ StructureVillagePieces.Start startPiece, List pieces, Random random, int p1, int p2, int p3, int p4,
int p5) {
return ComponentVillageBeeHouse.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5);
}
diff --git a/src/main/java/forestry/apiculture/blocks/BlockAlveary.java b/src/main/java/forestry/apiculture/blocks/BlockAlveary.java
index 6c2515da5..09b743f93 100644
--- a/src/main/java/forestry/apiculture/blocks/BlockAlveary.java
+++ b/src/main/java/forestry/apiculture/blocks/BlockAlveary.java
@@ -1,15 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.blocks;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
@@ -24,20 +35,11 @@ import forestry.apiculture.multiblock.TileAlvearyStabiliser;
import forestry.apiculture.multiblock.TileAlvearySwarmer;
import forestry.core.blocks.BlockStructure;
import forestry.core.render.TextureManager;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
public class BlockAlveary extends BlockStructure {
+
public enum Type {
+
PLAIN,
ENTRANCE,
SWARMER,
@@ -57,7 +59,7 @@ public class BlockAlveary extends BlockStructure {
setHarvestLevel("axe", 0);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
@@ -166,11 +168,9 @@ public class BlockAlveary extends BlockStructure {
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int side, int metadata) {
- if ((metadata <= 1
- || metadata == Type.SIEVE.ordinal()
- || metadata == Type.SWARMER.ordinal()
- || metadata == Type.STABILIZER.ordinal())
- && (side == 1 || side == 0)) {
+ if ((metadata <= 1 || metadata == Type.SIEVE.ordinal()
+ || metadata == Type.SWARMER.ordinal()
+ || metadata == Type.STABILIZER.ordinal()) && (side == 1 || side == 0)) {
return icons[BOTTOM];
}
diff --git a/src/main/java/forestry/apiculture/blocks/BlockApiculture.java b/src/main/java/forestry/apiculture/blocks/BlockApiculture.java
index b243e97a6..6857da673 100644
--- a/src/main/java/forestry/apiculture/blocks/BlockApiculture.java
+++ b/src/main/java/forestry/apiculture/blocks/BlockApiculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.blocks;
@@ -14,6 +12,7 @@ import forestry.api.core.Tabs;
import forestry.core.blocks.BlockBase;
public class BlockApiculture extends BlockBase {
+
public BlockApiculture() {
super();
setCreativeTab(Tabs.tabApiculture);
diff --git a/src/main/java/forestry/apiculture/blocks/BlockApicultureType.java b/src/main/java/forestry/apiculture/blocks/BlockApicultureType.java
index 8311659e4..f9d54f6c3 100644
--- a/src/main/java/forestry/apiculture/blocks/BlockApicultureType.java
+++ b/src/main/java/forestry/apiculture/blocks/BlockApicultureType.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.blocks;
+import java.util.Locale;
+
+import org.apache.commons.lang3.text.WordUtils;
+
import forestry.apiculture.tiles.TileApiaristChest;
import forestry.apiculture.tiles.TileApiary;
import forestry.apiculture.tiles.TileBeehouse;
import forestry.core.blocks.IMachineProperties;
import forestry.core.tiles.TileForestry;
-import java.util.Locale;
-import org.apache.commons.lang3.text.WordUtils;
public enum BlockApicultureType implements IMachineProperties {
+
APIARY(TileApiary.class),
APIARIST_CHEST_LEGACY(TileApiaristChest.class, "ApiaristChest"),
BEEHOUSE(TileBeehouse.class);
diff --git a/src/main/java/forestry/apiculture/blocks/BlockBeehives.java b/src/main/java/forestry/apiculture/blocks/BlockBeehives.java
index 4c9166daa..a3ce19911 100644
--- a/src/main/java/forestry/apiculture/blocks/BlockBeehives.java
+++ b/src/main/java/forestry/apiculture/blocks/BlockBeehives.java
@@ -1,15 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.blocks;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import net.minecraft.block.BlockContainer;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.IHiveDrop;
@@ -22,22 +36,9 @@ import forestry.core.render.TextureManager;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginApiculture;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
public class BlockBeehives extends BlockContainer {
+
public enum Type {
LEGACY,
FOREST,
@@ -163,7 +164,7 @@ public class BlockBeehives extends BlockContainer {
return null;
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
itemList.add(new ItemStack(this, 1, 1));
diff --git a/src/main/java/forestry/apiculture/blocks/BlockCandle.java b/src/main/java/forestry/apiculture/blocks/BlockCandle.java
index dc7d72f5b..9d1e394c3 100644
--- a/src/main/java/forestry/apiculture/blocks/BlockCandle.java
+++ b/src/main/java/forestry/apiculture/blocks/BlockCandle.java
@@ -1,24 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.blocks;
-import com.google.common.collect.ImmutableMap;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.core.Tabs;
-import forestry.apiculture.tiles.TileCandle;
-import forestry.core.proxy.Proxies;
-import forestry.core.render.TextureManager;
-import forestry.core.utils.ItemStackUtil;
-import forestry.core.utils.StringUtil;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Arrays;
@@ -27,6 +16,7 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
+
import net.minecraft.block.BlockTorch;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
@@ -44,6 +34,17 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
+import com.google.common.collect.ImmutableMap;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.core.Tabs;
+import forestry.apiculture.tiles.TileCandle;
+import forestry.core.proxy.Proxies;
+import forestry.core.render.TextureManager;
+import forestry.core.utils.ItemStackUtil;
+import forestry.core.utils.StringUtil;
+
public class BlockCandle extends BlockTorch {
private static final ImmutableMap colours;
@@ -51,27 +52,18 @@ public class BlockCandle extends BlockTorch {
public static final String colourTagName = "colour";
static {
- colours = ImmutableMap.builder()
- .put("dyeWhite", new Color(255, 255, 255).getRGB())
- .put("dyeOrange", new Color(219, 125, 62).getRGB())
- .put("dyeMagenta", new Color(255, 20, 255).getRGB())
+ colours = ImmutableMap.builder().put("dyeWhite", new Color(255, 255, 255).getRGB())
+ .put("dyeOrange", new Color(219, 125, 62).getRGB()).put("dyeMagenta", new Color(255, 20, 255).getRGB())
.put("dyeLightBlue", new Color(107, 138, 201).getRGB())
- .put("dyeYellow", new Color(255, 255, 20).getRGB())
- .put("dyeLime", new Color(20, 255, 20).getRGB())
- .put("dyePink", new Color(208, 132, 153).getRGB())
- .put("dyeGray", new Color(74, 74, 74).getRGB())
- .put("dyeLightGray", new Color(154, 161, 161).getRGB())
- .put("dyeCyan", new Color(20, 255, 255).getRGB())
- .put("dyePurple", new Color(126, 61, 181).getRGB())
- .put("dyeBlue", new Color(20, 20, 255).getRGB())
- .put("dyeBrown", new Color(79, 50, 31).getRGB())
- .put("dyeGreen", new Color(53, 70, 27).getRGB())
- .put("dyeRed", new Color(150, 52, 48).getRGB())
- .put("dyeBlack", new Color(20, 20, 20).getRGB())
- .build();
+ .put("dyeYellow", new Color(255, 255, 20).getRGB()).put("dyeLime", new Color(20, 255, 20).getRGB())
+ .put("dyePink", new Color(208, 132, 153).getRGB()).put("dyeGray", new Color(74, 74, 74).getRGB())
+ .put("dyeLightGray", new Color(154, 161, 161).getRGB()).put("dyeCyan", new Color(20, 255, 255).getRGB())
+ .put("dyePurple", new Color(126, 61, 181).getRGB()).put("dyeBlue", new Color(20, 20, 255).getRGB())
+ .put("dyeBrown", new Color(79, 50, 31).getRGB()).put("dyeGreen", new Color(53, 70, 27).getRGB())
+ .put("dyeRed", new Color(150, 52, 48).getRGB()).put("dyeBlack", new Color(20, 20, 20).getRGB()).build();
- lightingItems =
- new HashSet<>(Arrays.asList(Items.flint_and_steel, Items.flint, Item.getItemFromBlock(Blocks.torch)));
+ lightingItems = new HashSet<>(
+ Arrays.asList(Items.flint_and_steel, Items.flint, Item.getItemFromBlock(Blocks.torch)));
}
@SideOnly(Side.CLIENT)
@@ -147,23 +139,15 @@ public class BlockCandle extends BlockTorch {
return i;
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
itemList.add(new ItemStack(this, 1, 0));
}
@Override
- public boolean onBlockActivated(
- World world,
- int x,
- int y,
- int z,
- EntityPlayer player,
- int facing,
- float facingX,
- float facingY,
- float facingZ) {
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float facingX,
+ float facingY, float facingZ) {
TileEntity tileEntity = world.getTileEntity(x, y, z);
if (!(tileEntity instanceof TileCandle)) {
return false;
@@ -235,8 +219,8 @@ public class BlockCandle extends BlockTorch {
}
/* DROP HANDLING */
- // Hack: When harvesting we need to get the drops in onBlockHarvested,
- // because Mojang destroys the block and tile before calling getDrops.
+ // Hack: When harvesting we need to get the drops in onBlockHarvested,
+ // because Mojang destroys the block and tile before calling getDrops.
private final ThreadLocal drop = new ThreadLocal<>();
@Override
diff --git a/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java b/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java
index a211c606d..ab45bcefb 100644
--- a/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java
+++ b/src/main/java/forestry/apiculture/blocks/BlockRegistryApiculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.blocks;
@@ -17,6 +15,7 @@ import forestry.core.blocks.BlockRegistry;
import forestry.core.items.ItemBlockForestry;
public class BlockRegistryApiculture extends BlockRegistry {
+
public final BlockApiculture apiculture;
public final BlockBase apicultureChest;
public final BlockBeehives beehives;
diff --git a/src/main/java/forestry/apiculture/blocks/BlockStump.java b/src/main/java/forestry/apiculture/blocks/BlockStump.java
index edf10bac9..cf9cee96c 100644
--- a/src/main/java/forestry/apiculture/blocks/BlockStump.java
+++ b/src/main/java/forestry/apiculture/blocks/BlockStump.java
@@ -1,15 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.blocks;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.BlockTorch;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
@@ -19,17 +30,6 @@ import forestry.core.render.TextureManager;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginApiculture;
-import java.util.List;
-import java.util.Random;
-import net.minecraft.block.BlockTorch;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
public class BlockStump extends BlockTorch {
@@ -46,29 +46,19 @@ public class BlockStump extends BlockTorch {
this.blockIcon = TextureManager.registerTex(register, StringUtil.cleanBlockName(this));
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
itemList.add(new ItemStack(this, 1, 0));
}
@Override
- public boolean onBlockActivated(
- World world,
- int x,
- int y,
- int z,
- EntityPlayer player,
- int facing,
- float facingX,
- float facingY,
- float facingZ) {
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float facingX,
+ float facingY, float facingZ) {
ItemStack held = player.getCurrentEquippedItem();
- if (held != null
- && (held.getItem() == Items.flint_and_steel
- || held.getItem() == Items.flint
- || ItemStackUtil.equals(Blocks.torch, held))) {
+ if (held != null && (held.getItem() == Items.flint_and_steel || held.getItem() == Items.flint
+ || ItemStackUtil.equals(Blocks.torch, held))) {
world.setBlock(
x,
y,
diff --git a/src/main/java/forestry/apiculture/commands/BeeModeHelper.java b/src/main/java/forestry/apiculture/commands/BeeModeHelper.java
index c85c05bc8..a1315b502 100644
--- a/src/main/java/forestry/apiculture/commands/BeeModeHelper.java
+++ b/src/main/java/forestry/apiculture/commands/BeeModeHelper.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.commands;
+import java.util.ArrayList;
+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 java.util.ArrayList;
-import java.util.List;
-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 9ffcd1260..0b82b2594 100644
--- a/src/main/java/forestry/apiculture/commands/BeeStatsSaveHelper.java
+++ b/src/main/java/forestry/apiculture/commands/BeeStatsSaveHelper.java
@@ -1,16 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.commands;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import net.minecraft.util.StatCollector;
+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;
@@ -20,10 +25,6 @@ import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IBreedingTracker;
import forestry.core.commands.IStatsSaveHelper;
import forestry.core.utils.StringUtil;
-import java.util.ArrayList;
-import java.util.Collection;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
public class BeeStatsSaveHelper implements IStatsSaveHelper {
@@ -35,8 +36,8 @@ public class BeeStatsSaveHelper implements IStatsSaveHelper {
@Override
public void addExtraInfo(Collection statistics, IBreedingTracker breedingTracker) {
IApiaristTracker tracker = (IApiaristTracker) breedingTracker;
- String discoveredLine =
- StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.discovered") + ":";
+ String discoveredLine = StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.discovered")
+ + ":";
statistics.add(discoveredLine);
statistics.add(StringUtil.line(discoveredLine.length()));
@@ -52,8 +53,7 @@ public class BeeStatsSaveHelper implements IStatsSaveHelper {
@Override
public Collection getSpecies() {
Collection species = new ArrayList<>();
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleBeeSpecies) {
species.add((IAlleleBeeSpecies) allele);
}
diff --git a/src/main/java/forestry/apiculture/commands/CommandBee.java b/src/main/java/forestry/apiculture/commands/CommandBee.java
index 19266346a..8b70a4068 100644
--- a/src/main/java/forestry/apiculture/commands/CommandBee.java
+++ b/src/main/java/forestry/apiculture/commands/CommandBee.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.commands;
diff --git a/src/main/java/forestry/apiculture/commands/CommandBeeGive.java b/src/main/java/forestry/apiculture/commands/CommandBeeGive.java
index 4e6f33ea1..95705aec4 100644
--- a/src/main/java/forestry/apiculture/commands/CommandBeeGive.java
+++ b/src/main/java/forestry/apiculture/commands/CommandBeeGive.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.commands;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IAlleleBeeSpecies;
@@ -21,12 +27,6 @@ import forestry.core.commands.CommandHelpers;
import forestry.core.commands.SpeciesNotFoundException;
import forestry.core.commands.SubCommand;
import forestry.core.commands.TemplateNotFoundException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class CommandBeeGive extends SubCommand {
@@ -118,8 +118,7 @@ public class CommandBeeGive extends SubCommand {
}
if (species == null) {
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleBeeSpecies && allele.getName().equals(speciesName)) {
species = (IAlleleBeeSpecies) allele;
break;
@@ -157,8 +156,7 @@ public class CommandBeeGive extends SubCommand {
private static String[] getSpecies() {
List species = new ArrayList<>();
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleBeeSpecies) {
species.add(allele.getName());
}
@@ -180,6 +178,8 @@ public class CommandBeeGive extends SubCommand {
public void printHelp(ICommandSender sender) {
super.printHelp(sender);
CommandHelpers.sendLocalizedChatMessage(
- sender, "for.chat.command.forestry.beekeeping.give.available", beeTypeHelpString);
+ sender,
+ "for.chat.command.forestry.beekeeping.give.available",
+ beeTypeHelpString);
}
}
diff --git a/src/main/java/forestry/apiculture/entities/AIAvoidPlayers.java b/src/main/java/forestry/apiculture/entities/AIAvoidPlayers.java
index 8f5aa5a20..57811c4bf 100644
--- a/src/main/java/forestry/apiculture/entities/AIAvoidPlayers.java
+++ b/src/main/java/forestry/apiculture/entities/AIAvoidPlayers.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.entities;
@@ -55,7 +53,10 @@ public class AIAvoidPlayers extends EntityAIBase {
}
Vec3 randomTarget = RandomPositionGenerator.findRandomTargetBlockAwayFrom(
- mob, 16, 7, Vec3.createVectorHelper(player.posX, player.posY, player.posZ));
+ mob,
+ 16,
+ 7,
+ Vec3.createVectorHelper(player.posX, player.posY, player.posZ));
if (randomTarget == null) {
return false;
diff --git a/src/main/java/forestry/apiculture/entities/EntityBee.java b/src/main/java/forestry/apiculture/entities/EntityBee.java
index 6001a25f2..cd6e9d1c6 100755
--- a/src/main/java/forestry/apiculture/entities/EntityBee.java
+++ b/src/main/java/forestry/apiculture/entities/EntityBee.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.entities;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.passive.IAnimals;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.BeeManager;
@@ -18,10 +21,6 @@ import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBee;
import forestry.core.config.Constants;
import forestry.core.render.ForestryResource;
-import net.minecraft.entity.EntityCreature;
-import net.minecraft.entity.passive.IAnimals;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
public class EntityBee extends EntityCreature implements IAnimals {
diff --git a/src/main/java/forestry/apiculture/entities/EntityFXBee.java b/src/main/java/forestry/apiculture/entities/EntityFXBee.java
index 52e3ebead..a871bd7f7 100644
--- a/src/main/java/forestry/apiculture/entities/EntityFXBee.java
+++ b/src/main/java/forestry/apiculture/entities/EntityFXBee.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.entities;
@@ -15,6 +13,7 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.World;
public class EntityFXBee extends EntityFX {
+
public EntityFXBee(World world, double x, double y, double z, int color) {
super(world, x, y, z, 0.0D, 0.0D, 0.0D);
@@ -71,11 +70,11 @@ public class EntityFXBee extends EntityFX {
tessellator.setColorRGBA_F(particleRed, particleGreen, particleBlue, 1.0F);
tessellator.addVertexWithUV(f11 - f1 * f10 - f4 * f10, f12 - f2 * f10, f13 - f3 * f10 - f5 * f10, maxU, maxV);
- tessellator.addVertexWithUV(
- (f11 - f1 * f10) + f4 * f10, f12 + f2 * f10, (f13 - f3 * f10) + f5 * f10, maxU, minV);
+ tessellator
+ .addVertexWithUV((f11 - f1 * f10) + f4 * f10, f12 + f2 * f10, (f13 - f3 * f10) + f5 * f10, maxU, minV);
tessellator.addVertexWithUV(f11 + f1 * f10 + f4 * f10, f12 + f2 * f10, f13 + f3 * f10 + f5 * f10, minU, minV);
- tessellator.addVertexWithUV(
- (f11 + f1 * f10) - f4 * f10, f12 - f2 * f10, (f13 + f3 * f10) - f5 * f10, minU, maxV);
+ tessellator
+ .addVertexWithUV((f11 + f1 * f10) - f4 * f10, f12 - f2 * f10, (f13 + f3 * f10) - f5 * f10, minU, maxV);
}
@Override
diff --git a/src/main/java/forestry/apiculture/entities/EntityMinecartApiary.java b/src/main/java/forestry/apiculture/entities/EntityMinecartApiary.java
index 307126f6f..70e91750d 100644
--- a/src/main/java/forestry/apiculture/entities/EntityMinecartApiary.java
+++ b/src/main/java/forestry/apiculture/entities/EntityMinecartApiary.java
@@ -1,15 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.entities;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.IBeeHousingInventory;
import forestry.api.apiculture.IBeeListener;
import forestry.api.apiculture.IBeeModifier;
@@ -25,16 +33,9 @@ import forestry.apiculture.inventory.InventoryApiary;
import forestry.core.config.Config;
import forestry.core.inventory.IInventoryAdapter;
import forestry.plugins.PluginApiculture;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
public class EntityMinecartApiary extends EntityMinecartBeeHousingBase implements IApiary {
+
private static final IBeeModifier beeModifier = new ApiaryBeeModifier();
private final IBeeListener beeListener = new ApiaryBeeListener(this);
private final InventoryApiary inventory = new InventoryApiary(getAccessHandler());
diff --git a/src/main/java/forestry/apiculture/entities/EntityMinecartBeeHousingBase.java b/src/main/java/forestry/apiculture/entities/EntityMinecartBeeHousingBase.java
index c2126b44e..3d20224c4 100644
--- a/src/main/java/forestry/apiculture/entities/EntityMinecartBeeHousingBase.java
+++ b/src/main/java/forestry/apiculture/entities/EntityMinecartBeeHousingBase.java
@@ -1,16 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.entities;
+import java.io.IOException;
+import java.util.Random;
+
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeekeepingLogic;
@@ -28,16 +36,10 @@ import forestry.core.network.IForestryPacketServer;
import forestry.core.network.IStreamableGui;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.IClimatised;
-import java.io.IOException;
-import java.util.Random;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public abstract class EntityMinecartBeeHousingBase extends EntityMinecartContainerForestry
implements IBeeHousing, IGuiBeeHousingInventory, IClimatised, IStreamableGui {
+
private static final Random random = new Random();
private static final int beeFXInterval = 4;
private static final int pollenFXInterval = 50;
diff --git a/src/main/java/forestry/apiculture/entities/EntityMinecartBeehouse.java b/src/main/java/forestry/apiculture/entities/EntityMinecartBeehouse.java
index b935f57df..12d2106d1 100644
--- a/src/main/java/forestry/apiculture/entities/EntityMinecartBeehouse.java
+++ b/src/main/java/forestry/apiculture/entities/EntityMinecartBeehouse.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.entities;
+import java.util.Collections;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.DefaultBeeListener;
import forestry.api.apiculture.IBeeHousingInventory;
import forestry.api.apiculture.IBeeListener;
@@ -22,14 +28,9 @@ import forestry.apiculture.gui.GuiBeeHousing;
import forestry.core.config.Config;
import forestry.core.inventory.IInventoryAdapter;
import forestry.plugins.PluginApiculture;
-import java.util.Collections;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
public class EntityMinecartBeehouse extends EntityMinecartBeeHousingBase {
+
private static final IBeeModifier beeModifier = new BeehouseBeeModifier();
private static final IBeeListener beeListener = new DefaultBeeListener();
private final InventoryBeeHousing beeInventory = new InventoryBeeHousing(9, getAccessHandler());
diff --git a/src/main/java/forestry/apiculture/flowers/Flower.java b/src/main/java/forestry/apiculture/flowers/Flower.java
index a848cf861..78d2478c8 100644
--- a/src/main/java/forestry/apiculture/flowers/Flower.java
+++ b/src/main/java/forestry/apiculture/flowers/Flower.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
-import com.google.common.base.Objects;
-import forestry.api.genetics.IFlower;
import javax.annotation.Nonnull;
+
import net.minecraft.block.Block;
import net.minecraftforge.oredict.OreDictionary;
+import com.google.common.base.Objects;
+import forestry.api.genetics.IFlower;
+
final class Flower implements IFlower {
private final Block block;
@@ -41,8 +41,7 @@ final class Flower implements IFlower {
IFlower flower = (IFlower) obj;
return Block.isEqualTo(this.block, flower.getBlock())
- && (this.meta == OreDictionary.WILDCARD_VALUE
- || flower.getMeta() == OreDictionary.WILDCARD_VALUE
+ && (this.meta == OreDictionary.WILDCARD_VALUE || flower.getMeta() == OreDictionary.WILDCARD_VALUE
|| this.meta == flower.getMeta());
}
@@ -78,10 +77,6 @@ final class Flower implements IFlower {
@Override
public String toString() {
- return Objects.toStringHelper(this)
- .add("block", block)
- .add("meta", meta)
- .add("weight", weight)
- .toString();
+ return Objects.toStringHelper(this).add("block", block).add("meta", meta).add("weight", weight).toString();
}
}
diff --git a/src/main/java/forestry/apiculture/flowers/FlowerProvider.java b/src/main/java/forestry/apiculture/flowers/FlowerProvider.java
index 1d0a333fa..f800ccb7a 100644
--- a/src/main/java/forestry/apiculture/flowers/FlowerProvider.java
+++ b/src/main/java/forestry/apiculture/flowers/FlowerProvider.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
+import java.util.EnumSet;
+import java.util.Set;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.apiculture.FlowerManager;
import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerProvider;
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.IPollinatable;
import forestry.core.utils.StringUtil;
-import java.util.EnumSet;
-import java.util.Set;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraftforge.common.EnumPlantType;
public class FlowerProvider implements IFlowerProvider {
diff --git a/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java b/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java
index 73fca4665..4828cf302 100644
--- a/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java
+++ b/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java
@@ -1,19 +1,39 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeMap;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFlowerPot;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityFlowerPot;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+import net.minecraftforge.common.IPlantable;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
+
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.FlowerManager;
@@ -32,25 +52,6 @@ import forestry.core.utils.Log;
import forestry.core.utils.vect.MutableVect;
import forestry.core.utils.vect.Vect;
import forestry.plugins.PluginManager;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-import java.util.TreeMap;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockFlowerPot;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntityFlowerPot;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import net.minecraftforge.common.IPlantable;
-import net.minecraftforge.oredict.OreDictionary;
public final class FlowerRegistry implements IFlowerRegistry, IFlowerGrowthHelper {
@@ -96,8 +97,10 @@ public final class FlowerRegistry implements IFlowerRegistry, IFlowerGrowthHelpe
public void registerAcceptableFlowerRule(IFlowerAcceptableRule acceptableFlower, String... flowerTypes) {
for (String flowerType : flowerTypes) {
if (defaultFlowerTypes.contains(flowerType)) {
- Log.severe("IFlowerAcceptableRules are too slow to be applied to Forestry's built-in flower type: "
- + flowerType + ".");
+ Log.severe(
+ "IFlowerAcceptableRules are too slow to be applied to Forestry's built-in flower type: "
+ + flowerType
+ + ".");
} else {
registeredRules.put(flowerType, acceptableFlower);
}
@@ -173,7 +176,13 @@ public final class FlowerRegistry implements IFlowerRegistry, IFlowerGrowthHelpe
}
if (isAcceptedFlower(
- flowerType, acceptedBlocks, acceptedFlowers, world, posBlock.x, posBlock.y, posBlock.z)) {
+ flowerType,
+ acceptedBlocks,
+ acceptedFlowers,
+ world,
+ posBlock.x,
+ posBlock.y,
+ posBlock.z)) {
return new ChunkCoordinates(posBlock.x, posBlock.y, posBlock.z);
}
}
@@ -202,14 +211,8 @@ public final class FlowerRegistry implements IFlowerRegistry, IFlowerGrowthHelpe
return isAcceptedFlower(flowerType, acceptedBlocks, acceptedFlowers, world, x, y, z);
}
- private static boolean isAcceptedFlower(
- String flowerType,
- Set acceptedBlocks,
- Set acceptedFlowers,
- World world,
- int x,
- int y,
- int z) {
+ private static boolean isAcceptedFlower(String flowerType, Set acceptedBlocks, Set acceptedFlowers,
+ World world, int x, int y, int z) {
Block block = world.getBlock(x, y, z);
final int meta;
@@ -331,7 +334,8 @@ public final class FlowerRegistry implements IFlowerRegistry, IFlowerGrowthHelpe
registerGrowthRule(new GrowthRuleMycelium(), FlowerManager.FlowerTypeMushrooms);
registerGrowthRule(new GrowthRuleNone(), FlowerManager.FlowerTypeEnd);
registerGrowthRule(
- new GrowthRuleFertilize(Blocks.melon_stem, Blocks.pumpkin_stem), FlowerManager.FlowerTypeGourd);
+ new GrowthRuleFertilize(Blocks.melon_stem, Blocks.pumpkin_stem),
+ FlowerManager.FlowerTypeGourd);
registerGrowthRule(new GrowthRuleFertilize(Blocks.wheat), FlowerManager.FlowerTypeWheat);
}
diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java
index 3d3bb9936..67f62d771 100644
--- a/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java
+++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleDirtGrass.java
@@ -1,36 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+
import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerGrowthHelper;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
import forestry.core.config.Constants;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
public class GrowthRuleDirtGrass implements IFlowerGrowthRule {
@Override
- public boolean growFlower(
- IFlowerRegistry flowerRegistry,
- String flowerType,
- World world,
- IIndividual individual,
- int x,
- int y,
- int z) {
+ public boolean growFlower(IFlowerRegistry flowerRegistry, String flowerType, World world, IIndividual individual,
+ int x, int y, int z) {
if (!world.isAirBlock(x, y, z)) {
return false;
}
diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java
index de6907427..df06b09a0 100644
--- a/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java
+++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleFertilize.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
+import java.util.Arrays;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+
import forestry.api.genetics.IFlowerGrowthHelper;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
-import java.util.Arrays;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
public class GrowthRuleFertilize implements IFlowerGrowthRule {
@@ -28,8 +28,8 @@ public class GrowthRuleFertilize implements IFlowerGrowthRule {
}
@Override
- public boolean growFlower(
- IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
+ public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
+ int z) {
return growFlower(world, x, y, z);
}
diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleFlowerPot.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleFlowerPot.java
index 8113c0687..09aadb05f 100644
--- a/src/main/java/forestry/apiculture/flowers/GrowthRuleFlowerPot.java
+++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleFlowerPot.java
@@ -1,31 +1,30 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
-import forestry.api.apiculture.FlowerManager;
-import forestry.api.genetics.IFlowerGrowthHelper;
-import forestry.api.genetics.IFlowerGrowthRule;
-import forestry.api.genetics.IFlowerRegistry;
-import forestry.api.genetics.IIndividual;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlowerPot;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityFlowerPot;
import net.minecraft.world.World;
+import forestry.api.apiculture.FlowerManager;
+import forestry.api.genetics.IFlowerGrowthHelper;
+import forestry.api.genetics.IFlowerGrowthRule;
+import forestry.api.genetics.IFlowerRegistry;
+import forestry.api.genetics.IIndividual;
+
public class GrowthRuleFlowerPot implements IFlowerGrowthRule {
@Override
- public boolean growFlower(
- IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
+ public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
+ int z) {
return growFlower(flowerType, world, x, y, z);
}
diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java
index 8e5b8b63a..e730599ba 100644
--- a/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java
+++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleMycelium.java
@@ -1,30 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+
import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerGrowthHelper;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
import forestry.core.config.Constants;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
public class GrowthRuleMycelium implements IFlowerGrowthRule {
@Override
- public boolean growFlower(
- IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
+ public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
+ int z) {
if (!world.isAirBlock(x, y, z)) {
return false;
}
diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java
index 5c00d615b..5e672ca41 100644
--- a/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java
+++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleNone.java
@@ -1,26 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
+import net.minecraft.world.World;
+
import forestry.api.genetics.IFlowerGrowthHelper;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
-import net.minecraft.world.World;
public class GrowthRuleNone implements IFlowerGrowthRule {
@Override
- public boolean growFlower(
- IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
+ public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
+ int z) {
return true;
}
diff --git a/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java b/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java
index 847ede867..dc38c27a1 100644
--- a/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java
+++ b/src/main/java/forestry/apiculture/flowers/GrowthRuleSnow.java
@@ -1,30 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.flowers;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+
import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerGrowthHelper;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
import forestry.core.config.Constants;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
public class GrowthRuleSnow implements IFlowerGrowthRule {
@Override
- public boolean growFlower(
- IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
+ public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
+ int z) {
if (world.getBlock(x, y, z) != Blocks.snow) {
return false;
}
diff --git a/src/main/java/forestry/apiculture/genetics/ApiaristTracker.java b/src/main/java/forestry/apiculture/genetics/ApiaristTracker.java
index 6b8e0e602..7590d9d8d 100755
--- a/src/main/java/forestry/apiculture/genetics/ApiaristTracker.java
+++ b/src/main/java/forestry/apiculture/genetics/ApiaristTracker.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.IApiaristTracker;
@@ -17,8 +18,6 @@ import forestry.api.genetics.IBreedingTracker;
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.ISpeciesRoot;
import forestry.core.genetics.BreedingTracker;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
public class ApiaristTracker extends BreedingTracker implements IApiaristTracker {
diff --git a/src/main/java/forestry/apiculture/genetics/Bee.java b/src/main/java/forestry/apiculture/genetics/Bee.java
index 4c4dde63e..d0382b1cc 100644
--- a/src/main/java/forestry/apiculture/genetics/Bee.java
+++ b/src/main/java/forestry/apiculture/genetics/Bee.java
@@ -1,16 +1,31 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+
+import net.minecraft.item.EnumRarity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.apiculture.*;
import forestry.api.core.BiomeHelper;
import forestry.api.core.EnumHumidity;
@@ -38,20 +53,6 @@ import forestry.core.utils.GeneticsUtil;
import forestry.core.utils.Log;
import forestry.core.utils.StringUtil;
import forestry.core.utils.vect.Vect;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public class Bee extends IndividualLiving implements IBee {
@@ -280,8 +281,8 @@ public class Bee extends IndividualLiving implements IBee {
EnumTemperature beeBaseTemperature = species.getTemperature();
EnumTolerance beeToleranceTemperature = genome.getToleranceTemp();
- if (!AlleleManager.climateHelper.isWithinLimits(
- actualTemperature, beeBaseTemperature, beeToleranceTemperature)) {
+ if (!AlleleManager.climateHelper
+ .isWithinLimits(actualTemperature, beeBaseTemperature, beeToleranceTemperature)) {
if (beeBaseTemperature.ordinal() > actualTemperature.ordinal()) {
errorStates.add(EnumErrorCode.TOO_COLD);
} else {
@@ -368,10 +369,9 @@ public class Bee extends IndividualLiving implements IBee {
IAlleleBeeSpecies primary = genome.getPrimary();
IAlleleBeeSpecies secondary = genome.getSecondary();
if (!isPureBred(EnumBeeChromosome.SPECIES)) {
- list.add(EnumChatFormatting.BLUE
- + StringUtil.localize("bees.hybrid")
- .replaceAll("%PRIMARY", primary.getName())
- .replaceAll("%SECONDARY", secondary.getName()));
+ list.add(
+ EnumChatFormatting.BLUE + StringUtil.localize("bees.hybrid")
+ .replaceAll("%PRIMARY", primary.getName()).replaceAll("%SECONDARY", secondary.getName()));
}
if (generation > 0) {
@@ -386,19 +386,18 @@ public class Bee extends IndividualLiving implements IBee {
rarity = EnumRarity.common;
}
- String generationString =
- rarity.rarityColor + StringUtil.localizeAndFormat("gui.beealyzer.generations", generation);
+ String generationString = rarity.rarityColor
+ + StringUtil.localizeAndFormat("gui.beealyzer.generations", generation);
list.add(generationString);
}
IAllele speedAllele = genome.getActiveAllele(EnumBeeChromosome.SPEED);
- IAlleleTolerance tempToleranceAllele =
- (IAlleleTolerance) getGenome().getActiveAllele(EnumBeeChromosome.TEMPERATURE_TOLERANCE);
- IAlleleTolerance humidToleranceAllele =
- (IAlleleTolerance) getGenome().getActiveAllele(EnumBeeChromosome.HUMIDITY_TOLERANCE);
+ IAlleleTolerance tempToleranceAllele = (IAlleleTolerance) getGenome()
+ .getActiveAllele(EnumBeeChromosome.TEMPERATURE_TOLERANCE);
+ IAlleleTolerance humidToleranceAllele = (IAlleleTolerance) getGenome()
+ .getActiveAllele(EnumBeeChromosome.HUMIDITY_TOLERANCE);
- String unlocalizedCustomSpeed =
- "tooltip.worker." + speedAllele.getUnlocalizedName().replaceAll("(.*)\\.", "");
+ String unlocalizedCustomSpeed = "tooltip.worker." + speedAllele.getUnlocalizedName().replaceAll("(.*)\\.", "");
String speed;
if (StringUtil.canTranslate(unlocalizedCustomSpeed)) {
speed = StringUtil.localize(unlocalizedCustomSpeed);
@@ -406,13 +405,15 @@ public class Bee extends IndividualLiving implements IBee {
speed = speedAllele.getName() + ' ' + StringUtil.localize("gui.worker");
}
- String lifespan =
- genome.getActiveAllele(EnumBeeChromosome.LIFESPAN).getName() + ' ' + StringUtil.localize("gui.life");
+ String lifespan = genome.getActiveAllele(EnumBeeChromosome.LIFESPAN).getName() + ' '
+ + StringUtil.localize("gui.life");
String tempTolerance = EnumChatFormatting.GREEN + "T: "
- + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getTemperature()) + " / "
+ + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getTemperature())
+ + " / "
+ tempToleranceAllele.getName();
String humidTolerance = EnumChatFormatting.GREEN + "H: "
- + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getHumidity()) + " / "
+ + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getHumidity())
+ + " / "
+ humidToleranceAllele.getName();
String flowers = genome.getFlowerProvider().getDescription();
String jubilance = null;
@@ -441,8 +442,8 @@ public class Bee extends IndividualLiving implements IBee {
public void age(World world, float housingLifespanModifier) {
IBeekeepingMode mode = BeeManager.beeRoot.getBeekeepingMode(world);
IBeeModifier beeModifier = mode.getBeeModifier();
- float finalModifier =
- housingLifespanModifier * beeModifier.getLifespanModifier(genome, mate, housingLifespanModifier);
+ float finalModifier = housingLifespanModifier
+ * beeModifier.getLifespanModifier(genome, mate, housingLifespanModifier);
super.age(world, finalModifier);
}
@@ -530,8 +531,7 @@ public class Bee extends IndividualLiving implements IBee {
// / Specialty products
if (primary.isJubilant(genome, housing) && secondary.isJubilant(genome, housing)) {
- for (Map.Entry entry :
- primary.getSpecialtyChances().entrySet()) {
+ for (Map.Entry entry : primary.getSpecialtyChances().entrySet()) {
if (housing.getWorld().rand.nextFloat() < getFinalChance(entry.getValue(), speed, prodModifier, 1f)) {
products.add(entry.getKey().copy());
}
@@ -540,22 +540,20 @@ public class Bee extends IndividualLiving implements IBee {
ItemStack[] productsArray = products.toArray(new ItemStack[products.size()]);
ChunkCoordinates housingCoordinates = housing.getCoordinates();
- return genome.getFlowerProvider()
- .affectProducts(
- housing.getWorld(),
- this,
- housingCoordinates.posX,
- housingCoordinates.posY,
- housingCoordinates.posZ,
- productsArray);
+ return genome.getFlowerProvider().affectProducts(
+ housing.getWorld(),
+ this,
+ housingCoordinates.posX,
+ housingCoordinates.posY,
+ housingCoordinates.posZ,
+ productsArray);
}
public static float getFinalChance(float chance, float beeSpeed, float productionModifier, float t) {
chance *= 100f;
return (float) (((1f + t / 6f) * Math.sqrt(chance) * 2f * (1f + beeSpeed)
- + Math.pow(productionModifier, Math.cbrt(chance))
- - 3f)
- / 100f);
+ + Math.pow(productionModifier, Math.cbrt(chance))
+ - 3f) / 100f);
}
/* REPRODUCTION */
@@ -588,10 +586,12 @@ public class Bee extends IndividualLiving implements IBee {
List bees = new ArrayList<>();
ChunkCoordinates housingCoordinates = housing.getCoordinates();
- int toCreate = BeeManager.beeRoot
- .getBeekeepingMode(world)
- .getFinalFertility(
- this, world, housingCoordinates.posX, housingCoordinates.posY, housingCoordinates.posZ);
+ int toCreate = BeeManager.beeRoot.getBeekeepingMode(world).getFinalFertility(
+ this,
+ world,
+ housingCoordinates.posX,
+ housingCoordinates.posY,
+ housingCoordinates.posZ);
if (toCreate <= 0) {
toCreate = 1;
@@ -764,8 +764,8 @@ public class Bee extends IndividualLiving implements IBee {
Vect randomPos = Vect.getRandomPositionInArea(random, area);
Vect posBlock = Vect.add(housingPos, randomPos, offset);
- ICheckPollinatable checkPollinatable =
- GeneticsUtil.getCheckPollinatable(world, posBlock.x, posBlock.y, posBlock.z);
+ ICheckPollinatable checkPollinatable = GeneticsUtil
+ .getCheckPollinatable(world, posBlock.x, posBlock.y, posBlock.z);
if (checkPollinatable == null) {
continue;
}
@@ -777,8 +777,8 @@ public class Bee extends IndividualLiving implements IBee {
continue;
}
- IPollinatable realPollinatable =
- GeneticsUtil.getOrCreatePollinatable(housing.getOwner(), world, posBlock.x, posBlock.y, posBlock.z);
+ IPollinatable realPollinatable = GeneticsUtil
+ .getOrCreatePollinatable(housing.getOwner(), world, posBlock.x, posBlock.y, posBlock.z);
if (realPollinatable != null) {
realPollinatable.mateWith(pollen);
@@ -814,8 +814,8 @@ public class Bee extends IndividualLiving implements IBee {
Vect randomPos = Vect.getRandomPositionInArea(random, area);
Vect posBlock = Vect.add(housingPos, randomPos, offset);
- if (FlowerManager.flowerRegistry.growFlower(
- provider.getFlowerType(), world, this, posBlock.x, posBlock.y, posBlock.z)) {
+ if (FlowerManager.flowerRegistry
+ .growFlower(provider.getFlowerType(), world, this, posBlock.x, posBlock.y, posBlock.z)) {
break;
}
}
diff --git a/src/main/java/forestry/apiculture/genetics/BeeBranchDefinition.java b/src/main/java/forestry/apiculture/genetics/BeeBranchDefinition.java
index 759cf3af1..f2b5765f3 100644
--- a/src/main/java/forestry/apiculture/genetics/BeeBranchDefinition.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeBranchDefinition.java
@@ -1,5 +1,8 @@
package forestry.apiculture.genetics;
+import java.util.Arrays;
+import java.util.Locale;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.genetics.IAllele;
@@ -8,15 +11,15 @@ import forestry.apiculture.genetics.alleles.AlleleEffect;
import forestry.core.genetics.IBranchDefinition;
import forestry.core.genetics.alleles.AlleleHelper;
import forestry.core.genetics.alleles.EnumAllele;
-import java.util.Arrays;
-import java.util.Locale;
public enum BeeBranchDefinition implements IBranchDefinition {
+
HONEY("Apis"),
NOBLE("Probapis"),
INDUSTRIOUS("Industrapis"),
HEROIC("Herapis"),
INFERNAL("Diapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.DOWN_2);
@@ -26,6 +29,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
AUSTERE("Modapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_1);
@@ -35,6 +39,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
TROPICAL("Caldapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.UP_1);
@@ -44,6 +49,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
END("Finapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.FERTILITY, EnumAllele.Fertility.LOW);
@@ -57,6 +63,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
FROZEN("Coagapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.UP_1);
@@ -66,6 +73,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
VENGEFUL("Punapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.TERRITORY, EnumAllele.Territory.LARGEST);
@@ -73,6 +81,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
FESTIVE("Festapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWER);
@@ -82,6 +91,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
AGRARIAN("Rustapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWER);
@@ -91,6 +101,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
BOGGY("Paludapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.MUSHROOMS);
@@ -99,6 +110,7 @@ public enum BeeBranchDefinition implements IBranchDefinition {
}
},
MONASTIC("Monapis") {
+
@Override
protected void setBranchProperties(IAllele[] alleles) {
AlleleHelper.instance.set(alleles, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWER);
@@ -141,8 +153,8 @@ public enum BeeBranchDefinition implements IBranchDefinition {
AlleleHelper.instance.set(defaultTemplate, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWEST);
AlleleHelper.instance.set(defaultTemplate, EnumBeeChromosome.LIFESPAN, EnumAllele.Lifespan.SHORTER);
AlleleHelper.instance.set(defaultTemplate, EnumBeeChromosome.FERTILITY, EnumAllele.Fertility.NORMAL);
- AlleleHelper.instance.set(
- defaultTemplate, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.NONE);
+ AlleleHelper.instance
+ .set(defaultTemplate, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.NONE);
AlleleHelper.instance.set(defaultTemplate, EnumBeeChromosome.NOCTURNAL, false);
AlleleHelper.instance.set(defaultTemplate, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.NONE);
AlleleHelper.instance.set(defaultTemplate, EnumBeeChromosome.TOLERANT_FLYER, false);
diff --git a/src/main/java/forestry/apiculture/genetics/BeeDefinition.java b/src/main/java/forestry/apiculture/genetics/BeeDefinition.java
index 7e05f1eca..9153a7b71 100644
--- a/src/main/java/forestry/apiculture/genetics/BeeDefinition.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeDefinition.java
@@ -1,15 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import java.awt.Color;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.Locale;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.BiomeDictionary;
+
+import org.apache.commons.lang3.text.WordUtils;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.EnumBeeType;
@@ -27,18 +36,12 @@ import forestry.core.genetics.alleles.AlleleHelper;
import forestry.core.genetics.alleles.EnumAllele;
import forestry.plugins.PluginApiculture;
import forestry.plugins.PluginCore;
-import java.awt.Color;
-import java.util.Arrays;
-import java.util.EnumSet;
-import java.util.Locale;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.BiomeDictionary;
-import org.apache.commons.lang3.text.WordUtils;
public enum BeeDefinition implements IBeeDefinition {
+
/* HONEY BRANCH */
FOREST(BeeBranchDefinition.HONEY, "nigrocincta", true, new Color(0x19d0ec), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.HONEY, 1), 0.30f);
@@ -56,6 +59,7 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
MEADOWS(BeeBranchDefinition.HONEY, "florea", true, new Color(0xef131e), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.HONEY, 1), 0.30f);
@@ -72,6 +76,7 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
COMMON(BeeBranchDefinition.HONEY, "cerana", true, new Color(0xb2b2b2), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.HONEY, 1), 0.35f);
@@ -94,6 +99,7 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
CULTIVATED(BeeBranchDefinition.HONEY, "mellifera", true, new Color(0x5734ec), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.HONEY, 1), 0.40f);
@@ -115,6 +121,7 @@ public enum BeeDefinition implements IBeeDefinition {
/* NOBLE BRANCH */
NOBLE(BeeBranchDefinition.NOBLE, "nobilis", false, new Color(0xec9a19), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.DRIPPING, 1), 0.20f);
@@ -133,6 +140,7 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
MAJESTIC(BeeBranchDefinition.NOBLE, "regalis", true, new Color(0x7f0000), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.DRIPPING, 1), 0.30f);
@@ -151,12 +159,11 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
IMPERIAL(BeeBranchDefinition.NOBLE, "imperatorius", false, new Color(0xa3e02f), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.DRIPPING, 1), 0.20f)
- .addProduct(PluginApiculture.items.royalJelly.getItemStack(), 0.15f)
- .setHasEffect();
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.DRIPPING, 1), 0.20f)
+ .addProduct(PluginApiculture.items.royalJelly.getItemStack(), 0.15f).setHasEffect();
}
@Override
@@ -174,6 +181,7 @@ public enum BeeDefinition implements IBeeDefinition {
/* INDUSTRIOUS BRANCH */
DILIGENT(BeeBranchDefinition.INDUSTRIOUS, "sedulus", false, new Color(0xc219ec), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.STRINGY, 1), 0.20f);
@@ -192,6 +200,7 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
UNWEARY(BeeBranchDefinition.INDUSTRIOUS, "assiduus", true, new Color(0x19ec5a), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.STRINGY, 1), 0.30f);
@@ -209,10 +218,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
INDUSTRIOUS(BeeBranchDefinition.INDUSTRIOUS, "industria", false, new Color(0xffffff), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.STRINGY, 1), 0.20f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.STRINGY, 1), 0.20f)
.addProduct(PluginApiculture.items.pollenCluster.get(EnumPollenCluster.NORMAL, 1), 0.15f)
.setHasEffect();
}
@@ -232,11 +241,10 @@ public enum BeeDefinition implements IBeeDefinition {
/* HEROIC BRANCH */
STEADFAST(BeeBranchDefinition.HEROIC, "legio", false, new Color(0x4d2b15), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.COCOA, 1), 0.20f)
- .setHasEffect();
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.COCOA, 1), 0.20f).setHasEffect();
}
@Override
@@ -253,10 +261,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
VALIANT(BeeBranchDefinition.HEROIC, "centurio", true, new Color(0x626bdd), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.COCOA, 1), 0.30f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.COCOA, 1), 0.30f)
.addSpecialty(new ItemStack(Items.sugar), 0.15f);
}
@@ -274,11 +282,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
HEROIC(BeeBranchDefinition.HEROIC, "kraphti", false, new Color(0xb3d5e4), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.COCOA, 1), 0.40f)
- .setHasEffect();
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.COCOA, 1), 0.40f).setHasEffect();
}
@Override
@@ -298,12 +305,11 @@ public enum BeeDefinition implements IBeeDefinition {
/* INFERNAL BRANCH */
SINISTER(BeeBranchDefinition.INFERNAL, "caecus", false, new Color(0xb3d5e4), new Color(0x9a2323)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SIMMERING, 1), 0.45f)
- .setTemperature(EnumTemperature.HELLISH)
- .setHumidity(EnumHumidity.ARID);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SIMMERING, 1), 0.45f)
+ .setTemperature(EnumTemperature.HELLISH).setHumidity(EnumHumidity.ARID);
}
@Override
@@ -321,12 +327,11 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
FIENDISH(BeeBranchDefinition.INFERNAL, "diabolus", true, new Color(0xd7bee5), new Color(0x9a2323)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SIMMERING, 1), 0.55f)
- .addProduct(PluginCore.items.ash.getItemStack(), 0.15f)
- .setTemperature(EnumTemperature.HELLISH)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SIMMERING, 1), 0.55f)
+ .addProduct(PluginCore.items.ash.getItemStack(), 0.15f).setTemperature(EnumTemperature.HELLISH)
.setHumidity(EnumHumidity.ARID);
}
@@ -345,14 +350,12 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
DEMONIC(BeeBranchDefinition.INFERNAL, "draco", false, new Color(0xf4e400), new Color(0x9a2323)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SIMMERING, 1), 0.45f)
- .addProduct(new ItemStack(Items.glowstone_dust), 0.15f)
- .setHasEffect()
- .setTemperature(EnumTemperature.HELLISH)
- .setHumidity(EnumHumidity.ARID);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SIMMERING, 1), 0.45f)
+ .addProduct(new ItemStack(Items.glowstone_dust), 0.15f).setHasEffect()
+ .setTemperature(EnumTemperature.HELLISH).setHumidity(EnumHumidity.ARID);
}
@Override
@@ -370,12 +373,11 @@ public enum BeeDefinition implements IBeeDefinition {
/* AUSTERE BRANCH */
MODEST(BeeBranchDefinition.AUSTERE, "modicus", false, new Color(0xc5be86), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.PARCHED, 1), 0.20f)
- .setTemperature(EnumTemperature.HOT)
- .setHumidity(EnumHumidity.ARID);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.PARCHED, 1), 0.20f)
+ .setTemperature(EnumTemperature.HOT).setHumidity(EnumHumidity.ARID);
}
@Override
@@ -390,12 +392,11 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
FRUGAL(BeeBranchDefinition.AUSTERE, "permodestus", true, new Color(0xe8dcb1), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.PARCHED, 1), 0.30f)
- .setTemperature(EnumTemperature.HOT)
- .setHumidity(EnumHumidity.ARID);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.PARCHED, 1), 0.30f)
+ .setTemperature(EnumTemperature.HOT).setHumidity(EnumHumidity.ARID);
}
@Override
@@ -406,23 +407,19 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(MODEST, SINISTER, 16)
- .restrictTemperature(EnumTemperature.HOT, EnumTemperature.HELLISH)
+ registerMutation(MODEST, SINISTER, 16).restrictTemperature(EnumTemperature.HOT, EnumTemperature.HELLISH)
.restrictHumidity(EnumHumidity.ARID);
- registerMutation(MODEST, FIENDISH, 10)
- .restrictTemperature(EnumTemperature.HOT, EnumTemperature.HELLISH)
+ registerMutation(MODEST, FIENDISH, 10).restrictTemperature(EnumTemperature.HOT, EnumTemperature.HELLISH)
.restrictHumidity(EnumHumidity.ARID);
}
},
AUSTERE(BeeBranchDefinition.AUSTERE, "correpere", false, new Color(0xfffac2), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.PARCHED, 1), 0.20f)
- .addSpecialty(PluginApiculture.items.beeComb.get(EnumHoneyComb.POWDERY, 1), 0.50f)
- .setHasEffect()
- .setTemperature(EnumTemperature.HOT)
- .setHumidity(EnumHumidity.ARID);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.PARCHED, 1), 0.20f)
+ .addSpecialty(PluginApiculture.items.beeComb.get(EnumHoneyComb.POWDERY, 1), 0.50f).setHasEffect()
+ .setTemperature(EnumTemperature.HOT).setHumidity(EnumHumidity.ARID);
}
@Override
@@ -435,20 +432,18 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(MODEST, FRUGAL, 8)
- .restrictTemperature(EnumTemperature.HOT, EnumTemperature.HELLISH)
+ registerMutation(MODEST, FRUGAL, 8).restrictTemperature(EnumTemperature.HOT, EnumTemperature.HELLISH)
.restrictHumidity(EnumHumidity.ARID);
}
},
/* TROPICAL BRANCH */
TROPICAL(BeeBranchDefinition.TROPICAL, "mendelia", false, new Color(0x378020), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.20f)
- .setTemperature(EnumTemperature.WARM)
- .setHumidity(EnumHumidity.DAMP);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.20f)
+ .setTemperature(EnumTemperature.WARM).setHumidity(EnumHumidity.DAMP);
}
@Override
@@ -463,12 +458,11 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
EXOTIC(BeeBranchDefinition.TROPICAL, "darwini", true, new Color(0x304903), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.30f)
- .setTemperature(EnumTemperature.WARM)
- .setHumidity(EnumHumidity.DAMP);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.30f)
+ .setTemperature(EnumTemperature.WARM).setHumidity(EnumHumidity.DAMP);
}
@Override
@@ -483,13 +477,11 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
EDENIC(BeeBranchDefinition.TROPICAL, "humboldti", false, new Color(0x393d0d), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.20f)
- .setHasEffect()
- .setTemperature(EnumTemperature.WARM)
- .setHumidity(EnumHumidity.DAMP);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.20f).setHasEffect()
+ .setTemperature(EnumTemperature.WARM).setHumidity(EnumHumidity.DAMP);
}
@Override
@@ -508,10 +500,10 @@ public enum BeeDefinition implements IBeeDefinition {
/* END BRANCH */
ENDED(BeeBranchDefinition.END, "notchi", false, new Color(0xe079fa), new Color(0xd9de9e)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), 0.30f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), 0.30f)
.setTemperature(EnumTemperature.COLD);
}
@@ -524,10 +516,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
SPECTRAL(BeeBranchDefinition.END, "idolum", true, new Color(0xa98bed), new Color(0xd9de9e)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), 0.50f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), 0.50f)
.setTemperature(EnumTemperature.COLD);
}
@@ -542,11 +534,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
PHANTASMAL(BeeBranchDefinition.END, "lemur", false, new Color(0xcc00fa), new Color(0xd9de9e)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), 0.40f)
- .setHasEffect()
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), 0.40f).setHasEffect()
.setTemperature(EnumTemperature.COLD);
}
@@ -565,10 +556,10 @@ public enum BeeDefinition implements IBeeDefinition {
/* FROZEN BRANCH */
WINTRY(BeeBranchDefinition.FROZEN, "brumalis", false, new Color(0xa0ffc8), new Color(0xdaf5f3)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.30f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.30f)
.setTemperature(EnumTemperature.ICY);
}
@@ -585,10 +576,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
ICY(BeeBranchDefinition.FROZEN, "coagulis", true, new Color(0xa0ffff), new Color(0xdaf5f3)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.20f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.20f)
.addProduct(PluginCore.items.craftingMaterial.getIceShard(1), 0.20f)
.setTemperature(EnumTemperature.ICY);
}
@@ -605,13 +596,12 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
GLACIAL(BeeBranchDefinition.FROZEN, "glacialis", false, new Color(0xefffff), new Color(0xdaf5f3)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.20f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.20f)
.addProduct(PluginCore.items.craftingMaterial.getIceShard(1), 0.40f)
- .setTemperature(EnumTemperature.ICY)
- .setHasEffect();
+ .setTemperature(EnumTemperature.ICY).setHasEffect();
}
@Override
@@ -628,10 +618,10 @@ public enum BeeDefinition implements IBeeDefinition {
/* VENGEFUL BRANCH */
VINDICTIVE(BeeBranchDefinition.VENGEFUL, "ultio", false, new Color(0xeafff3), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), 0.25f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), 0.25f)
.setIsNotCounted();
}
@@ -647,10 +637,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
VENGEFUL(BeeBranchDefinition.VENGEFUL, "punire", false, new Color(0xc2de00), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), 0.40f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), 0.40f)
.setIsNotCounted();
}
@@ -667,11 +657,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
AVENGING(BeeBranchDefinition.VENGEFUL, "hostimentum", false, new Color(0xddff00), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), 0.40f)
- .setHasEffect()
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), 0.40f).setHasEffect()
.setIsNotCounted();
}
@@ -690,13 +679,11 @@ public enum BeeDefinition implements IBeeDefinition {
/* FESTIVE BRANCH */
// Easter
LEPORINE(BeeBranchDefinition.FESTIVE, "lepus", false, new Color(0xfeff8f), new Color(0x3cd757)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.30f)
- .addProduct(new ItemStack(Items.egg), 0.10f)
- .setHasEffect()
- .setIsNotCounted();
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.SILKY, 1), 0.30f)
+ .addProduct(new ItemStack(Items.egg), 0.10f).setHasEffect().setIsNotCounted();
}
@Override
@@ -706,21 +693,17 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(MEADOWS, FOREST, 10)
- .restrictDateRange(3, 29, 4, 15)
- .setIsSecret();
+ registerMutation(MEADOWS, FOREST, 10).restrictDateRange(3, 29, 4, 15).setIsSecret();
}
},
// Christmas
MERRY(BeeBranchDefinition.FESTIVE, "feliciter", false, new Color(0xffffff), new Color(0xd40000)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.30f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.30f)
.addProduct(PluginCore.items.craftingMaterial.getIceShard(1), 0.20f)
- .setTemperature(EnumTemperature.ICY)
- .setHasEffect()
- .setIsNotCounted();
+ .setTemperature(EnumTemperature.ICY).setHasEffect().setIsNotCounted();
}
@Override
@@ -731,21 +714,17 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(WINTRY, FOREST, 10)
- .restrictDateRange(12, 21, 12, 27)
- .setIsSecret();
+ registerMutation(WINTRY, FOREST, 10).restrictDateRange(12, 21, 12, 27).setIsSecret();
}
},
// New Year
TIPSY(BeeBranchDefinition.FESTIVE, "ebrius", false, new Color(0xffffff), new Color(0xc219ec)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.30f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.FROZEN, 1), 0.30f)
.addProduct(PluginCore.items.craftingMaterial.getIceShard(1), 0.20f)
- .setTemperature(EnumTemperature.ICY)
- .setHasEffect()
- .setIsNotCounted();
+ .setTemperature(EnumTemperature.ICY).setHasEffect().setIsNotCounted();
}
@Override
@@ -756,25 +735,21 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(WINTRY, MEADOWS, 10)
- .restrictDateRange(12, 27, 1, 2)
- .setIsSecret();
+ registerMutation(WINTRY, MEADOWS, 10).restrictDateRange(12, 27, 1, 2).setIsSecret();
}
},
// (missing) Solstice
// Halloween
TRICKY(BeeBranchDefinition.FESTIVE, "libita", false, new Color(0x49413B), new Color(0xFF6A00)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.HONEY, 1), 0.40f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.HONEY, 1), 0.40f)
.addProduct(new ItemStack(Items.cookie), 0.15f)
.addSpecialty(new ItemStack(Items.skull, 1, 0), 0.02f)
.addSpecialty(new ItemStack(Items.skull, 1, 2), 0.02f)
.addSpecialty(new ItemStack(Items.skull, 1, 3), 0.02f)
- .addSpecialty(new ItemStack(Items.skull, 1, 4), 0.02f)
- .setHasEffect()
- .setIsNotCounted();
+ .addSpecialty(new ItemStack(Items.skull, 1, 4), 0.02f).setHasEffect().setIsNotCounted();
}
@Override
@@ -786,15 +761,14 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(SINISTER, COMMON, 10)
- .restrictDateRange(10, 15, 11, 3)
- .setIsSecret();
+ registerMutation(SINISTER, COMMON, 10).restrictDateRange(10, 15, 11, 3).setIsSecret();
}
},
// (missing) Thanksgiving
/* AGRARIAN BRANCH */
RURAL(BeeBranchDefinition.AGRARIAN, "rustico", false, new Color(0xfeff8f), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.WHEATEN, 1), 0.20f);
@@ -809,6 +783,7 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
FARMERLY(BeeBranchDefinition.AGRARIAN, "arator", true, new Color(0xD39728), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.WHEATEN, 1), 0.27f);
@@ -826,11 +801,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
AGRARIAN(BeeBranchDefinition.AGRARIAN, "arator", true, new Color(0xFFCA75), new Color(0xFFE047)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.WHEATEN, 1), 0.35f)
- .setHasEffect();
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.WHEATEN, 1), 0.35f).setHasEffect();
}
@Override
@@ -849,10 +823,10 @@ public enum BeeDefinition implements IBeeDefinition {
/* BOGGY BRANCH */
MARSHY(BeeBranchDefinition.BOGGY, "adorasti", true, new Color(0x546626), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MOSSY, 1), 0.30f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MOSSY, 1), 0.30f)
.setHumidity(EnumHumidity.DAMP);
}
@@ -865,10 +839,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
MIRY(BeeBranchDefinition.BOGGY, "humidium", true, new Color(0x92AF42), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MOSSY, 1), 0.36f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MOSSY, 1), 0.36f)
.setHumidity(EnumHumidity.DAMP);
}
@@ -881,18 +855,16 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(MARSHY, NOBLE, 15)
- .restrictTemperature(EnumTemperature.WARM)
+ registerMutation(MARSHY, NOBLE, 15).restrictTemperature(EnumTemperature.WARM)
.restrictHumidity(EnumHumidity.DAMP);
}
},
BOGGY(BeeBranchDefinition.BOGGY, "paluster", true, new Color(0x698948), new Color(0xffdc16)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MOSSY, 1), 0.39f)
- .addSpecialty(PluginCore.items.peat.getItemStack(), 0.08f)
- .setHumidity(EnumHumidity.DAMP);
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.MOSSY, 1), 0.39f)
+ .addSpecialty(PluginCore.items.peat.getItemStack(), 0.08f).setHumidity(EnumHumidity.DAMP);
}
@Override
@@ -905,18 +877,17 @@ public enum BeeDefinition implements IBeeDefinition {
@Override
protected void registerMutations() {
- registerMutation(MARSHY, MIRY, 9)
- .restrictTemperature(EnumTemperature.WARM)
+ registerMutation(MARSHY, MIRY, 9).restrictTemperature(EnumTemperature.WARM)
.restrictHumidity(EnumHumidity.DAMP);
}
},
/* MONASTIC BRANCH */
MONASTIC(BeeBranchDefinition.MONASTIC, "monachus", false, new Color(0x42371c), new Color(0xfff7b6)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.WHEATEN, 1), 0.30f)
+ beeSpecies.addProduct(PluginApiculture.items.beeComb.get(EnumHoneyComb.WHEATEN, 1), 0.30f)
.addSpecialty(PluginApiculture.items.beeComb.get(EnumHoneyComb.MELLOW, 1), 0.10f)
.setJubilanceProvider(new JubilanceProviderHermit());
}
@@ -930,10 +901,10 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
SECLUDED(BeeBranchDefinition.MONASTIC, "contractus", true, new Color(0x7b6634), new Color(0xfff7b6)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addSpecialty(PluginApiculture.items.beeComb.get(EnumHoneyComb.MELLOW, 1), 0.20f)
+ beeSpecies.addSpecialty(PluginApiculture.items.beeComb.get(EnumHoneyComb.MELLOW, 1), 0.20f)
.setJubilanceProvider(new JubilanceProviderHermit());
}
@@ -948,12 +919,11 @@ public enum BeeDefinition implements IBeeDefinition {
}
},
HERMITIC(BeeBranchDefinition.MONASTIC, "anachoreta", false, new Color(0xffd46c), new Color(0xfff7b6)) {
+
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
- beeSpecies
- .addSpecialty(PluginApiculture.items.beeComb.get(EnumHoneyComb.MELLOW, 1), 0.20f)
- .setJubilanceProvider(new JubilanceProviderHermit())
- .setHasEffect();
+ beeSpecies.addSpecialty(PluginApiculture.items.beeComb.get(EnumHoneyComb.MELLOW, 1), 0.20f)
+ .setJubilanceProvider(new JubilanceProviderHermit()).setHasEffect();
}
@Override
@@ -968,8 +938,8 @@ public enum BeeDefinition implements IBeeDefinition {
}
};
- private static final EnumSet overworldHiveBees =
- EnumSet.of(FOREST, MARSHY, MEADOWS, MODEST, TROPICAL, WINTRY);
+ private static final EnumSet overworldHiveBees = EnumSet
+ .of(FOREST, MARSHY, MEADOWS, MODEST, TROPICAL, WINTRY);
private final BeeBranchDefinition branch;
private final IAlleleBeeSpeciesCustom species;
diff --git a/src/main/java/forestry/apiculture/genetics/BeeFactory.java b/src/main/java/forestry/apiculture/genetics/BeeFactory.java
index 01d1ef2ad..380713ba9 100644
--- a/src/main/java/forestry/apiculture/genetics/BeeFactory.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeFactory.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
@@ -18,16 +16,10 @@ import forestry.api.genetics.IClassification;
import forestry.apiculture.genetics.alleles.AlleleBeeSpecies;
public class BeeFactory implements IBeeFactory {
+
@Override
- public IAlleleBeeSpeciesCustom createSpecies(
- String uid,
- boolean dominant,
- String authority,
- String unlocalizedName,
- String unlocalizedDescription,
- IClassification branch,
- String binomial,
- int primaryColor,
+ public IAlleleBeeSpeciesCustom createSpecies(String uid, boolean dominant, String authority, String unlocalizedName,
+ String unlocalizedDescription, IClassification branch, String binomial, int primaryColor,
int secondaryColor) {
IAlleleBeeSpeciesCustom species = new AlleleBeeSpecies(
uid,
diff --git a/src/main/java/forestry/apiculture/genetics/BeeGenome.java b/src/main/java/forestry/apiculture/genetics/BeeGenome.java
index d50bd7499..4562f2e91 100755
--- a/src/main/java/forestry/apiculture/genetics/BeeGenome.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeGenome.java
@@ -1,18 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import java.util.concurrent.TimeUnit;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.IAlleleBeeEffect;
@@ -31,32 +37,21 @@ import forestry.core.genetics.alleles.AlleleArea;
import forestry.core.genetics.alleles.AlleleBoolean;
import forestry.core.genetics.alleles.AlleleTolerance;
import forestry.core.utils.vect.Vect;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Nonnull;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class BeeGenome extends Genome implements IBeeGenome {
+
/**
- * 0 - Species (determines product)
- * 1 - Speed
- * 2 - Lifespan
- * 3 - Fertility (Maximum number of offspring)
- * 4 - Preferred temperature Icy: Snow biomes Cold: Tundra/Steppe, Extreme Mountains/Hills? Normal: Plains, Forests, Mountains Hot: Desert Hellish: Nether
- * 5 - Temperature tolerance (Range +/-)
- * 6 - Nocturnal
- * 7 - Preferred humidity (Arid - Normal - Damp)
- * 8 - Humidity tolerance (Range +/-)
- * 9 - Flight interference tolerance (stuff falling from the sky/other hindrances -> tolerates dampness + flight interference tolerance => rain resistance)
- * 10 - Cave dwelling
- * 11 - Required flowers
- * 12 - Flower plant chance
- * 13 - Territory
+ * 0 - Species (determines product) 1 - Speed 2 - Lifespan 3 - Fertility (Maximum number of offspring) 4 - Preferred
+ * temperature Icy: Snow biomes Cold: Tundra/Steppe, Extreme Mountains/Hills? Normal: Plains, Forests, Mountains
+ * Hot: Desert Hellish: Nether 5 - Temperature tolerance (Range +/-) 6 - Nocturnal 7 - Preferred humidity (Arid -
+ * Normal - Damp) 8 - Humidity tolerance (Range +/-) 9 - Flight interference tolerance (stuff falling from the
+ * sky/other hindrances -> tolerates dampness + flight interference tolerance => rain resistance) 10 - Cave dwelling
+ * 11 - Required flowers 12 - Flower plant chance 13 - Territory
*/
private static final LoadingCache beeGenomeCache = CacheBuilder.newBuilder()
- .maximumSize(128)
- .expireAfterAccess(1, TimeUnit.MINUTES)
+ .maximumSize(128).expireAfterAccess(1, TimeUnit.MINUTES)
.build(new CacheLoader() {
+
@Override
public BeeGenome load(@Nonnull NBTTagCompound tagCompound) {
return new BeeGenome(tagCompound);
@@ -158,7 +153,7 @@ public class BeeGenome extends Genome implements IBeeGenome {
@Override
public int[] getTerritory() {
Vect area = ((AlleleArea) getActiveAllele(EnumBeeChromosome.TERRITORY)).getArea();
- return new int[] {area.x, area.y, area.z};
+ return new int[] { area.x, area.y, area.z };
}
@Override
diff --git a/src/main/java/forestry/apiculture/genetics/BeeHelper.java b/src/main/java/forestry/apiculture/genetics/BeeHelper.java
index 628668988..83e58b22a 100755
--- a/src/main/java/forestry/apiculture/genetics/BeeHelper.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeHelper.java
@@ -1,16 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Map.Entry;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.fml.common.FMLCommonHandler;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
@@ -37,15 +47,6 @@ import forestry.apiculture.BeeHousingModifier;
import forestry.apiculture.BeekeepingLogic;
import forestry.core.genetics.SpeciesRoot;
import forestry.plugins.PluginApiculture;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Locale;
-import java.util.Map.Entry;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
public class BeeHelper extends SpeciesRoot implements IBeeRoot {
@@ -66,8 +67,7 @@ public class BeeHelper extends SpeciesRoot implements IBeeRoot {
public int getSpeciesCount() {
if (beeSpeciesCount < 0) {
beeSpeciesCount = 0;
- for (Entry entry :
- AlleleManager.alleleRegistry.getRegisteredAlleles().entrySet()) {
+ for (Entry entry : AlleleManager.alleleRegistry.getRegisteredAlleles().entrySet()) {
if (entry.getValue() instanceof IAlleleBeeSpecies) {
if (((IAlleleBeeSpecies) entry.getValue()).isCounted()) {
beeSpeciesCount++;
@@ -314,8 +314,7 @@ public class BeeHelper extends SpeciesRoot implements IBeeRoot {
}
}
- FMLCommonHandler.instance()
- .getFMLLogger()
+ FMLCommonHandler.instance().getFMLLogger()
.debug("Failed to find a beekeeping mode called '%s', reverting to fallback.");
return beekeepingModes.get(0);
}
diff --git a/src/main/java/forestry/apiculture/genetics/BeeMutation.java b/src/main/java/forestry/apiculture/genetics/BeeMutation.java
index 054efb8dd..832ee8603 100644
--- a/src/main/java/forestry/apiculture/genetics/BeeMutation.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeMutation.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome;
@@ -19,8 +20,6 @@ import forestry.api.apiculture.IBeeMutationCustom;
import forestry.api.apiculture.IBeeRoot;
import forestry.api.genetics.IAllele;
import forestry.core.genetics.mutations.Mutation;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
public class BeeMutation extends Mutation implements IBeeMutationCustom {
@@ -34,12 +33,8 @@ public class BeeMutation extends Mutation implements IBeeMutationCustom {
}
@Override
- public float getChance(
- IBeeHousing housing,
- IAlleleBeeSpecies allele0,
- IAlleleBeeSpecies allele1,
- IBeeGenome genome0,
- IBeeGenome genome1) {
+ public float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1,
+ IBeeGenome genome0, IBeeGenome genome1) {
World world = housing.getWorld();
ChunkCoordinates housingCoordinates = housing.getCoordinates();
int x = housingCoordinates.posX;
@@ -52,8 +47,7 @@ public class BeeMutation extends Mutation implements IBeeMutationCustom {
}
IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
- IBeeModifier beeModeModifier =
- BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier();
+ IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier();
processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance);
processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance);
diff --git a/src/main/java/forestry/apiculture/genetics/BeeMutationFactory.java b/src/main/java/forestry/apiculture/genetics/BeeMutationFactory.java
index e5707d5ca..0e7faa9ef 100644
--- a/src/main/java/forestry/apiculture/genetics/BeeMutationFactory.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeMutationFactory.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
@@ -19,8 +17,8 @@ import forestry.api.genetics.IAllele;
public class BeeMutationFactory implements IBeeMutationFactory {
@Override
- public IBeeMutationCustom createMutation(
- IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance) {
+ public IBeeMutationCustom createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1,
+ IAllele[] result, int chance) {
IBeeMutationCustom mutation = new BeeMutation(parentBee0, parentBee1, result, chance);
BeeManager.beeRoot.registerMutation(mutation);
return mutation;
diff --git a/src/main/java/forestry/apiculture/genetics/BeeVariation.java b/src/main/java/forestry/apiculture/genetics/BeeVariation.java
index 31c63612c..1a19b2f23 100644
--- a/src/main/java/forestry/apiculture/genetics/BeeVariation.java
+++ b/src/main/java/forestry/apiculture/genetics/BeeVariation.java
@@ -1,5 +1,7 @@
package forestry.apiculture.genetics;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.EnumBeeType;
@@ -7,7 +9,6 @@ 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 {
@@ -44,6 +45,7 @@ public abstract class BeeVariation implements IBeeDefinition {
}
public static class RainResist extends BeeVariation {
+
public RainResist(IBeeDefinition bee) {
super(bee);
}
diff --git a/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java b/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java
index 31adac378..ca2954901 100755
--- a/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java
+++ b/src/main/java/forestry/apiculture/genetics/BeekeepingMode.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import java.util.ArrayList;
+import java.util.Locale;
+import java.util.Random;
+
+import net.minecraft.world.World;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.DefaultBeeModifier;
import forestry.api.apiculture.IBee;
@@ -17,10 +21,6 @@ import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeeModifier;
import forestry.api.apiculture.IBeekeepingMode;
-import java.util.ArrayList;
-import java.util.Locale;
-import java.util.Random;
-import net.minecraft.world.World;
public class BeekeepingMode implements IBeekeepingMode {
@@ -36,13 +36,8 @@ public class BeekeepingMode implements IBeekeepingMode {
private final boolean canFatigue;
private final IBeeModifier beeModifier;
- public BeekeepingMode(
- String name,
- float mutationModifier,
- float lifespanModifier,
- float speedModifier,
- boolean reducesFertility,
- boolean canFatigue) {
+ public BeekeepingMode(String name, float mutationModifier, float lifespanModifier, float speedModifier,
+ boolean reducesFertility, boolean canFatigue) {
this.rand = new Random();
this.name = name;
this.reducesFertility = reducesFertility;
@@ -138,6 +133,7 @@ public class BeekeepingMode implements IBeekeepingMode {
}
private static class BeekeepingModeBeeModifier extends DefaultBeeModifier {
+
private final float mutationModifier;
private final float lifespanModifier;
private final float speedModifier;
diff --git a/src/main/java/forestry/apiculture/genetics/BranchBees.java b/src/main/java/forestry/apiculture/genetics/BranchBees.java
index 22fce5155..8579cca63 100755
--- a/src/main/java/forestry/apiculture/genetics/BranchBees.java
+++ b/src/main/java/forestry/apiculture/genetics/BranchBees.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
diff --git a/src/main/java/forestry/apiculture/genetics/DefaultBeeIconColourProvider.java b/src/main/java/forestry/apiculture/genetics/DefaultBeeIconColourProvider.java
index 1d363a21a..16c2fce70 100644
--- a/src/main/java/forestry/apiculture/genetics/DefaultBeeIconColourProvider.java
+++ b/src/main/java/forestry/apiculture/genetics/DefaultBeeIconColourProvider.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
import forestry.api.apiculture.IBeeIconColourProvider;
public class DefaultBeeIconColourProvider implements IBeeIconColourProvider {
+
private final int primaryColour;
private final int secondaryColour;
diff --git a/src/main/java/forestry/apiculture/genetics/DefaultBeeIconProvider.java b/src/main/java/forestry/apiculture/genetics/DefaultBeeIconProvider.java
index 8f52e6e57..b358e0988 100644
--- a/src/main/java/forestry/apiculture/genetics/DefaultBeeIconProvider.java
+++ b/src/main/java/forestry/apiculture/genetics/DefaultBeeIconProvider.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import java.util.Locale;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IBeeIconProvider;
import forestry.core.render.TextureManager;
-import java.util.Locale;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
public class DefaultBeeIconProvider implements IBeeIconProvider {
diff --git a/src/main/java/forestry/apiculture/genetics/HiveDrop.java b/src/main/java/forestry/apiculture/genetics/HiveDrop.java
index af83a2256..74363d5d2 100755
--- a/src/main/java/forestry/apiculture/genetics/HiveDrop.java
+++ b/src/main/java/forestry/apiculture/genetics/HiveDrop.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IHiveDrop;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
public class HiveDrop implements IHiveDrop {
diff --git a/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java b/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java
index 241b1f7f4..7b43677f8 100644
--- a/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java
+++ b/src/main/java/forestry/apiculture/genetics/IBeeDefinition.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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
IBeeGenome getGenome();
diff --git a/src/main/java/forestry/apiculture/genetics/JubilanceDefault.java b/src/main/java/forestry/apiculture/genetics/JubilanceDefault.java
index c8b8acf06..865f7ad53 100755
--- a/src/main/java/forestry/apiculture/genetics/JubilanceDefault.java
+++ b/src/main/java/forestry/apiculture/genetics/JubilanceDefault.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
diff --git a/src/main/java/forestry/apiculture/genetics/JubilanceFactory.java b/src/main/java/forestry/apiculture/genetics/JubilanceFactory.java
index 1a2aab9cb..1bac1332b 100644
--- a/src/main/java/forestry/apiculture/genetics/JubilanceFactory.java
+++ b/src/main/java/forestry/apiculture/genetics/JubilanceFactory.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
-import forestry.api.apiculture.IJubilanceFactory;
-import forestry.api.apiculture.IJubilanceProvider;
import net.minecraft.block.Block;
+import forestry.api.apiculture.IJubilanceFactory;
+import forestry.api.apiculture.IJubilanceProvider;
+
public class JubilanceFactory implements IJubilanceFactory {
+
@Override
public IJubilanceProvider getDefault() {
return JubilanceDefault.instance;
diff --git a/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java b/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java
index ccb593243..998c56df2 100755
--- a/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java
+++ b/src/main/java/forestry/apiculture/genetics/JubilanceProviderHermit.java
@@ -1,27 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 forestry.core.utils.StringUtil;
-import java.util.List;
-import net.minecraft.entity.EntityLiving;
/**
* Hermits will not produce if there are any other living creatures nearby.
*/
public class JubilanceProviderHermit extends JubilanceDefault {
+
@Override
public boolean isJubilant(IAlleleBeeSpecies species, IBeeGenome genome, IBeeHousing housing) {
List list = AlleleEffect.getEntitiesInRange(genome, housing, EntityLiving.class);
diff --git a/src/main/java/forestry/apiculture/genetics/JubilanceRequiresResource.java b/src/main/java/forestry/apiculture/genetics/JubilanceRequiresResource.java
index 3bc10f502..5fbf7eddc 100644
--- a/src/main/java/forestry/apiculture/genetics/JubilanceRequiresResource.java
+++ b/src/main/java/forestry/apiculture/genetics/JubilanceRequiresResource.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
@@ -17,11 +21,6 @@ import forestry.api.apiculture.IJubilanceProvider;
import forestry.core.utils.BlockUtil;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.StringUtil;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
public class JubilanceRequiresResource implements IJubilanceProvider {
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java
index ed67ef79b..5ad7d1a57 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleBeeSpecies.java
@@ -1,16 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.BeeManager;
@@ -30,16 +39,9 @@ import forestry.apiculture.genetics.DefaultBeeIconProvider;
import forestry.apiculture.genetics.JubilanceDefault;
import forestry.core.genetics.alleles.AlleleSpecies;
import forestry.core.utils.ItemStackUtil;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpeciesCustom {
+
private final Map productChances = new HashMap<>();
private final Map specialtyChances = new HashMap<>();
@@ -48,16 +50,8 @@ public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpecies
private IJubilanceProvider jubilanceProvider;
private boolean nocturnal = false;
- public AlleleBeeSpecies(
- String uid,
- String unlocalizedName,
- String authority,
- String unlocalizedDescription,
- boolean dominant,
- IClassification branch,
- String binomial,
- int primaryColor,
- int secondaryColor) {
+ public AlleleBeeSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription,
+ boolean dominant, IClassification branch, String binomial, int primaryColor, int secondaryColor) {
super(uid, unlocalizedName, authority, unlocalizedDescription, dominant, branch, binomial);
beeIconProvider = DefaultBeeIconProvider.instance;
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffect.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffect.java
index 082ab879d..7181bce6a 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffect.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffect.java
@@ -1,15 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import java.util.Arrays;
+import java.util.List;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.potion.Potion;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.Vec3;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.IAlleleBeeEffect;
@@ -23,13 +30,6 @@ import forestry.core.proxy.Proxies;
import forestry.core.utils.EntityUtil;
import forestry.core.utils.vect.MutableVect;
import forestry.core.utils.vect.Vect;
-import java.util.Arrays;
-import java.util.List;
-import net.minecraft.entity.Entity;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.Vec3;
public abstract class AlleleEffect extends AlleleCategorized implements IAlleleBeeEffect {
@@ -69,10 +69,12 @@ public abstract class AlleleEffect extends AlleleCategorized implements IAlleleB
effectFestiveEaster = new AlleleEffectNone("festiveEaster", true),
effectSnowing = new AlleleEffectSnowing(),
effectDrunkard = new AlleleEffectPotion("drunkard", false, Potion.confusion, 100),
- effectReanimation =
- new AlleleEffectResurrection("reanimation", AlleleEffectResurrection.getReanimationList()),
- effectResurrection =
- new AlleleEffectResurrection("resurrection", AlleleEffectResurrection.getResurrectionList()),
+ effectReanimation = new AlleleEffectResurrection(
+ "reanimation",
+ AlleleEffectResurrection.getReanimationList()),
+ effectResurrection = new AlleleEffectResurrection(
+ "resurrection",
+ AlleleEffectResurrection.getResurrectionList()),
effectRepulsion = new AlleleEffectRepulsion(),
effectFertile = new AlleleEffectFertile(),
effectMycophilic = new AlleleEffectFungification());
@@ -158,8 +160,8 @@ public abstract class AlleleEffect extends AlleleCategorized implements IAlleleB
return AxisAlignedBB.getBoundingBox(min.x, min.y, min.z, max.x, max.y, max.z);
}
- public static List getEntitiesInRange(
- IBeeGenome genome, IBeeHousing housing, Class entityClass) {
+ public static List getEntitiesInRange(IBeeGenome genome, IBeeHousing housing,
+ Class entityClass) {
AxisAlignedBB boundingBox = getBounding(genome, housing);
return EntityUtil.getEntitiesWithinAABB(housing.getWorld(), entityClass, boundingBox);
}
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java
index f0a78ffa3..6d1a3bf0b 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectAggressive.java
@@ -1,25 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 java.util.List;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.DamageSource;
public class AlleleEffectAggressive extends AlleleEffectThrottled {
+
private static final DamageSource damageSourceBeeAggressive = new DamageSourceForestry("bee.aggressive");
public AlleleEffectAggressive() {
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java
index 24eec6dbc..a05187485 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectCreeper.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ChunkCoordinates;
+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 java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.util.ChunkCoordinates;
-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 ad2709c8a..3bf80b055 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectExploration.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectExploration.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 java.util.List;
-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 2c45f77e8..bc2f34739 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFertile.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFertile.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
-import forestry.api.apiculture.IBeeGenome;
-import forestry.api.apiculture.IBeeHousing;
-import forestry.api.genetics.IEffectData;
-import forestry.core.utils.vect.IVect;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.IGrowable;
import net.minecraft.util.ChunkCoordinates;
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;
+import forestry.core.utils.vect.IVect;
+
public class AlleleEffectFertile extends AlleleEffectThrottled {
private static final int MAX_BLOCK_FIND_TRIES = 5;
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java
index dfcc33ea7..38e102c24 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectFungification.java
@@ -1,12 +1,8 @@
package forestry.apiculture.genetics.alleles;
-import forestry.api.apiculture.IBeeGenome;
-import forestry.api.apiculture.IBeeHousing;
-import forestry.api.genetics.IEffectData;
-import forestry.core.genetics.EffectData;
-import forestry.core.utils.vect.IVect;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityMooshroom;
@@ -15,6 +11,12 @@ import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenBigMushroom;
+import forestry.api.apiculture.IBeeGenome;
+import forestry.api.apiculture.IBeeHousing;
+import forestry.api.genetics.IEffectData;
+import forestry.core.genetics.EffectData;
+import forestry.core.utils.vect.IVect;
+
public class AlleleEffectFungification extends AlleleEffectThrottled {
private static final int MAX_BLOCK_FIND_TRIES = 10;
@@ -105,7 +107,13 @@ public class AlleleEffectFungification extends AlleleEffectThrottled {
mooshroom.renderYawOffset = cow.renderYawOffset;
worldObj.spawnEntityInWorld(mooshroom);
worldObj.spawnParticle(
- "largeexplode", cow.posX, cow.posY + (double) (cow.height / 2.0F), cow.posZ, 0.0D, 0.0D, 0.0D);
+ "largeexplode",
+ cow.posX,
+ cow.posY + (double) (cow.height / 2.0F),
+ cow.posZ,
+ 0.0D,
+ 0.0D,
+ 0.0D);
}
private static void doMushroomGrowth(Block block, World world, int blockX, int blockY, int blockZ) {
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java
index f7d6a2132..e9be0ee72 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectGlacial.java
@@ -1,24 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+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.config.Constants;
import forestry.core.utils.vect.Vect;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-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 a9df650ff..e629f3d97 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectHeroic.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectHeroic.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 java.util.List;
-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");
public AlleleEffectHeroic() {
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java
index c52d607cf..6f4c6e253 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectIgnition.java
@@ -1,26 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import java.util.List;
+
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.util.Vec3;
+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 java.util.List;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
public class AlleleEffectIgnition extends AlleleEffectThrottled {
+
private static final int ignitionChance = 50;
private static final int fireDuration = 500;
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java
index 88d87a38c..f2c135c2b 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectMisanthrope.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 java.util.List;
-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/AlleleEffectNone.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectNone.java
index 3afccb8be..ebc4929ee 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectNone.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectNone.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
public class AlleleEffectNone extends AlleleEffect {
+
public AlleleEffectNone(String valueName, boolean isDominant) {
super(valueName, isDominant);
}
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java
index f347b1b74..4919613e1 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectPotion.java
@@ -1,15 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.potion.PotionHelper;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.ReflectionHelper;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
@@ -17,16 +27,6 @@ import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.IMob;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.potion.PotionHelper;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
public class AlleleEffectPotion extends AlleleEffectThrottled {
@@ -36,8 +36,8 @@ public class AlleleEffectPotion extends AlleleEffectThrottled {
private final int duration;
private final float chance;
- public AlleleEffectPotion(
- String name, boolean isDominant, Potion potion, int duration, int throttle, float chance) {
+ public AlleleEffectPotion(String name, boolean isDominant, Potion potion, int duration, int throttle,
+ float chance) {
super(name, isDominant, throttle, true, false);
this.potion = potion;
this.isBadEffect = isBadEffect(potion);
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java
index f2dbc55a5..43133d34a 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRadioactive.java
@@ -1,15 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
@@ -17,13 +24,6 @@ import forestry.api.genetics.IEffectData;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.core.utils.DamageSourceForestry;
import forestry.core.utils.vect.Vect;
-import java.util.List;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.DamageSource;
-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 b38b2cc06..c550da719 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRepulsion.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectRepulsion.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 java.util.List;
-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 f6707d263..8f4aa1e9e 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectResurrection.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectResurrection.java
@@ -1,23 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
-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 java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.item.EntityItem;
@@ -33,9 +27,16 @@ 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 {
+
public final ItemStack res;
public final Class extends EntityLiving> risen;
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java
index baa9e564d..a5c9a16db 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectSnowing.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumTemperature;
@@ -17,11 +21,6 @@ import forestry.api.genetics.IEffectData;
import forestry.core.config.Constants;
import forestry.core.proxy.Proxies;
import forestry.core.utils.vect.Vect;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public class AlleleEffectSnowing extends AlleleEffectThrottled {
@@ -65,7 +64,11 @@ public class AlleleEffectSnowing extends AlleleEffectThrottled {
int meta = world.getBlockMetadata(posBlock.x, posBlock.y, posBlock.z);
if (meta < 7) {
world.setBlockMetadataWithNotify(
- posBlock.x, posBlock.y, posBlock.z, meta + 1, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
+ posBlock.x,
+ posBlock.y,
+ posBlock.z,
+ meta + 1,
+ Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
}
} else if (block.isReplaceable(world, posBlock.x, posBlock.y, posBlock.z)) {
world.setBlock(
@@ -90,9 +93,7 @@ public class AlleleEffectSnowing extends AlleleEffectThrottled {
ChunkCoordinates coordinates = housing.getCoordinates();
World world = housing.getWorld();
- Vect spawn = Vect.getRandomPositionInArea(world.rand, area)
- .add(coordinates)
- .add(offset);
+ Vect spawn = Vect.getRandomPositionInArea(world.rand, area).add(coordinates).add(offset);
Proxies.render.addEntitySnowFX(world, spawn.x, spawn.y, spawn.z);
return storedData;
} else {
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java
index 384e0069e..af1bc1848 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleEffectThrottled.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
@@ -21,8 +19,8 @@ public abstract class AlleleEffectThrottled extends AlleleEffect {
private final int throttle;
private boolean requiresWorkingQueen = false;
- protected AlleleEffectThrottled(
- String name, boolean isDominant, int throttle, boolean requiresWorking, boolean isCombinable) {
+ protected AlleleEffectThrottled(String name, boolean isDominant, int throttle, boolean requiresWorking,
+ boolean isCombinable) {
super(name, isDominant);
this.throttle = throttle;
this.isCombinable = isCombinable;
diff --git a/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java b/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java
index cef2130fd..2027e6f06 100644
--- a/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java
+++ b/src/main/java/forestry/apiculture/genetics/alleles/AlleleFlowers.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics.alleles;
diff --git a/src/main/java/forestry/apiculture/gui/ContainerAlveary.java b/src/main/java/forestry/apiculture/gui/ContainerAlveary.java
index fbe9a9b0c..ef12124f8 100755
--- a/src/main/java/forestry/apiculture/gui/ContainerAlveary.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerAlveary.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.gui;
+import net.minecraft.entity.player.InventoryPlayer;
+
import forestry.apiculture.multiblock.TileAlveary;
import forestry.core.gui.ContainerTile;
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 5bf50f1fc..edfc80cb6 100755
--- a/src/main/java/forestry/apiculture/gui/ContainerAlvearyHygroregulator.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerAlvearyHygroregulator.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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.SlotFiltered;
-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 4f5a1829a..1c104c06c 100755
--- a/src/main/java/forestry/apiculture/gui/ContainerAlvearySieve.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerAlvearySieve.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 bcfa41b22..66d714d25 100755
--- a/src/main/java/forestry/apiculture/gui/ContainerAlvearySwarmer.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerAlvearySwarmer.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 7b7b1043c..6927707b7 100644
--- a/src/main/java/forestry/apiculture/gui/ContainerBeeHelper.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerBeeHelper.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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) {
+
+ public static void addSlots(ContainerForestry container, T inventory,
+ boolean hasFrames) {
// Queen/Princess
container.addSlotToContainer(new SlotFiltered(inventory, InventoryBeeHousing.SLOT_QUEEN, 29, 39));
diff --git a/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java b/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java
index baf0743e9..d0fd8def2 100644
--- a/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerBeeHousing.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 dcda97aa9..5b5f8d554 100755
--- a/src/main/java/forestry/apiculture/gui/ContainerHabitatLocator.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerHabitatLocator.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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/ContainerImprinter.java b/src/main/java/forestry/apiculture/gui/ContainerImprinter.java
index 439040298..b0d3ea2ad 100755
--- a/src/main/java/forestry/apiculture/gui/ContainerImprinter.java
+++ b/src/main/java/forestry/apiculture/gui/ContainerImprinter.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.gui;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.entity.player.InventoryPlayer;
+
import forestry.apiculture.inventory.ItemInventoryImprinter;
import forestry.apiculture.network.packets.PacketImprintSelectionResponse;
import forestry.core.gui.ContainerItemInventory;
@@ -18,8 +19,6 @@ import forestry.core.gui.slots.SlotFiltered;
import forestry.core.gui.slots.SlotOutput;
import forestry.core.network.packets.PacketGuiSelectRequest;
import forestry.core.proxy.Proxies;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
public class ContainerImprinter extends ContainerItemInventory implements IGuiSelectable {
@@ -48,8 +47,9 @@ public class ContainerImprinter extends ContainerItemInventory
implements IContainerBeeHousing {
+
public ContainerMinecartBeehouse(InventoryPlayer player, EntityMinecartBeeHousingBase entity, boolean hasFrames) {
super(entity, player, 8, 108);
ContainerBeeHelper.addSlots(this, entity, hasFrames);
diff --git a/src/main/java/forestry/apiculture/gui/GuiAlveary.java b/src/main/java/forestry/apiculture/gui/GuiAlveary.java
index e31cab8b2..4b6797ce5 100755
--- a/src/main/java/forestry/apiculture/gui/GuiAlveary.java
+++ b/src/main/java/forestry/apiculture/gui/GuiAlveary.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 {
@@ -29,8 +28,7 @@ public class GuiAlveary extends GuiForestryTitled
protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
- IAlvearyControllerInternal alvearyController =
- inventory.getMultiblockLogic().getController();
+ IAlvearyControllerInternal alvearyController = inventory.getMultiblockLogic().getController();
drawHealthMeter(
guiLeft + 20,
guiTop + 37,
diff --git a/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java b/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java
index 87060fd84..ef14815b0 100755
--- a/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java
+++ b/src/main/java/forestry/apiculture/gui/GuiAlvearyHygroregulator.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 bac6e66f5..92141a841 100755
--- a/src/main/java/forestry/apiculture/gui/GuiAlvearySieve.java
+++ b/src/main/java/forestry/apiculture/gui/GuiAlvearySieve.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 5bca6cacd..271cb97a4 100755
--- a/src/main/java/forestry/apiculture/gui/GuiAlvearySwarmer.java
+++ b/src/main/java/forestry/apiculture/gui/GuiAlvearySwarmer.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 677313264..86b898a42 100644
--- a/src/main/java/forestry/apiculture/gui/GuiBeeHousing.java
+++ b/src/main/java/forestry/apiculture/gui/GuiBeeHousing.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 {
public enum Icon {
+
APIARY("/apiary.png"),
BEE_HOUSE("/alveary.png");
diff --git a/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java b/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java
index c7670f4ad..eef3cab55 100755
--- a/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java
+++ b/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.gui;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.*;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAlleleInteger;
@@ -22,9 +25,6 @@ import forestry.core.gui.GuiAlyzer;
import forestry.core.gui.widgets.ItemStackWidget;
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginApiculture;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class GuiBeealyzer extends GuiAlyzer {
@@ -99,9 +99,11 @@ public class GuiBeealyzer extends GuiAlyzer {
textLayout.newLine();
{
- String customPrimaryBeeKey = "bees.custom.beealyzer." + type.getName() + "."
+ String customPrimaryBeeKey = "bees.custom.beealyzer." + type.getName()
+ + "."
+ bee.getGenome().getPrimary().getUnlocalizedName().replace("bees.species.", "");
- String customSecondaryBeeKey = "bees.custom.beealyzer." + type.getName() + "."
+ String customSecondaryBeeKey = "bees.custom.beealyzer." + type.getName()
+ + "."
+ bee.getGenome().getSecondary().getUnlocalizedName().replace("bees.species.", "");
drawSpeciesRow(
@@ -124,8 +126,8 @@ public class GuiBeealyzer extends GuiAlyzer {
textLayout.drawLine(StringUtil.localize("gui.fertility"), COLUMN_0);
IAlleleInteger primaryFertility = (IAlleleInteger) bee.getGenome().getActiveAllele(EnumBeeChromosome.FERTILITY);
- IAlleleInteger secondaryFertility =
- (IAlleleInteger) bee.getGenome().getInactiveAllele(EnumBeeChromosome.FERTILITY);
+ IAlleleInteger secondaryFertility = (IAlleleInteger) bee.getGenome()
+ .getInactiveAllele(EnumBeeChromosome.FERTILITY);
drawFertilityInfo(primaryFertility.getValue(), COLUMN_1, getColorCoding(primaryFertility.isDominant()), 0);
drawFertilityInfo(secondaryFertility.getValue(), COLUMN_2, getColorCoding(secondaryFertility.isDominant()), 0);
textLayout.newLine();
@@ -150,19 +152,17 @@ public class GuiBeealyzer extends GuiAlyzer {
drawRow(
StringUtil.localize("gui.climate"),
- AlleleManager.climateHelper.toDisplay(
- bee.getGenome().getPrimary().getTemperature()),
- AlleleManager.climateHelper.toDisplay(
- bee.getGenome().getSecondary().getTemperature()),
+ 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);
+ IAlleleTolerance tempToleranceActive = (IAlleleTolerance) bee.getGenome()
+ .getActiveAllele(EnumBeeChromosome.TEMPERATURE_TOLERANCE);
+ IAlleleTolerance tempToleranceInactive = (IAlleleTolerance) bee.getGenome()
+ .getInactiveAllele(EnumBeeChromosome.TEMPERATURE_TOLERANCE);
textLayout.drawLine(" " + StringUtil.localize("gui.tolerance"), COLUMN_0);
drawToleranceInfo(tempToleranceActive, COLUMN_1);
drawToleranceInfo(tempToleranceInactive, COLUMN_2);
@@ -171,19 +171,17 @@ public class GuiBeealyzer extends GuiAlyzer {
drawRow(
StringUtil.localize("gui.humidity"),
- AlleleManager.climateHelper.toDisplay(
- bee.getGenome().getPrimary().getHumidity()),
- AlleleManager.climateHelper.toDisplay(
- bee.getGenome().getSecondary().getHumidity()),
+ 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);
+ IAlleleTolerance humidToleranceActive = (IAlleleTolerance) bee.getGenome()
+ .getActiveAllele(EnumBeeChromosome.HUMIDITY_TOLERANCE);
+ IAlleleTolerance humidToleranceInactive = (IAlleleTolerance) bee.getGenome()
+ .getInactiveAllele(EnumBeeChromosome.HUMIDITY_TOLERANCE);
textLayout.drawLine(" " + StringUtil.localize("gui.tolerance"), COLUMN_0);
drawToleranceInfo(humidToleranceActive, COLUMN_1);
drawToleranceInfo(humidToleranceInactive, COLUMN_2);
diff --git a/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java b/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java
index 45ec79e17..811eb2fd9 100755
--- a/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java
+++ b/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java
@@ -1,20 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.gui;
-import com.google.common.collect.LinkedListMultimap;
-import forestry.apiculture.gui.widgets.HabitatSlot;
-import forestry.apiculture.inventory.ItemInventoryHabitatLocator;
-import forestry.core.config.Constants;
-import forestry.core.gui.GuiForestry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -22,13 +15,23 @@ import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.StatCollector;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
+
import org.lwjgl.opengl.GL11;
+import com.google.common.collect.LinkedListMultimap;
+
+import forestry.apiculture.gui.widgets.HabitatSlot;
+import forestry.apiculture.inventory.ItemInventoryHabitatLocator;
+import forestry.core.config.Constants;
+import forestry.core.gui.GuiForestry;
+
public class GuiHabitatLocator extends GuiForestry {
+
private static final LinkedListMultimap habitats = LinkedListMultimap.create();
static {
@@ -80,10 +83,12 @@ public class GuiHabitatLocator extends GuiForestry activeBiomeTypes = EnumSet.noneOf(BiomeDictionary.Type.class);
diff --git a/src/main/java/forestry/apiculture/gui/GuiImprinter.java b/src/main/java/forestry/apiculture/gui/GuiImprinter.java
index 8bc2adb16..f9be6bee6 100755
--- a/src/main/java/forestry/apiculture/gui/GuiImprinter.java
+++ b/src/main/java/forestry/apiculture/gui/GuiImprinter.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.gui;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.apiculture.genetics.BeeGenome;
import forestry.apiculture.inventory.ItemInventoryImprinter;
@@ -20,12 +26,6 @@ import forestry.core.network.packets.PacketGuiSelectRequest;
import forestry.core.proxy.Proxies;
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginApiculture;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
public class GuiImprinter extends GuiForestry {
@@ -82,8 +82,8 @@ public class GuiImprinter extends GuiForestry= xPos[l] && i <= xPos[l] + 16 && j >= yPos[l] && j <= yPos[l] + 16) {
diff --git a/src/main/java/forestry/apiculture/gui/IContainerBeeHousing.java b/src/main/java/forestry/apiculture/gui/IContainerBeeHousing.java
index f3dadd359..b791f3ecc 100644
--- a/src/main/java/forestry/apiculture/gui/IContainerBeeHousing.java
+++ b/src/main/java/forestry/apiculture/gui/IContainerBeeHousing.java
@@ -1,13 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.gui;
-public interface IContainerBeeHousing {}
+public interface IContainerBeeHousing {
+}
diff --git a/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java b/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java
index a0419f464..f13dc6759 100644
--- a/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java
+++ b/src/main/java/forestry/apiculture/gui/IGuiBeeHousingInventory.java
@@ -1,19 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 */
int getHealthScaled(int i);
}
diff --git a/src/main/java/forestry/apiculture/gui/widgets/HabitatSlot.java b/src/main/java/forestry/apiculture/gui/widgets/HabitatSlot.java
index abd1c14ca..73f14e044 100644
--- a/src/main/java/forestry/apiculture/gui/widgets/HabitatSlot.java
+++ b/src/main/java/forestry/apiculture/gui/widgets/HabitatSlot.java
@@ -1,36 +1,38 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.gui.widgets;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Locale;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.IIcon;
+import net.minecraftforge.common.BiomeDictionary;
+
+import org.lwjgl.opengl.GL11;
+
import forestry.core.gui.widgets.Widget;
import forestry.core.gui.widgets.WidgetManager;
import forestry.core.proxy.Proxies;
import forestry.core.render.SpriteSheet;
import forestry.core.render.TextureManager;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Locale;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.common.BiomeDictionary;
-import org.lwjgl.opengl.GL11;
public class HabitatSlot extends Widget {
+
private final Collection biomes;
private final String name;
private final String iconIndex;
public boolean isActive = false;
- public HabitatSlot(
- WidgetManager widgetManager, int xPos, int yPos, String name, Collection biomes) {
+ public HabitatSlot(WidgetManager widgetManager, int xPos, int yPos, String name,
+ Collection biomes) {
super(widgetManager, xPos, yPos);
this.biomes = biomes;
this.name = name;
diff --git a/src/main/java/forestry/apiculture/inventory/IApiaryInventory.java b/src/main/java/forestry/apiculture/inventory/IApiaryInventory.java
index 6fcd2d81b..00a8c82cc 100644
--- a/src/main/java/forestry/apiculture/inventory/IApiaryInventory.java
+++ b/src/main/java/forestry/apiculture/inventory/IApiaryInventory.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.inventory;
@@ -14,5 +12,6 @@ import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeeHousingInventory;
public interface IApiaryInventory extends IBeeHousingInventory {
+
void wearOutFrames(IBeeHousing beeHousing, int amount);
}
diff --git a/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java b/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java
index 4b3497343..e54635c9d 100644
--- a/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java
+++ b/src/main/java/forestry/apiculture/inventory/InventoryAlvearySieve.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.inventory;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.apiculture.multiblock.TileAlvearySieve;
import forestry.core.inventory.InventoryAdapterTile;
import forestry.core.inventory.watchers.ISlotPickupWatcher;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginCore;
-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;
public static final int SLOTS_POLLEN_COUNT = 4;
public static final int SLOT_SIEVE = 4;
diff --git a/src/main/java/forestry/apiculture/inventory/InventoryApiary.java b/src/main/java/forestry/apiculture/inventory/InventoryApiary.java
index 6e69e540e..e67efc47e 100644
--- a/src/main/java/forestry/apiculture/inventory/InventoryApiary.java
+++ b/src/main/java/forestry/apiculture/inventory/InventoryApiary.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.inventory;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeHousing;
@@ -18,12 +22,9 @@ import forestry.api.apiculture.IHiveFrame;
import forestry.apiculture.InventoryBeeHousing;
import forestry.core.access.IAccessHandler;
import forestry.core.utils.SlotUtil;
-import java.util.ArrayList;
-import java.util.Collection;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
public class InventoryApiary extends InventoryBeeHousing implements IApiaryInventory {
+
public static final int SLOT_FRAMES_1 = 9;
public static final int SLOT_FRAMES_COUNT = 3;
diff --git a/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java b/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java
index 49747b10f..f3b24c8ed 100644
--- a/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java
+++ b/src/main/java/forestry/apiculture/inventory/InventoryHygroregulator.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.inventory;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+
import forestry.apiculture.multiblock.TileAlvearyHygroregulator;
import forestry.core.fluids.FluidHelper;
import forestry.core.inventory.InventoryAdapterTile;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
public class InventoryHygroregulator extends InventoryAdapterTile {
+
public static final short SLOT_INPUT = 0;
public InventoryHygroregulator(TileAlvearyHygroregulator alvearyHygroregulator) {
diff --git a/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java b/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java
index f375bd5a7..0172542bf 100644
--- a/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java
+++ b/src/main/java/forestry/apiculture/inventory/InventorySwarmer.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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) {
super(alvearySwarmer, 4, "SwarmInv");
}
diff --git a/src/main/java/forestry/apiculture/inventory/ItemInventoryBeealyzer.java b/src/main/java/forestry/apiculture/inventory/ItemInventoryBeealyzer.java
index cfa6e693e..be88ec8c1 100644
--- a/src/main/java/forestry/apiculture/inventory/ItemInventoryBeealyzer.java
+++ b/src/main/java/forestry/apiculture/inventory/ItemInventoryBeealyzer.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.inventory;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.BeeManager;
import forestry.core.config.Config;
import forestry.core.gui.IHintSource;
import forestry.core.inventory.ItemInventoryAlyzer;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class ItemInventoryBeealyzer extends ItemInventoryAlyzer implements IHintSource {
diff --git a/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java b/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java
index 62c460750..5f35e2940 100644
--- a/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java
+++ b/src/main/java/forestry/apiculture/inventory/ItemInventoryHabitatLocator.java
@@ -1,16 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.inventory;
+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.BiomeGenBase;
+
import com.google.common.collect.ImmutableSet;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBee;
import forestry.api.core.IErrorSource;
@@ -22,12 +29,6 @@ import forestry.core.errors.EnumErrorCode;
import forestry.core.gui.IHintSource;
import forestry.core.inventory.ItemInventory;
import forestry.plugins.PluginApiculture;
-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.BiomeGenBase;
public class ItemInventoryHabitatLocator extends ItemInventory implements IErrorSource, IHintSource {
diff --git a/src/main/java/forestry/apiculture/inventory/ItemInventoryImprinter.java b/src/main/java/forestry/apiculture/inventory/ItemInventoryImprinter.java
index a3807df01..e0ee318aa 100644
--- a/src/main/java/forestry/apiculture/inventory/ItemInventoryImprinter.java
+++ b/src/main/java/forestry/apiculture/inventory/ItemInventoryImprinter.java
@@ -1,25 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.inventory;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBee;
import forestry.apiculture.genetics.Bee;
import forestry.core.inventory.ItemInventory;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class ItemInventoryImprinter extends ItemInventory {
+
private static final short specimenSlot = 0;
private static final short imprintedSlot = 1;
@@ -63,35 +63,20 @@ public class ItemInventoryImprinter extends ItemInventory {
}
public IAlleleBeeSpecies getPrimary() {
- return BeeManager.beeRoot
- .getIndividualTemplates()
- .get(primaryIndex)
- .getGenome()
- .getPrimary();
+ return BeeManager.beeRoot.getIndividualTemplates().get(primaryIndex).getGenome().getPrimary();
}
public IAlleleBeeSpecies getSecondary() {
- return BeeManager.beeRoot
- .getIndividualTemplates()
- .get(secondaryIndex)
- .getGenome()
- .getPrimary();
+ return BeeManager.beeRoot.getIndividualTemplates().get(secondaryIndex).getGenome().getPrimary();
}
public IBee getSelectedBee() {
- return new Bee(BeeManager.beeRoot.templateAsGenome(
- BeeManager.beeRoot
- .getGenomeTemplates()
- .get(BeeManager.beeRoot
- .getIndividualTemplates()
- .get(primaryIndex)
- .getIdent()),
- BeeManager.beeRoot
- .getGenomeTemplates()
- .get(BeeManager.beeRoot
- .getIndividualTemplates()
- .get(secondaryIndex)
- .getIdent())));
+ return new Bee(
+ BeeManager.beeRoot.templateAsGenome(
+ BeeManager.beeRoot.getGenomeTemplates()
+ .get(BeeManager.beeRoot.getIndividualTemplates().get(primaryIndex).getIdent()),
+ BeeManager.beeRoot.getGenomeTemplates()
+ .get(BeeManager.beeRoot.getIndividualTemplates().get(secondaryIndex).getIdent())));
}
public int getPrimaryIndex() {
diff --git a/src/main/java/forestry/apiculture/items/EnumHoneyComb.java b/src/main/java/forestry/apiculture/items/EnumHoneyComb.java
index e487189e5..8247666c6 100644
--- a/src/main/java/forestry/apiculture/items/EnumHoneyComb.java
+++ b/src/main/java/forestry/apiculture/items/EnumHoneyComb.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
@@ -14,6 +12,7 @@ import java.awt.Color;
import java.util.Locale;
public enum EnumHoneyComb {
+
HONEY(new Color(0xe8d56a), new Color(0xffa12b)),
COCOA(new Color(0x674016), new Color(0xffb62b), true),
SIMMERING(new Color(0x981919), new Color(0xffb62b)),
diff --git a/src/main/java/forestry/apiculture/items/EnumHoneyDrop.java b/src/main/java/forestry/apiculture/items/EnumHoneyDrop.java
index 8dd705db2..90e2bcaf5 100644
--- a/src/main/java/forestry/apiculture/items/EnumHoneyDrop.java
+++ b/src/main/java/forestry/apiculture/items/EnumHoneyDrop.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import forestry.core.items.ItemOverlay;
import java.awt.Color;
import java.util.Locale;
+import forestry.core.items.ItemOverlay;
+
public enum EnumHoneyDrop implements ItemOverlay.IOverlayInfo {
+
HONEY(new Color(0xecb42d), new Color(0xe8c814)),
CHARGED(new Color(0x800505), new Color(0x9c0707), true),
OMEGA(new Color(0x191919), new Color(0x4a8ca7), true);
diff --git a/src/main/java/forestry/apiculture/items/EnumPollenCluster.java b/src/main/java/forestry/apiculture/items/EnumPollenCluster.java
index 6d4e04c38..03f7a02b2 100644
--- a/src/main/java/forestry/apiculture/items/EnumPollenCluster.java
+++ b/src/main/java/forestry/apiculture/items/EnumPollenCluster.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import forestry.core.items.ItemOverlay;
import java.awt.Color;
import java.util.Locale;
+import forestry.core.items.ItemOverlay;
+
public enum EnumPollenCluster implements ItemOverlay.IOverlayInfo {
+
NORMAL(new Color(0xa28a25), new Color(0xa28a25)),
CRYSTALLINE(new Color(0xffffff), new Color(0xc5feff));
diff --git a/src/main/java/forestry/apiculture/items/EnumPropolis.java b/src/main/java/forestry/apiculture/items/EnumPropolis.java
index a25e0e72d..1d17f5877 100644
--- a/src/main/java/forestry/apiculture/items/EnumPropolis.java
+++ b/src/main/java/forestry/apiculture/items/EnumPropolis.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import forestry.core.items.ItemOverlay;
import java.awt.Color;
import java.util.Locale;
+import forestry.core.items.ItemOverlay;
+
public enum EnumPropolis implements ItemOverlay.IOverlayInfo {
+
NORMAL(new Color(0xc5b24e)),
STICKY(new Color(0xc68e57)),
PULSATING(new Color(0x2ccdb1), true),
diff --git a/src/main/java/forestry/apiculture/items/HabitatLocatorLogic.java b/src/main/java/forestry/apiculture/items/HabitatLocatorLogic.java
index 2696fe978..7b3630616 100644
--- a/src/main/java/forestry/apiculture/items/HabitatLocatorLogic.java
+++ b/src/main/java/forestry/apiculture/items/HabitatLocatorLogic.java
@@ -1,23 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import forestry.api.apiculture.IBee;
-import forestry.apiculture.network.packets.PacketHabitatBiomePointer;
-import forestry.core.proxy.Proxies;
-import forestry.core.utils.vect.Vect;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
+
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -26,7 +21,13 @@ import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
+import forestry.api.apiculture.IBee;
+import forestry.apiculture.network.packets.PacketHabitatBiomePointer;
+import forestry.core.proxy.Proxies;
+import forestry.core.utils.vect.Vect;
+
public class HabitatLocatorLogic {
+
private static final int maxChecksPerTick = 100;
private static final int maxSearchRadiusIterations = 500;
private static final int spacing = 20;
@@ -148,8 +149,8 @@ public class HabitatLocatorLogic {
return null;
}
- private static ChunkCoordinates getChunkCoordinates(
- Vect pos, World world, Collection biomesToSearch) {
+ private static ChunkCoordinates getChunkCoordinates(Vect pos, World world,
+ Collection biomesToSearch) {
BiomeGenBase biome;
biome = world.getBiomeGenForCoords(pos.x, pos.z);
diff --git a/src/main/java/forestry/apiculture/items/ItemArmorApiarist.java b/src/main/java/forestry/apiculture/items/ItemArmorApiarist.java
index 71c1375f9..86c23f140 100755
--- a/src/main/java/forestry/apiculture/items/ItemArmorApiarist.java
+++ b/src/main/java/forestry/apiculture/items/ItemArmorApiarist.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.IArmorApiarist;
@@ -19,13 +25,6 @@ import forestry.core.config.Constants;
import forestry.core.render.TextureManager;
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginApiculture;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
public class ItemArmorApiarist extends ItemArmor implements IArmorApiarist, IArmorNaturalist {
diff --git a/src/main/java/forestry/apiculture/items/ItemBeeGE.java b/src/main/java/forestry/apiculture/items/ItemBeeGE.java
index a1e627763..cd37b5915 100755
--- a/src/main/java/forestry/apiculture/items/ItemBeeGE.java
+++ b/src/main/java/forestry/apiculture/items/ItemBeeGE.java
@@ -1,15 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.BeeManager;
@@ -25,14 +33,6 @@ import forestry.apiculture.genetics.BeeGenome;
import forestry.core.config.Config;
import forestry.core.genetics.ItemGE;
import forestry.core.utils.StringUtil;
-import java.util.List;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
public class ItemBeeGE extends ItemGE {
@@ -74,7 +74,8 @@ public class ItemBeeGE extends ItemGE {
}
IBee individual = BeeManager.beeRoot.getMember(itemstack);
- String customBeeKey = "bees.custom." + type.getName() + "."
+ String customBeeKey = "bees.custom." + type.getName()
+ + "."
+ individual.getGenome().getPrimary().getUnlocalizedName().replace("bees.species.", "");
if (StringUtil.canTranslate(customBeeKey)) {
return StringUtil.localize(customBeeKey);
@@ -85,7 +86,7 @@ public class ItemBeeGE extends ItemGE {
return beeGrammar.replaceAll("%SPECIES", beeSpecies).replaceAll("%TYPE", beeType);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
if (!itemstack.hasTagCompound()) {
@@ -95,9 +96,9 @@ public class ItemBeeGE extends ItemGE {
if (type != EnumBeeType.DRONE) {
IBee individual = BeeManager.beeRoot.getMember(itemstack);
if (individual.isNatural()) {
- list.add(EnumChatFormatting.YELLOW
- + EnumChatFormatting.ITALIC.toString()
- + StringUtil.localize("bees.stock.pristine"));
+ list.add(
+ EnumChatFormatting.YELLOW + EnumChatFormatting.ITALIC.toString()
+ + StringUtil.localize("bees.stock.pristine"));
} else {
list.add(EnumChatFormatting.YELLOW + StringUtil.localize("bees.stock.ignoble"));
}
@@ -112,7 +113,7 @@ public class ItemBeeGE extends ItemGE {
addCreativeItems(itemList, true);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void addCreativeItems(List itemList, boolean hideSecrets) {
for (IBee bee : BeeManager.beeRoot.getIndividualTemplates()) {
// Don't show secret bees unless ordered to.
@@ -161,8 +162,7 @@ public class ItemBeeGE extends ItemGE {
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister register) {
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleBeeSpecies) {
((IAlleleBeeSpecies) allele).getIconProvider().registerIcons(register);
}
diff --git a/src/main/java/forestry/apiculture/items/ItemBeealyzer.java b/src/main/java/forestry/apiculture/items/ItemBeealyzer.java
index 14bf04ca4..e7a8ed41c 100644
--- a/src/main/java/forestry/apiculture/items/ItemBeealyzer.java
+++ b/src/main/java/forestry/apiculture/items/ItemBeealyzer.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.api.core.Tabs;
import forestry.apiculture.gui.GuiBeealyzer;
import forestry.apiculture.inventory.ItemInventoryBeealyzer;
import forestry.core.gui.ContainerAlyzer;
import forestry.core.items.ItemWithGui;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class ItemBeealyzer extends ItemWithGui {
+
public ItemBeealyzer() {
setCreativeTab(Tabs.tabApiculture);
}
diff --git a/src/main/java/forestry/apiculture/items/ItemBlockCandle.java b/src/main/java/forestry/apiculture/items/ItemBlockCandle.java
index cab02f201..802547aab 100644
--- a/src/main/java/forestry/apiculture/items/ItemBlockCandle.java
+++ b/src/main/java/forestry/apiculture/items/ItemBlockCandle.java
@@ -1,23 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.apiculture.blocks.BlockCandle;
import forestry.core.items.ItemBlockForestry;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.IIcon;
public class ItemBlockCandle extends ItemBlockForestry {
diff --git a/src/main/java/forestry/apiculture/items/ItemHabitatLocator.java b/src/main/java/forestry/apiculture/items/ItemHabitatLocator.java
index 4b629b003..3808ba8f1 100644
--- a/src/main/java/forestry/apiculture/items/ItemHabitatLocator.java
+++ b/src/main/java/forestry/apiculture/items/ItemHabitatLocator.java
@@ -1,15 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.client.renderer.texture.TextureAtlasSprite;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.EnumHumidity;
@@ -22,17 +31,9 @@ import forestry.apiculture.inventory.ItemInventoryHabitatLocator;
import forestry.apiculture.render.TextureHabitatLocator;
import forestry.core.items.ItemWithGui;
import forestry.core.utils.StringUtil;
-import java.util.List;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.client.renderer.texture.TextureAtlasSprite;
-import net.minecraft.client.renderer.texture.TextureMap;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public class ItemHabitatLocator extends ItemWithGui {
+
private static final String iconName = "forestry:biomefinder";
private final HabitatLocatorLogic locatorLogic;
@@ -65,13 +66,13 @@ public class ItemHabitatLocator extends ItemWithGui {
}
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
BiomeGenBase currentBiome = player.worldObj.getBiomeGenForCoords((int) player.posX, (int) player.posZ);
- float temperatureValue =
- currentBiome.getFloatTemperature((int) player.posX, (int) player.posY, (int) player.posZ);
+ float temperatureValue = currentBiome
+ .getFloatTemperature((int) player.posX, (int) player.posY, (int) player.posZ);
EnumTemperature temperature = EnumTemperature.getFromValue(temperatureValue);
EnumHumidity humidity = EnumHumidity.getFromValue(currentBiome.rainfall);
diff --git a/src/main/java/forestry/apiculture/items/ItemHiveFrame.java b/src/main/java/forestry/apiculture/items/ItemHiveFrame.java
index 0753a2dea..25bdb4943 100755
--- a/src/main/java/forestry/apiculture/items/ItemHiveFrame.java
+++ b/src/main/java/forestry/apiculture/items/ItemHiveFrame.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.DefaultBeeModifier;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome;
@@ -18,7 +18,6 @@ import forestry.api.apiculture.IBeeModifier;
import forestry.api.apiculture.IHiveFrame;
import forestry.api.core.Tabs;
import forestry.core.items.ItemForestry;
-import net.minecraft.item.ItemStack;
public class ItemHiveFrame extends ItemForestry implements IHiveFrame {
@@ -48,6 +47,7 @@ public class ItemHiveFrame extends ItemForestry implements IHiveFrame {
}
private static class HiveFrameBeeModifier extends DefaultBeeModifier {
+
private final float geneticDecay;
public HiveFrameBeeModifier(float geneticDecay) {
diff --git a/src/main/java/forestry/apiculture/items/ItemHoneycomb.java b/src/main/java/forestry/apiculture/items/ItemHoneycomb.java
index c1d32cb2e..0abac1f5f 100755
--- a/src/main/java/forestry/apiculture/items/ItemHoneycomb.java
+++ b/src/main/java/forestry/apiculture/items/ItemHoneycomb.java
@@ -1,26 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import forestry.api.core.Tabs;
-import forestry.core.config.Config;
-import forestry.core.items.ItemForestryMultiPass;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import forestry.api.core.Tabs;
+import forestry.core.config.Config;
+import forestry.core.items.ItemForestryMultiPass;
+
public class ItemHoneycomb extends ItemForestryMultiPass {
+
public ItemHoneycomb() {
super();
setMaxDamage(0);
@@ -54,7 +55,7 @@ public class ItemHoneycomb extends ItemForestryMultiPass {
}
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
for (int i = 0; i < EnumHoneyComb.VALUES.length; i++) {
diff --git a/src/main/java/forestry/apiculture/items/ItemImprinter.java b/src/main/java/forestry/apiculture/items/ItemImprinter.java
index d0c6de395..1f4453432 100644
--- a/src/main/java/forestry/apiculture/items/ItemImprinter.java
+++ b/src/main/java/forestry/apiculture/items/ItemImprinter.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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() {
setCreativeTab(Tabs.tabApiculture);
}
diff --git a/src/main/java/forestry/apiculture/items/ItemMinecartBeehouse.java b/src/main/java/forestry/apiculture/items/ItemMinecartBeehouse.java
index 64b1c3aca..d11d35d6a 100644
--- a/src/main/java/forestry/apiculture/items/ItemMinecartBeehouse.java
+++ b/src/main/java/forestry/apiculture/items/ItemMinecartBeehouse.java
@@ -1,22 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.apiculture.entities.EntityMinecartApiary;
-import forestry.apiculture.entities.EntityMinecartBeeHousingBase;
-import forestry.apiculture.entities.EntityMinecartBeehouse;
-import forestry.core.render.TextureManager;
import java.util.List;
+
import net.minecraft.block.BlockDispenser;
import net.minecraft.block.BlockRailBase;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -28,8 +21,16 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.apiculture.entities.EntityMinecartApiary;
+import forestry.apiculture.entities.EntityMinecartBeeHousingBase;
+import forestry.apiculture.entities.EntityMinecartBeehouse;
+import forestry.core.render.TextureManager;
+
public class ItemMinecartBeehouse extends ItemMinecart {
- private final String[] definition = new String[] {"cart.beehouse", "cart.apiary"};
+
+ private final String[] definition = new String[] { "cart.beehouse", "cart.apiary" };
public ItemMinecartBeehouse() {
super(0);
@@ -39,17 +40,8 @@ public class ItemMinecartBeehouse extends ItemMinecart {
}
@Override
- public boolean onItemUse(
- ItemStack itemStack,
- EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int side,
- float facingX,
- float facingY,
- float facingZ) {
+ public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side,
+ float facingX, float facingY, float facingZ) {
if (!BlockRailBase.func_150051_a(world.getBlock(x, y, z))) {
return false;
}
@@ -58,10 +50,16 @@ public class ItemMinecartBeehouse extends ItemMinecart {
EntityMinecartBeeHousingBase entityMinecart;
if (itemStack.getItemDamage() == 0) {
entityMinecart = new EntityMinecartBeehouse(
- world, (double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F));
+ world,
+ (double) ((float) x + 0.5F),
+ (double) ((float) y + 0.5F),
+ (double) ((float) z + 0.5F));
} else {
entityMinecart = new EntityMinecartApiary(
- world, (double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F));
+ world,
+ (double) ((float) x + 0.5F),
+ (double) ((float) y + 0.5F),
+ (double) ((float) z + 0.5F));
}
entityMinecart.setOwner(player.getGameProfile());
@@ -107,7 +105,7 @@ public class ItemMinecartBeehouse extends ItemMinecart {
}
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
for (int i = 0; i < definition.length; i++) {
diff --git a/src/main/java/forestry/apiculture/items/ItemPollenCluster.java b/src/main/java/forestry/apiculture/items/ItemPollenCluster.java
index 09b059113..fe85fb601 100644
--- a/src/main/java/forestry/apiculture/items/ItemPollenCluster.java
+++ b/src/main/java/forestry/apiculture/items/ItemPollenCluster.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import forestry.api.core.Tabs;
-import forestry.core.items.ItemOverlay;
import net.minecraft.item.ItemStack;
+import forestry.api.core.Tabs;
+import forestry.core.items.ItemOverlay;
+
public class ItemPollenCluster extends ItemOverlay {
+
public ItemPollenCluster() {
super(Tabs.tabApiculture, EnumPollenCluster.VALUES);
}
diff --git a/src/main/java/forestry/apiculture/items/ItemPropolis.java b/src/main/java/forestry/apiculture/items/ItemPropolis.java
index dfd124e3b..bab122acd 100644
--- a/src/main/java/forestry/apiculture/items/ItemPropolis.java
+++ b/src/main/java/forestry/apiculture/items/ItemPropolis.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
-import forestry.api.core.Tabs;
-import forestry.core.items.ItemOverlay;
import net.minecraft.item.ItemStack;
+import forestry.api.core.Tabs;
+import forestry.core.items.ItemOverlay;
+
public class ItemPropolis extends ItemOverlay {
+
public ItemPropolis() {
super(Tabs.tabApiculture, EnumPropolis.VALUES);
}
diff --git a/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java b/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java
index 3e55e407b..7223aecfd 100644
--- a/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java
+++ b/src/main/java/forestry/apiculture/items/ItemRegistryApiculture.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import net.minecraftforge.oredict.OreDictionary;
+
import forestry.api.apiculture.EnumBeeType;
import forestry.api.core.Tabs;
import forestry.core.items.ItemForestry;
import forestry.core.items.ItemOverlay;
import forestry.core.items.ItemRegistry;
import forestry.core.items.ItemScoop;
-import net.minecraftforge.oredict.OreDictionary;
public class ItemRegistryApiculture extends ItemRegistry {
+
public final ItemBeeGE beeQueenGE;
public final ItemBeeGE beeDroneGE;
public final ItemBeeGE beePrincessGE;
diff --git a/src/main/java/forestry/apiculture/items/ItemWaxCast.java b/src/main/java/forestry/apiculture/items/ItemWaxCast.java
index 24daf4d2b..dc63f882c 100755
--- a/src/main/java/forestry/apiculture/items/ItemWaxCast.java
+++ b/src/main/java/forestry/apiculture/items/ItemWaxCast.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.items;
+import net.minecraft.item.ItemStack;
+
import forestry.api.core.Tabs;
import forestry.core.items.ICraftingPlan;
import forestry.core.items.ItemForestry;
-import net.minecraft.item.ItemStack;
public class ItemWaxCast extends ItemForestry implements ICraftingPlan {
diff --git a/src/main/java/forestry/apiculture/multiblock/AlvearyController.java b/src/main/java/forestry/apiculture/multiblock/AlvearyController.java
index d0adbec31..19a82def1 100644
--- a/src/main/java/forestry/apiculture/multiblock/AlvearyController.java
+++ b/src/main/java/forestry/apiculture/multiblock/AlvearyController.java
@@ -1,16 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import net.minecraft.block.Block;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.StatCollector;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeHousingInventory;
import forestry.api.apiculture.IBeeListener;
@@ -34,17 +46,6 @@ import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.proxy.Proxies;
import forestry.core.utils.BlockUtil;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import net.minecraft.block.Block;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.StatCollector;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public class AlvearyController extends RectangularMultiblockControllerBase
implements IAlvearyControllerInternal, IClimateControlled {
@@ -275,14 +276,14 @@ public class AlvearyController extends RectangularMultiblockControllerBase
fxY += upSpread;
// display fx on all 4 sides
- Proxies.render.addEntitySwarmFX(
- worldObj, (fxX - distanceFromCenter), fxY, (fxZ + leftRightSpreadFromCenter));
- Proxies.render.addEntitySwarmFX(
- worldObj, (fxX + distanceFromCenter), fxY, (fxZ + leftRightSpreadFromCenter));
- Proxies.render.addEntitySwarmFX(
- worldObj, (fxX + leftRightSpreadFromCenter), fxY, (fxZ - distanceFromCenter));
- Proxies.render.addEntitySwarmFX(
- worldObj, (fxX + leftRightSpreadFromCenter), fxY, (fxZ + distanceFromCenter));
+ Proxies.render
+ .addEntitySwarmFX(worldObj, (fxX - distanceFromCenter), fxY, (fxZ + leftRightSpreadFromCenter));
+ Proxies.render
+ .addEntitySwarmFX(worldObj, (fxX + distanceFromCenter), fxY, (fxZ + leftRightSpreadFromCenter));
+ Proxies.render
+ .addEntitySwarmFX(worldObj, (fxX + leftRightSpreadFromCenter), fxY, (fxZ - distanceFromCenter));
+ Proxies.render
+ .addEntitySwarmFX(worldObj, (fxX + leftRightSpreadFromCenter), fxY, (fxZ + distanceFromCenter));
}
}
}
diff --git a/src/main/java/forestry/apiculture/multiblock/AlvearyMultiblockSizeLimits.java b/src/main/java/forestry/apiculture/multiblock/AlvearyMultiblockSizeLimits.java
index bb4d48a4d..e3f99a30e 100644
--- a/src/main/java/forestry/apiculture/multiblock/AlvearyMultiblockSizeLimits.java
+++ b/src/main/java/forestry/apiculture/multiblock/AlvearyMultiblockSizeLimits.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
diff --git a/src/main/java/forestry/apiculture/multiblock/FakeAlvearyController.java b/src/main/java/forestry/apiculture/multiblock/FakeAlvearyController.java
index a327aa77e..9c7dfdf30 100644
--- a/src/main/java/forestry/apiculture/multiblock/FakeAlvearyController.java
+++ b/src/main/java/forestry/apiculture/multiblock/FakeAlvearyController.java
@@ -1,16 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
+import java.util.Collections;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.biome.BiomeGenBase;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.apiculture.IBeeHousingInventory;
import forestry.api.apiculture.IBeeListener;
import forestry.api.apiculture.IBeeModifier;
@@ -19,13 +25,9 @@ import forestry.apiculture.FakeBeekeepingLogic;
import forestry.core.inventory.FakeInventoryAdapter;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.multiblock.FakeMultiblockController;
-import java.util.Collections;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.biome.BiomeGenBase;
public class FakeAlvearyController extends FakeMultiblockController implements IAlvearyControllerInternal {
+
public static final FakeAlvearyController instance = new FakeAlvearyController();
private FakeAlvearyController() {}
@@ -91,6 +93,7 @@ public class FakeAlvearyController extends FakeMultiblockController implements I
}
private static class FakeBeeHousingInventory implements IBeeHousingInventory {
+
public static final FakeBeeHousingInventory instance = new FakeBeeHousingInventory();
private FakeBeeHousingInventory() {}
diff --git a/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java b/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java
index 630eed670..a3e41a019 100644
--- a/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java
+++ b/src/main/java/forestry/apiculture/multiblock/IAlvearyControllerInternal.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
@@ -19,6 +17,7 @@ import forestry.core.tiles.IClimatised;
public interface IAlvearyControllerInternal
extends IAlvearyController, IMultiblockControllerInternal, IClimatised, IRestrictedAccess, IStreamableGui {
+
IInventoryAdapter getInternalInventory();
int getHealthScaled(int i);
diff --git a/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java b/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java
index 457589f97..bb7c4a11b 100644
--- a/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java
+++ b/src/main/java/forestry/apiculture/multiblock/MultiblockLogicAlveary.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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() {
super(IAlvearyControllerInternal.class);
}
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlveary.java b/src/main/java/forestry/apiculture/multiblock/TileAlveary.java
index fb34d3c9b..0ce9341cd 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlveary.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlveary.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
+import java.io.IOException;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.biome.BiomeGenBase;
+
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeeHousingInventory;
import forestry.api.apiculture.IBeeListener;
@@ -35,21 +41,10 @@ import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.IStreamableGui;
import forestry.core.tiles.IClimatised;
import forestry.core.tiles.ITitled;
-import java.io.IOException;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.biome.BiomeGenBase;
-public abstract class TileAlveary extends MultiblockTileEntityForestry
- implements IBeeHousing,
- IAlvearyComponent,
- IRestrictedAccess,
- IStreamableGui,
- ITitled,
- IClimatised,
- IHintSource {
+public abstract class TileAlveary extends MultiblockTileEntityForestry implements IBeeHousing,
+ IAlvearyComponent, IRestrictedAccess, IStreamableGui, ITitled, IClimatised, IHintSource {
+
private final String unlocalizedTitle;
protected TileAlveary() {
@@ -67,8 +62,8 @@ public abstract class TileAlveary extends MultiblockTileEntityForestry 0) {
workingTime--;
climateControlled.addTemperatureChange(
- definition.getChangePerTransfer(), definition.getBoundaryDown(), definition.getBoundaryUp());
+ definition.getChangePerTransfer(),
+ definition.getBoundaryDown(),
+ definition.getBoundaryUp());
}
setActive(workingTime > 0);
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearyFan.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearyFan.java
index 0e7bc0134..28e6f8ebb 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlvearyFan.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearyFan.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearyHeater.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearyHeater.java
index 2fa84674e..a7c765ef1 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlvearyHeater.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearyHeater.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java
index 78ba873a7..214cd71b4 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearyHygroregulator.java
@@ -1,15 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidHandler;
+
import forestry.api.core.IClimateControlled;
import forestry.api.multiblock.IAlvearyComponent;
import forestry.apiculture.blocks.BlockAlveary;
@@ -23,17 +30,10 @@ import forestry.core.fluids.TankManager;
import forestry.core.fluids.tanks.FilteredTank;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.tiles.ILiquidTankTile;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-import net.minecraftforge.fluids.IFluidHandler;
public class TileAlvearyHygroregulator extends TileAlveary
implements IInventory, ILiquidTankTile, IFluidHandler, IAlvearyComponent.Climatiser {
+
private final HygroregulatorRecipe[] recipes;
private final TankManager tankManager;
@@ -56,10 +56,9 @@ public class TileAlvearyHygroregulator extends TileAlveary
this.tankManager = new TankManager(this, liquidTank);
this.recipes = new HygroregulatorRecipe[] {
- new HygroregulatorRecipe(new FluidStack(water, 1), 1, 0.01f, -0.005f),
- new HygroregulatorRecipe(new FluidStack(lava, 1), 10, -0.01f, +0.005f),
- new HygroregulatorRecipe(new FluidStack(liquidIce, 1), 10, 0.02f, -0.01f)
- };
+ new HygroregulatorRecipe(new FluidStack(water, 1), 1, 0.01f, -0.005f),
+ new HygroregulatorRecipe(new FluidStack(lava, 1), 10, -0.01f, +0.005f),
+ new HygroregulatorRecipe(new FluidStack(liquidIce, 1), 10, 0.02f, -0.01f) };
}
@Override
@@ -192,6 +191,7 @@ public class TileAlvearyHygroregulator extends TileAlveary
}
private static class HygroregulatorRecipe {
+
public final FluidStack liquid;
public final int transferTime;
public final float humidChange;
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearyPlain.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearyPlain.java
index e21e87a4b..d6a3b3b0b 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlvearyPlain.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearyPlain.java
@@ -1,15 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraftforge.common.util.ForgeDirection;
+
import buildcraft.api.statements.IStatementContainer;
import buildcraft.api.statements.ITriggerExternal;
import buildcraft.api.statements.ITriggerInternal;
@@ -18,18 +23,13 @@ import cpw.mods.fml.common.Optional;
import forestry.api.multiblock.IMultiblockController;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.apiculture.trigger.ApicultureTriggers;
-import java.util.ArrayList;
-import java.util.Collection;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraftforge.common.util.ForgeDirection;
@Optional.Interface(iface = "buildcraft.api.statements.ITriggerProvider", modid = "BuildCraftAPI|statements")
public class TileAlvearyPlain extends TileAlveary implements ITriggerProvider {
@Override
- public void onMachineAssembled(
- IMultiblockController multiblockController, ChunkCoordinates minCoord, ChunkCoordinates maxCoord) {
+ public void onMachineAssembled(IMultiblockController multiblockController, ChunkCoordinates minCoord,
+ ChunkCoordinates maxCoord) {
super.onMachineAssembled(multiblockController, minCoord, maxCoord);
if (!worldObj.isRemote) {
@@ -38,7 +38,11 @@ public class TileAlvearyPlain extends TileAlveary implements ITriggerProvider {
if ((xCoord > minCoord.posX && xCoord < maxCoord.posX)
|| (zCoord > minCoord.posZ && zCoord < maxCoord.posZ)) {
this.worldObj.setBlockMetadataWithNotify(
- xCoord, yCoord, zCoord, BlockAlveary.Type.ENTRANCE.ordinal(), 2);
+ xCoord,
+ yCoord,
+ zCoord,
+ BlockAlveary.Type.ENTRANCE.ordinal(),
+ 2);
}
}
}
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java
index a776ae03e..017aa7689 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearySieve.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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;
@@ -23,8 +24,6 @@ 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 {
@@ -70,6 +69,7 @@ public class TileAlvearySieve extends TileAlveary implements IAlvearyComponent.B
}
static class AlvearySieveBeeListener extends DefaultBeeListener {
+
private final InventoryAlvearySieve inventory;
public AlvearySieveBeeListener(InventoryAlvearySieve inventory) {
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearyStabiliser.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearyStabiliser.java
index 5ebbf4371..7d8795859 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlvearyStabiliser.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearyStabiliser.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
@@ -36,6 +34,7 @@ public class TileAlvearyStabiliser extends TileAlveary implements IAlvearyCompon
}
private static class AlvearyStabiliserBeeModifier extends DefaultBeeModifier {
+
@Override
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
return 0.0f;
diff --git a/src/main/java/forestry/apiculture/multiblock/TileAlvearySwarmer.java b/src/main/java/forestry/apiculture/multiblock/TileAlvearySwarmer.java
index d04ad075a..fd82a8c4d 100644
--- a/src/main/java/forestry/apiculture/multiblock/TileAlvearySwarmer.java
+++ b/src/main/java/forestry/apiculture/multiblock/TileAlvearySwarmer.java
@@ -1,15 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.multiblock;
+import java.util.Map.Entry;
+import java.util.Stack;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.ISidedInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IBee;
@@ -28,13 +35,6 @@ import forestry.core.inventory.wrappers.InventoryIterator;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.IActivatable;
import forestry.core.utils.ItemStackUtil;
-import java.util.Map.Entry;
-import java.util.Stack;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.ISidedInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
public class TileAlvearySwarmer extends TileAlveary implements ISidedInventory, IActivatable, IAlvearyComponent.Active {
@@ -102,8 +102,7 @@ public class TileAlvearySwarmer extends TileAlveary implements ISidedInventory,
public void updateClient(int tickCount) {}
private ItemStack getPrincessStack() {
- ItemStack princessStack =
- getMultiblockLogic().getController().getBeeInventory().getQueen();
+ ItemStack princessStack = getMultiblockLogic().getController().getBeeInventory().getQueen();
if (BeeManager.beeRoot.isMated(princessStack)) {
return princessStack;
diff --git a/src/main/java/forestry/apiculture/network/PacketRegistryApiculture.java b/src/main/java/forestry/apiculture/network/PacketRegistryApiculture.java
index 874324ccf..fae0d8f07 100644
--- a/src/main/java/forestry/apiculture/network/PacketRegistryApiculture.java
+++ b/src/main/java/forestry/apiculture/network/PacketRegistryApiculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network;
@@ -20,6 +18,7 @@ import forestry.apiculture.network.packets.PacketImprintSelectionResponse;
import forestry.core.network.PacketRegistry;
public class PacketRegistryApiculture extends PacketRegistry {
+
@Override
public void registerPackets() {
registerClientPacket(new PacketImprintSelectionResponse());
diff --git a/src/main/java/forestry/apiculture/network/packets/PacketActiveUpdate.java b/src/main/java/forestry/apiculture/network/packets/PacketActiveUpdate.java
index 4f923cc72..1fbd7cb86 100644
--- a/src/main/java/forestry/apiculture/network/packets/PacketActiveUpdate.java
+++ b/src/main/java/forestry/apiculture/network/packets/PacketActiveUpdate.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network.packets;
+import java.io.IOException;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.IForestryPacketClient;
@@ -17,9 +20,6 @@ import forestry.core.network.PacketIdClient;
import forestry.core.network.packets.PacketCoordinates;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.IActivatable;
-import java.io.IOException;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
public class PacketActiveUpdate extends PacketCoordinates 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 5b6550ad8..1328379a9 100644
--- a/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActive.java
+++ b/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActive.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network.packets;
+import java.io.IOException;
+
+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;
@@ -19,11 +22,9 @@ import forestry.core.network.IForestryPacketClient;
import forestry.core.network.PacketIdClient;
import forestry.core.network.packets.PacketCoordinates;
import forestry.core.proxy.Proxies;
-import java.io.IOException;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
public class PacketBeeLogicActive extends PacketCoordinates implements IForestryPacketClient {
+
private BeekeepingLogic beekeepingLogic;
public PacketBeeLogicActive() {}
diff --git a/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActiveEntity.java b/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActiveEntity.java
index 280d50be4..c1e820795 100644
--- a/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActiveEntity.java
+++ b/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicActiveEntity.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network.packets;
+import java.io.IOException;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeekeepingLogic;
import forestry.apiculture.BeekeepingLogic;
@@ -19,11 +22,9 @@ import forestry.core.network.IForestryPacketClient;
import forestry.core.network.PacketIdClient;
import forestry.core.network.packets.PacketEntityUpdate;
import forestry.core.proxy.Proxies;
-import java.io.IOException;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
public class PacketBeeLogicActiveEntity extends PacketEntityUpdate implements IForestryPacketClient {
+
private BeekeepingLogic beekeepingLogic;
public PacketBeeLogicActiveEntity() {}
diff --git a/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicEntityRequest.java b/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicEntityRequest.java
index 3a7aa5f0b..9ef485629 100644
--- a/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicEntityRequest.java
+++ b/src/main/java/forestry/apiculture/network/packets/PacketBeeLogicEntityRequest.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network.packets;
+import java.io.IOException;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayerMP;
+
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeekeepingLogic;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.IForestryPacketServer;
import forestry.core.network.PacketIdServer;
import forestry.core.network.packets.PacketEntityUpdate;
-import java.io.IOException;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayerMP;
public class PacketBeeLogicEntityRequest extends PacketEntityUpdate implements IForestryPacketServer {
diff --git a/src/main/java/forestry/apiculture/network/packets/PacketCandleUpdate.java b/src/main/java/forestry/apiculture/network/packets/PacketCandleUpdate.java
index 48a2a4363..7ceeae3bd 100644
--- a/src/main/java/forestry/apiculture/network/packets/PacketCandleUpdate.java
+++ b/src/main/java/forestry/apiculture/network/packets/PacketCandleUpdate.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network.packets;
+import java.io.IOException;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+
import forestry.apiculture.tiles.TileCandle;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
@@ -17,9 +20,6 @@ import forestry.core.network.IForestryPacketClient;
import forestry.core.network.PacketIdClient;
import forestry.core.network.packets.PacketCoordinates;
import forestry.core.proxy.Proxies;
-import java.io.IOException;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
public class PacketCandleUpdate extends PacketCoordinates implements IForestryPacketClient {
diff --git a/src/main/java/forestry/apiculture/network/packets/PacketHabitatBiomePointer.java b/src/main/java/forestry/apiculture/network/packets/PacketHabitatBiomePointer.java
index b986c2225..a3857a91c 100644
--- a/src/main/java/forestry/apiculture/network/packets/PacketHabitatBiomePointer.java
+++ b/src/main/java/forestry/apiculture/network/packets/PacketHabitatBiomePointer.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network.packets;
+import java.io.IOException;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ChunkCoordinates;
+
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.IForestryPacketClient;
import forestry.core.network.PacketIdClient;
import forestry.core.network.packets.PacketCoordinates;
import forestry.core.proxy.Proxies;
-import java.io.IOException;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.util.ChunkCoordinates;
public class PacketHabitatBiomePointer extends PacketCoordinates implements IForestryPacketClient {
diff --git a/src/main/java/forestry/apiculture/network/packets/PacketImprintSelectionResponse.java b/src/main/java/forestry/apiculture/network/packets/PacketImprintSelectionResponse.java
index 3af290796..866176b11 100644
--- a/src/main/java/forestry/apiculture/network/packets/PacketImprintSelectionResponse.java
+++ b/src/main/java/forestry/apiculture/network/packets/PacketImprintSelectionResponse.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.network.packets;
+import java.io.IOException;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.Container;
+
import forestry.apiculture.gui.ContainerImprinter;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.IForestryPacketClient;
import forestry.core.network.PacketIdClient;
import forestry.core.network.packets.PacketGuiSelect;
-import java.io.IOException;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.Container;
public class PacketImprintSelectionResponse extends PacketGuiSelect implements IForestryPacketClient {
diff --git a/src/main/java/forestry/apiculture/proxy/ProxyApiculture.java b/src/main/java/forestry/apiculture/proxy/ProxyApiculture.java
index 78ca88b8b..71e269c3b 100755
--- a/src/main/java/forestry/apiculture/proxy/ProxyApiculture.java
+++ b/src/main/java/forestry/apiculture/proxy/ProxyApiculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.proxy;
diff --git a/src/main/java/forestry/apiculture/proxy/ProxyApicultureClient.java b/src/main/java/forestry/apiculture/proxy/ProxyApicultureClient.java
index 20c4793a7..b2878c55f 100644
--- a/src/main/java/forestry/apiculture/proxy/ProxyApicultureClient.java
+++ b/src/main/java/forestry/apiculture/proxy/ProxyApicultureClient.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.proxy;
+import net.minecraftforge.client.MinecraftForgeClient;
+
import cpw.mods.fml.client.registry.RenderingRegistry;
import forestry.apiculture.entities.EntityBee;
import forestry.apiculture.render.RenderBeeEntity;
@@ -17,7 +17,6 @@ import forestry.apiculture.render.RenderBeeItem;
import forestry.core.render.IBlockRenderer;
import forestry.core.render.RenderAnalyzer;
import forestry.plugins.PluginApiculture;
-import net.minecraftforge.client.MinecraftForgeClient;
public class ProxyApicultureClient extends ProxyApiculture {
diff --git a/src/main/java/forestry/apiculture/render/ModelAnalyzer.java b/src/main/java/forestry/apiculture/render/ModelAnalyzer.java
index 50c250340..36c9e3d1c 100755
--- a/src/main/java/forestry/apiculture/render/ModelAnalyzer.java
+++ b/src/main/java/forestry/apiculture/render/ModelAnalyzer.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
+
import org.lwjgl.opengl.GL11;
+import forestry.core.proxy.Proxies;
+import forestry.core.render.ForestryResource;
+
public class ModelAnalyzer extends ModelBase {
private final ModelRenderer pedestal;
@@ -29,11 +29,8 @@ public class ModelAnalyzer extends ModelBase {
public ModelAnalyzer(String gfxBase) {
- textures = new ResourceLocation[] {
- new ForestryResource(gfxBase + "pedestal.png"),
- new ForestryResource(gfxBase + "tower1.png"),
- new ForestryResource(gfxBase + "tower2.png"),
- };
+ textures = new ResourceLocation[] { new ForestryResource(gfxBase + "pedestal.png"),
+ new ForestryResource(gfxBase + "tower1.png"), new ForestryResource(gfxBase + "tower2.png"), };
pedestal = new ModelRenderer(this, 0, 0);
pedestal.addBox(-8F, -8F, -8F, 16, 1, 16);
@@ -57,7 +54,7 @@ public class ModelAnalyzer extends ModelBase {
GL11.glPushMatrix();
GL11.glTranslatef(posX, posY, posZ);
- float[] angle = {0, 0, 0};
+ float[] angle = { 0, 0, 0 };
if (orientation == null) {
orientation = ForgeDirection.WEST;
diff --git a/src/main/java/forestry/apiculture/render/ModelBee.java b/src/main/java/forestry/apiculture/render/ModelBee.java
index 2cc94e307..04bc932e7 100755
--- a/src/main/java/forestry/apiculture/render/ModelBee.java
+++ b/src/main/java/forestry/apiculture/render/ModelBee.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.render;
-import forestry.api.apiculture.EnumBeeType;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
+
import org.lwjgl.opengl.GL11;
+import forestry.api.apiculture.EnumBeeType;
+
public class ModelBee extends ModelBase {
// fields
diff --git a/src/main/java/forestry/apiculture/render/ParticleRenderer.java b/src/main/java/forestry/apiculture/render/ParticleRenderer.java
index 6c02d7c5e..c9b74840c 100755
--- a/src/main/java/forestry/apiculture/render/ParticleRenderer.java
+++ b/src/main/java/forestry/apiculture/render/ParticleRenderer.java
@@ -1,24 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.render;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import cpw.mods.fml.common.gameevent.TickEvent;
-import cpw.mods.fml.common.gameevent.TickEvent.Phase;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.ActiveRenderInfo;
@@ -28,10 +21,19 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.WorldEvent;
+
import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import cpw.mods.fml.common.gameevent.TickEvent;
+import cpw.mods.fml.common.gameevent.TickEvent.Phase;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
@SideOnly(Side.CLIENT)
public class ParticleRenderer {
+
private static final String name = "forestry-particles";
// singleton getter >>
@@ -91,7 +93,7 @@ public class ParticleRenderer {
lazyAdd = true;
- for (Iterator it = particles.iterator(); it.hasNext(); ) {
+ for (Iterator it = particles.iterator(); it.hasNext();) {
EntityFX particle = it.next();
particle.onUpdate();
@@ -142,7 +144,13 @@ public class ParticleRenderer {
tessellator.setBrightness(particle.getBrightnessForRender(partialTicks));
particle.renderParticle(
- tessellator, partialTicks, rotationX, rotationXZ, rotationZ, rotationYZ, rotationXY);
+ tessellator,
+ partialTicks,
+ rotationX,
+ rotationXZ,
+ rotationZ,
+ rotationYZ,
+ rotationXY);
}
tessellator.draw();
diff --git a/src/main/java/forestry/apiculture/render/RenderBeeEntity.java b/src/main/java/forestry/apiculture/render/RenderBeeEntity.java
index 41634e841..2ce0a674c 100644
--- a/src/main/java/forestry/apiculture/render/RenderBeeEntity.java
+++ b/src/main/java/forestry/apiculture/render/RenderBeeEntity.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.render;
-import forestry.apiculture.entities.EntityBee;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
+import forestry.apiculture.entities.EntityBee;
+
public class RenderBeeEntity extends RenderLiving {
private final ModelBee beeModel;
diff --git a/src/main/java/forestry/apiculture/render/RenderBeeItem.java b/src/main/java/forestry/apiculture/render/RenderBeeItem.java
index ad596b105..6db90b335 100644
--- a/src/main/java/forestry/apiculture/render/RenderBeeItem.java
+++ b/src/main/java/forestry/apiculture/render/RenderBeeItem.java
@@ -1,27 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.render;
-import forestry.api.apiculture.BeeManager;
-import forestry.api.apiculture.IBee;
-import forestry.apiculture.entities.EntityBee;
-import forestry.core.proxy.Proxies;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
+
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
+import forestry.api.apiculture.BeeManager;
+import forestry.api.apiculture.IBee;
+import forestry.apiculture.entities.EntityBee;
+import forestry.core.proxy.Proxies;
+
public class RenderBeeItem implements IItemRenderer {
private EntityBee entity;
@@ -73,30 +73,24 @@ public class RenderBeeItem implements IItemRenderer {
entity.setSpecies(bee.getGenome().getPrimary());
entity.setType(BeeManager.beeRoot.getType(item));
/*
- if(scaled)
- entity.setScale(butterfly.getSize());
- else
- entity.setScale(EntityButterfly.DEFAULT_BUTTERFLY_SIZE);
+ * if(scaled) entity.setScale(butterfly.getSize()); else
+ * entity.setScale(EntityButterfly.DEFAULT_BUTTERFLY_SIZE);
*/
return bee;
}
- /*private void renderBeeHalo() {
-
- IIcon background = TextureManager.getInstance().getDefault("habitats/desert");
- float xPos = 1.0f; float yPos = 1.0f;
- float width = 1f; float height = 1f;
-
- Proxies.render.bindTexture(SpriteSheet.ITEMS);
- Tessellator tessellator = Tessellator.instance;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(xPos + 0), (double)(yPos + height), 0f, (double)background.getMinU(), (double)background.getMaxV());
- tessellator.addVertexWithUV((double)(xPos + width), (double)(yPos + height), 0f, (double)background.getMaxU(), (double)background.getMaxV());
- tessellator.addVertexWithUV((double)(xPos + width), (double)(yPos + 0), 0f, (double)background.getMaxU(), (double)background.getMinV());
- tessellator.addVertexWithUV((double)(xPos + 0), (double)(yPos + 0), 0f, (double)background.getMinU(), (double)background.getMinV());
- tessellator.draw();
- }*/
+ /*
+ * private void renderBeeHalo() { IIcon background = TextureManager.getInstance().getDefault("habitats/desert");
+ * float xPos = 1.0f; float yPos = 1.0f; float width = 1f; float height = 1f;
+ * Proxies.render.bindTexture(SpriteSheet.ITEMS); Tessellator tessellator = Tessellator.instance;
+ * tessellator.startDrawingQuads(); tessellator.addVertexWithUV((double)(xPos + 0), (double)(yPos + height), 0f,
+ * (double)background.getMinU(), (double)background.getMaxV()); tessellator.addVertexWithUV((double)(xPos + width),
+ * (double)(yPos + height), 0f, (double)background.getMaxU(), (double)background.getMaxV());
+ * tessellator.addVertexWithUV((double)(xPos + width), (double)(yPos + 0), 0f, (double)background.getMaxU(),
+ * (double)background.getMinV()); tessellator.addVertexWithUV((double)(xPos + 0), (double)(yPos + 0), 0f,
+ * (double)background.getMinU(), (double)background.getMinV()); tessellator.draw(); }
+ */
private void renderBeeItem(IBee bee, float translateX, float translateY, float translateZ) {
float yaw = 1;
@@ -134,15 +128,10 @@ public class RenderBeeItem implements IItemRenderer {
private void renderBeeInInventory(IBee bee) {
/*
- GL11.glPushMatrix();
- //GL11.glTranslatef(-0.3f, -2.5f, 0f);
- GL11.glScalef(-1.0f, 1.0f, 1.0f);
- //GL11.glScalef((float)Math.PI / 2, 1.0f, 1.0f);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
- //GL11.glRotatef(-((float) Math.atan((double) (1 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
- renderBeeHalo();
- GL11.glPopMatrix();
+ * GL11.glPushMatrix(); //GL11.glTranslatef(-0.3f, -2.5f, 0f); GL11.glScalef(-1.0f, 1.0f, 1.0f);
+ * //GL11.glScalef((float)Math.PI / 2, 1.0f, 1.0f); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ * GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); //GL11.glRotatef(-((float) Math.atan((double) (1 / 40.0F))) *
+ * 20.0F, 1.0F, 0.0F, 0.0F); renderBeeHalo(); GL11.glPopMatrix();
*/
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
diff --git a/src/main/java/forestry/apiculture/render/RenderCandleBlock.java b/src/main/java/forestry/apiculture/render/RenderCandleBlock.java
index 8a9a182f7..7629ccee4 100644
--- a/src/main/java/forestry/apiculture/render/RenderCandleBlock.java
+++ b/src/main/java/forestry/apiculture/render/RenderCandleBlock.java
@@ -1,19 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.render;
-import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
-import forestry.apiculture.blocks.BlockCandle;
-import forestry.apiculture.tiles.TileCandle;
-import forestry.core.proxy.Proxies;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@@ -21,14 +15,19 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import forestry.apiculture.blocks.BlockCandle;
+import forestry.apiculture.tiles.TileCandle;
+import forestry.core.proxy.Proxies;
+
public class RenderCandleBlock implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {}
@Override
- public boolean renderWorldBlock(
- IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
+ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
+ RenderBlocks renderer) {
if (block.getRenderType() == Proxies.render.getCandleRenderId()) {
renderBlockCandle(world, x, y, z, (BlockCandle) block);
}
@@ -86,8 +85,8 @@ public class RenderCandleBlock implements ISimpleBlockRenderingHandler {
return true;
}
- private static void renderCandleAtAngle(
- IIcon icon, double x, double y, double z, double par8, double par10, int colour) {
+ private static void renderCandleAtAngle(IIcon icon, double x, double y, double z, double par8, double par10,
+ int colour) {
Tessellator tessellator = Tessellator.instance;
double minU = icon.getMinU();
double minV = icon.getMinV();
@@ -112,13 +111,29 @@ public class RenderCandleBlock implements ISimpleBlockRenderingHandler {
tessellator.setColorOpaque_I(colour);
// top quad
tessellator.addVertexWithUV(
- x + par8 * (1.0D - d22) - d21, y + d22, z + par10 * (1.0D - d22) - d21, textureLightTopU, d10);
+ x + par8 * (1.0D - d22) - d21,
+ y + d22,
+ z + par10 * (1.0D - d22) - d21,
+ textureLightTopU,
+ d10);
tessellator.addVertexWithUV(
- x + par8 * (1.0D - d22) - d21, y + d22, z + par10 * (1.0D - d22) + d21, textureLightTopU, d12);
+ x + par8 * (1.0D - d22) - d21,
+ y + d22,
+ z + par10 * (1.0D - d22) + d21,
+ textureLightTopU,
+ d12);
tessellator.addVertexWithUV(
- x + par8 * (1.0D - d22) + d21, y + d22, z + par10 * (1.0D - d22) + d21, textureLightBottomU, d12);
+ x + par8 * (1.0D - d22) + d21,
+ y + d22,
+ z + par10 * (1.0D - d22) + d21,
+ textureLightBottomU,
+ d12);
tessellator.addVertexWithUV(
- x + par8 * (1.0D - d22) + d21, y + d22, z + par10 * (1.0D - d22) - d21, textureLightBottomU, d10);
+ x + par8 * (1.0D - d22) + d21,
+ y + d22,
+ z + par10 * (1.0D - d22) - d21,
+ textureLightBottomU,
+ d10);
// -x quad
tessellator.addVertexWithUV(x - d21, y + 1d, d19, minU, minV);
tessellator.addVertexWithUV(x - d21 + par8, y, d19 + par10, minU, maxV);
diff --git a/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java b/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java
index c98a15051..d794e2514 100644
--- a/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java
+++ b/src/main/java/forestry/apiculture/render/TextureHabitatLocator.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.render;
diff --git a/src/main/java/forestry/apiculture/tiles/TileApiaristChest.java b/src/main/java/forestry/apiculture/tiles/TileApiaristChest.java
index c17a67713..438726a07 100644
--- a/src/main/java/forestry/apiculture/tiles/TileApiaristChest.java
+++ b/src/main/java/forestry/apiculture/tiles/TileApiaristChest.java
@@ -1,24 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.tiles;
+import net.minecraft.block.Block;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+
import forestry.api.apiculture.BeeManager;
import forestry.core.config.Constants;
import forestry.core.inventory.InventoryPlain;
import forestry.core.tiles.TileNaturalistChest;
import forestry.core.tiles.TileUtil;
import forestry.plugins.PluginApiculture;
-import net.minecraft.block.Block;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
public class TileApiaristChest extends TileNaturalistChest {
diff --git a/src/main/java/forestry/apiculture/tiles/TileApiary.java b/src/main/java/forestry/apiculture/tiles/TileApiary.java
index 099f6c26f..0d5b4b222 100644
--- a/src/main/java/forestry/apiculture/tiles/TileApiary.java
+++ b/src/main/java/forestry/apiculture/tiles/TileApiary.java
@@ -1,15 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.tiles;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
import buildcraft.api.statements.ITriggerExternal;
import cpw.mods.fml.common.Optional;
import forestry.api.apiculture.IBeeHousingInventory;
@@ -24,16 +32,9 @@ import forestry.apiculture.gui.GuiBeeHousing;
import forestry.apiculture.inventory.IApiaryInventory;
import forestry.apiculture.inventory.InventoryApiary;
import forestry.apiculture.trigger.ApicultureTriggers;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
public class TileApiary extends TileBeeHousingBase implements IApiary {
+
private final IBeeModifier beeModifier = new ApiaryBeeModifier();
private final IBeeListener beeListener = new ApiaryBeeListener(this);
private final InventoryApiary inventory = new InventoryApiary(getAccessHandler());
diff --git a/src/main/java/forestry/apiculture/tiles/TileBeeHousingBase.java b/src/main/java/forestry/apiculture/tiles/TileBeeHousingBase.java
index e419e2a60..3b5d7d0aa 100644
--- a/src/main/java/forestry/apiculture/tiles/TileBeeHousingBase.java
+++ b/src/main/java/forestry/apiculture/tiles/TileBeeHousingBase.java
@@ -1,16 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.tiles;
+import java.io.IOException;
+
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.Packet;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeekeepingLogic;
@@ -23,15 +30,10 @@ import forestry.core.network.IStreamableGui;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.IClimatised;
import forestry.core.tiles.TileBase;
-import java.io.IOException;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.Packet;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public abstract class TileBeeHousingBase extends TileBase
implements IBeeHousing, IClimatised, IGuiBeeHousingInventory, IStreamableGui {
+
private final IBeekeepingLogic beeLogic;
// CLIENT
diff --git a/src/main/java/forestry/apiculture/tiles/TileBeehouse.java b/src/main/java/forestry/apiculture/tiles/TileBeehouse.java
index 2d4eaddad..5208c354d 100644
--- a/src/main/java/forestry/apiculture/tiles/TileBeehouse.java
+++ b/src/main/java/forestry/apiculture/tiles/TileBeehouse.java
@@ -1,15 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.tiles;
+import java.util.Collections;
+
+import net.minecraft.entity.player.EntityPlayer;
+
import forestry.api.apiculture.DefaultBeeListener;
import forestry.api.apiculture.IBeeHousingInventory;
import forestry.api.apiculture.IBeeListener;
@@ -18,10 +20,9 @@ import forestry.apiculture.BeehouseBeeModifier;
import forestry.apiculture.InventoryBeeHousing;
import forestry.apiculture.gui.ContainerBeeHousing;
import forestry.apiculture.gui.GuiBeeHousing;
-import java.util.Collections;
-import net.minecraft.entity.player.EntityPlayer;
public class TileBeehouse extends TileBeeHousingBase {
+
private static final IBeeModifier beeModifier = new BeehouseBeeModifier();
private final IBeeListener beeListener;
diff --git a/src/main/java/forestry/apiculture/tiles/TileCandle.java b/src/main/java/forestry/apiculture/tiles/TileCandle.java
index 169da7135..c09fec1c4 100644
--- a/src/main/java/forestry/apiculture/tiles/TileCandle.java
+++ b/src/main/java/forestry/apiculture/tiles/TileCandle.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.tiles;
-import forestry.apiculture.network.packets.PacketCandleUpdate;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
+import forestry.apiculture.network.packets.PacketCandleUpdate;
+
public class TileCandle extends TileEntity {
+
private int colour;
private boolean lit;
@@ -70,7 +70,9 @@ public class TileCandle extends TileEntity {
int[] myColour = fromIntColour(this.colour);
int[] addColour = fromIntColour(colour2);
this.colour = toIntColour(
- (addColour[0] + myColour[0]) / 2, (addColour[0] + myColour[0]) / 2, (addColour[2] + myColour[2]) / 2);
+ (addColour[0] + myColour[0]) / 2,
+ (addColour[0] + myColour[0]) / 2,
+ (addColour[2] + myColour[2]) / 2);
}
private static int[] fromIntColour(int value) {
diff --git a/src/main/java/forestry/apiculture/tiles/TileSwarm.java b/src/main/java/forestry/apiculture/tiles/TileSwarm.java
index 602e8b24a..ea8b01c56 100644
--- a/src/main/java/forestry/apiculture/tiles/TileSwarm.java
+++ b/src/main/java/forestry/apiculture/tiles/TileSwarm.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.tiles;
-import forestry.core.inventory.InventoryAdapter;
-import forestry.core.utils.InventoryUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.EnumSkyBlock;
+import forestry.core.inventory.InventoryAdapter;
+import forestry.core.utils.InventoryUtil;
+
public class TileSwarm extends TileEntity {
public final InventoryAdapter contained = new InventoryAdapter(2, "Contained");
diff --git a/src/main/java/forestry/apiculture/trigger/ApicultureTriggers.java b/src/main/java/forestry/apiculture/trigger/ApicultureTriggers.java
index 73ee0d616..a89b91bb2 100644
--- a/src/main/java/forestry/apiculture/trigger/ApicultureTriggers.java
+++ b/src/main/java/forestry/apiculture/trigger/ApicultureTriggers.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.trigger;
import forestry.core.triggers.Trigger;
public class ApicultureTriggers {
+
public static Trigger noFrames;
public static Trigger missingQueen;
public static Trigger missingDrone;
diff --git a/src/main/java/forestry/apiculture/trigger/TriggerMissingDrone.java b/src/main/java/forestry/apiculture/trigger/TriggerMissingDrone.java
index f060a7f2b..8929f8c74 100644
--- a/src/main/java/forestry/apiculture/trigger/TriggerMissingDrone.java
+++ b/src/main/java/forestry/apiculture/trigger/TriggerMissingDrone.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.trigger;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
import buildcraft.api.statements.IStatementContainer;
import buildcraft.api.statements.IStatementParameter;
import forestry.api.core.IErrorLogicSource;
import forestry.core.errors.EnumErrorCode;
import forestry.core.triggers.Trigger;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
public class TriggerMissingDrone extends Trigger {
@@ -28,8 +27,8 @@ public class TriggerMissingDrone extends Trigger {
* Return true if the tile given in parameter activates the trigger, given the parameters.
*/
@Override
- public boolean isTriggerActive(
- TileEntity tile, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters) {
+ public boolean isTriggerActive(TileEntity tile, ForgeDirection side, IStatementContainer source,
+ IStatementParameter[] parameters) {
if (!(tile instanceof IErrorLogicSource)) {
return false;
diff --git a/src/main/java/forestry/apiculture/trigger/TriggerMissingQueen.java b/src/main/java/forestry/apiculture/trigger/TriggerMissingQueen.java
index f7b02bca4..41837ce78 100644
--- a/src/main/java/forestry/apiculture/trigger/TriggerMissingQueen.java
+++ b/src/main/java/forestry/apiculture/trigger/TriggerMissingQueen.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.trigger;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
import buildcraft.api.statements.IStatementContainer;
import buildcraft.api.statements.IStatementParameter;
import forestry.api.core.IErrorLogicSource;
import forestry.core.errors.EnumErrorCode;
import forestry.core.triggers.Trigger;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
public class TriggerMissingQueen extends Trigger {
@@ -28,8 +27,8 @@ public class TriggerMissingQueen extends Trigger {
* Return true if the tile given in parameter activates the trigger, given the parameters.
*/
@Override
- public boolean isTriggerActive(
- TileEntity tile, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters) {
+ public boolean isTriggerActive(TileEntity tile, ForgeDirection side, IStatementContainer source,
+ IStatementParameter[] parameters) {
if (!(tile instanceof IErrorLogicSource)) {
return false;
diff --git a/src/main/java/forestry/apiculture/trigger/TriggerNoFrames.java b/src/main/java/forestry/apiculture/trigger/TriggerNoFrames.java
index 7e4835625..8db971d33 100755
--- a/src/main/java/forestry/apiculture/trigger/TriggerNoFrames.java
+++ b/src/main/java/forestry/apiculture/trigger/TriggerNoFrames.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.trigger;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
import buildcraft.api.statements.IStatementContainer;
import buildcraft.api.statements.IStatementParameter;
import forestry.apiculture.inventory.InventoryApiary;
import forestry.apiculture.tiles.TileApiary;
import forestry.core.triggers.Trigger;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
public class TriggerNoFrames extends Trigger {
@@ -28,8 +27,8 @@ public class TriggerNoFrames extends Trigger {
* Return true if the tile given in parameter activates the trigger, given the parameters.
*/
@Override
- public boolean isTriggerActive(
- TileEntity tile, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters) {
+ public boolean isTriggerActive(TileEntity tile, ForgeDirection side, IStatementContainer source,
+ IStatementParameter[] parameters) {
if (!(tile instanceof TileApiary)) {
return false;
diff --git a/src/main/java/forestry/apiculture/worldgen/ComponentVillageBeeHouse.java b/src/main/java/forestry/apiculture/worldgen/ComponentVillageBeeHouse.java
index b47120628..aed8c659c 100755
--- a/src/main/java/forestry/apiculture/worldgen/ComponentVillageBeeHouse.java
+++ b/src/main/java/forestry/apiculture/worldgen/ComponentVillageBeeHouse.java
@@ -1,15 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+import net.minecraft.world.gen.structure.StructureVillagePieces;
+import net.minecraftforge.common.ChestGenHooks;
+import net.minecraftforge.common.util.ForgeDirection;
+
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.FlowerManager;
@@ -38,19 +51,6 @@ import forestry.core.worldgen.IBlockType;
import forestry.plugins.PluginApiculture;
import forestry.plugins.PluginCore;
import forestry.plugins.PluginManager;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.gen.structure.StructureBoundingBox;
-import net.minecraft.world.gen.structure.StructureComponent;
-import net.minecraft.world.gen.structure.StructureVillagePieces;
-import net.minecraftforge.common.ChestGenHooks;
-import net.minecraftforge.common.util.ForgeDirection;
public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
@@ -67,12 +67,8 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
createBuildingBlocks(random);
}
- public ComponentVillageBeeHouse(
- StructureVillagePieces.Start startPiece,
- int componentType,
- Random random,
- StructureBoundingBox boundingBox,
- int coordBaseMode) {
+ public ComponentVillageBeeHouse(StructureVillagePieces.Start startPiece, int componentType, Random random,
+ StructureBoundingBox boundingBox, int coordBaseMode) {
super(startPiece, componentType, random, boundingBox, coordBaseMode);
isInDesert = startPiece.inDesert;
@@ -104,17 +100,10 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
}
@SuppressWarnings("rawtypes")
- public static ComponentVillageBeeHouse buildComponent(
- StructureVillagePieces.Start startPiece,
- List par1List,
- Random random,
- int par3,
- int par4,
- int par5,
- int par6,
- int par7) {
- StructureBoundingBox bbox =
- StructureBoundingBox.getComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 10, 9, 11, par6);
+ public static ComponentVillageBeeHouse buildComponent(StructureVillagePieces.Start startPiece, List par1List,
+ Random random, int par3, int par4, int par5, int par6, int par7) {
+ StructureBoundingBox bbox = StructureBoundingBox
+ .getComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 10, 9, 11, par6);
if (!canVillageGoDeeper(bbox) || StructureComponent.findIntersecting(par1List, bbox) != null) {
return null;
}
@@ -193,8 +182,9 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
// Escritoire
if (random.nextInt(2) == 0) {
- IBlockType escritoireBlock =
- new BlockTypeTileForestry(PluginCore.blocks.core, BlockCoreType.ESCRITOIRE.ordinal());
+ IBlockType escritoireBlock = new BlockTypeTileForestry(
+ PluginCore.blocks.core,
+ BlockCoreType.ESCRITOIRE.ordinal());
escritoireBlock.setDirection(getRotatedDirection(ForgeDirection.EAST));
placeBlockAtCurrentPosition(world, escritoireBlock, 1, 1, 3, structBoundingBox);
}
@@ -202,7 +192,13 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
placeBlockAtCurrentPosition(world, Blocks.air, 0, 2, 1, 0, structBoundingBox);
placeBlockAtCurrentPosition(world, Blocks.air, 0, 2, 2, 0, structBoundingBox);
placeDoorAtCurrentPosition(
- world, structBoundingBox, random, 2, 1, 0, getMetadataWithOffset(Blocks.wooden_door, 1));
+ world,
+ structBoundingBox,
+ random,
+ 2,
+ 1,
+ 0,
+ getMetadataWithOffset(Blocks.wooden_door, 1));
if (isAirBlockAtCurrentPosition(world, 2, 0, -1, structBoundingBox)
&& !isAirBlockAtCurrentPosition(world, 2, -1, -1, structBoundingBox)) {
@@ -226,7 +222,13 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
placeBlockAtCurrentPosition(world, Blocks.torch, 0, 6, 3, 1, structBoundingBox);
placeDoorAtCurrentPosition(
- world, structBoundingBox, random, 6, 1, 5, getMetadataWithOffset(Blocks.wooden_door, 1));
+ world,
+ structBoundingBox,
+ random,
+ 6,
+ 1,
+ 5,
+ getMetadataWithOffset(Blocks.wooden_door, 1));
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 9; ++j) {
@@ -276,8 +278,8 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
}
}
- private void plantFlowerGarden(
- World world, StructureBoundingBox box, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
+ private void plantFlowerGarden(World world, StructureBoundingBox box, int minX, int minY, int minZ, int maxX,
+ int maxY, int maxZ) {
if (isInDesert) {
placeBlockAtCurrentPosition(world, Blocks.cactus, 0, 4, 1, 7, box);
@@ -296,8 +298,8 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
continue;
}
- IFlower flower = FlowerManager.flowerRegistry.getRandomPlantableFlower(
- FlowerManager.FlowerTypeVanilla, world.rand);
+ IFlower flower = FlowerManager.flowerRegistry
+ .getRandomPlantableFlower(FlowerManager.FlowerTypeVanilla, world.rand);
placeBlockAtCurrentPosition(world, flower.getBlock(), flower.getMeta(), j, i, k, box);
}
}
@@ -344,9 +346,8 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
ItemStack randomVillageDrone = getRandomVillageBeeStack(world, xCoord, yCoord, zCoord, EnumBeeType.DRONE);
apiary.getBeeInventory().setDrone(randomVillageDrone);
- for (int i = InventoryApiary.SLOT_FRAMES_1;
- i < InventoryApiary.SLOT_FRAMES_1 + InventoryApiary.SLOT_FRAMES_COUNT;
- i++) {
+ for (int i = InventoryApiary.SLOT_FRAMES_1; i
+ < InventoryApiary.SLOT_FRAMES_1 + InventoryApiary.SLOT_FRAMES_COUNT; i++) {
ItemStack randomFrame = getRandomFrame(world.rand);
apiary.setInventorySlotContents(i, randomFrame);
}
@@ -365,8 +366,8 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
}
}
- private static ItemStack getRandomVillageBeeStack(
- World world, int xCoord, int yCoord, int zCoord, EnumBeeType beeType) {
+ private static ItemStack getRandomVillageBeeStack(World world, int xCoord, int yCoord, int zCoord,
+ EnumBeeType beeType) {
IBee randomVillageBee = getRandomVillageBee(world, xCoord, yCoord, zCoord);
return BeeManager.beeRoot.getMemberStack(randomVillageBee, beeType.ordinal());
}
@@ -377,8 +378,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord);
ArrayList candidates;
- if (BeeManager.villageBees[1] != null
- && BeeManager.villageBees[1].size() > 0
+ if (BeeManager.villageBees[1] != null && BeeManager.villageBees[1].size() > 0
&& world.rand.nextDouble() < 0.2) {
candidates = BeeManager.villageBees[1];
} else {
@@ -398,15 +398,15 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
// No valid ones found, return any of the common ones.
if (valid.isEmpty()) {
- return BeeManager.beeRoot.getBee(
- world, BeeManager.villageBees[0].get(world.rand.nextInt(BeeManager.villageBees[0].size())));
+ return BeeManager.beeRoot
+ .getBee(world, BeeManager.villageBees[0].get(world.rand.nextInt(BeeManager.villageBees[0].size())));
}
return BeeManager.beeRoot.getBee(world, valid.get(world.rand.nextInt(valid.size())));
}
- private static boolean checkBiomeHazard(
- IBeeGenome genome, EnumTemperature biomeTemperature, EnumHumidity biomeHumidity) {
+ private static boolean checkBiomeHazard(IBeeGenome genome, EnumTemperature biomeTemperature,
+ EnumHumidity biomeHumidity) {
IAlleleBeeSpecies species = genome.getPrimary();
return AlleleManager.climateHelper.isWithinLimits(
biomeTemperature,
@@ -417,17 +417,8 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
genome.getToleranceHumid());
}
- private void fillBoxWith(
- World world,
- StructureBoundingBox box,
- int par3,
- int par4,
- int par5,
- int par6,
- int par7,
- int par8,
- IBlockType block,
- boolean replace) {
+ private void fillBoxWith(World world, StructureBoundingBox box, int par3, int par4, int par5, int par6, int par7,
+ int par8, IBlockType block, boolean replace) {
for (int var14 = par4; var14 <= par7; ++var14) {
for (int var15 = par3; var15 <= par6; ++var15) {
@@ -440,12 +431,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
}
}
- private void placeBlockAtCurrentPosition(
- World world,
- IBlockType block,
- int par4,
- int par5,
- int par6,
+ private void placeBlockAtCurrentPosition(World world, IBlockType block, int par4, int par5, int par6,
StructureBoundingBox par7StructureBoundingBox) {
int x = getXWithOffset(par4, par6);
int y = getYWithOffset(par5);
diff --git a/src/main/java/forestry/apiculture/worldgen/Hive.java b/src/main/java/forestry/apiculture/worldgen/Hive.java
index c73312c66..42aa5c93c 100644
--- a/src/main/java/forestry/apiculture/worldgen/Hive.java
+++ b/src/main/java/forestry/apiculture/worldgen/Hive.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import forestry.api.apiculture.IHiveDrop;
import forestry.api.apiculture.hives.IHiveDescription;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
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 f1e209560..bb62bfd09 100755
--- a/src/main/java/forestry/apiculture/worldgen/HiveDecorator.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveDecorator.java
@@ -1,23 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
-import forestry.api.core.EnumHumidity;
-import forestry.api.core.EnumTemperature;
-import forestry.core.config.Config;
-import forestry.core.config.Constants;
-import forestry.plugins.PluginApiculture;
import java.util.Collections;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
@@ -26,18 +20,19 @@ 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.core.config.Config;
+import forestry.core.config.Constants;
+import forestry.plugins.PluginApiculture;
+
public abstract class HiveDecorator {
@SuppressWarnings("rawtypes")
- private static final EventType EVENT_TYPE =
- EnumHelper.addEnum(EventType.class, "FORESTRY_HIVES", new Class[0], new Object[0]);
+ private static final EventType EVENT_TYPE = EnumHelper
+ .addEnum(EventType.class, "FORESTRY_HIVES", new Class[0], new Object[0]);
- public static void decorateHives(
- IChunkProvider chunkProvider,
- World world,
- Random rand,
- int chunkX,
- int chunkZ,
+ public static void decorateHives(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ,
boolean hasVillageGenerated) {
if (!TerrainGen.populate(chunkProvider, world, rand, chunkX, chunkZ, hasVillageGenerated, EVENT_TYPE)) {
return;
diff --git a/src/main/java/forestry/apiculture/worldgen/HiveDescription.java b/src/main/java/forestry/apiculture/worldgen/HiveDescription.java
index 437063d2c..573583aed 100644
--- a/src/main/java/forestry/apiculture/worldgen/HiveDescription.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveDescription.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraftforge.common.BiomeDictionary;
+
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.hives.HiveManager;
import forestry.api.apiculture.hives.IHiveDescription;
@@ -21,28 +25,23 @@ import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.EnumTolerance;
import forestry.apiculture.genetics.BeeDefinition;
import forestry.plugins.PluginApiculture;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary;
public enum HiveDescription implements IHiveDescription {
+
FOREST(1, 3.0f, BeeDefinition.FOREST, HiveManager.genHelper.tree()),
MEADOWS(2, 1.0f, BeeDefinition.MEADOWS, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass)),
- DESERT(
- 3,
- 1.0f,
- BeeDefinition.MODEST,
+ DESERT(3, 1.0f, BeeDefinition.MODEST,
HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass, Blocks.sand, Blocks.sandstone)),
JUNGLE(4, 4.0f, BeeDefinition.TROPICAL, HiveManager.genHelper.tree()),
END(5, 4.0f, BeeDefinition.ENDED, HiveManager.genHelper.ground(Blocks.end_stone)) {
+
@Override
public boolean isGoodBiome(BiomeGenBase biome) {
return BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.END);
}
},
SNOW(6, 2.0f, BeeDefinition.WINTRY, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass, Blocks.snow)) {
+
@Override
public void postGen(World world, int x, int y, int z) {
if (world.isAirBlock(x, y + 1, z)) {
@@ -50,8 +49,7 @@ public enum HiveDescription implements IHiveDescription {
}
}
},
- SWAMP(7, 2.0f, BeeDefinition.MARSHY, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass)),
- ;
+ SWAMP(7, 2.0f, BeeDefinition.MARSHY, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass)),;
private final int meta;
private final float genChance;
diff --git a/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java b/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java
index 233d635b0..301e9b25c 100644
--- a/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveDescriptionSwarmer.java
@@ -1,27 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import forestry.api.apiculture.hives.IHiveDescription;
import forestry.api.apiculture.hives.IHiveGen;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.apiculture.tiles.TileSwarm;
import forestry.plugins.PluginApiculture;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
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 61e67ee3b..7a61c1e2f 100644
--- a/src/main/java/forestry/apiculture/worldgen/HiveGen.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveGen.java
@@ -1,28 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
-import forestry.api.apiculture.hives.IHiveGen;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
+import forestry.api.apiculture.hives.IHiveGen;
+
public abstract class HiveGen implements IHiveGen {
@Override
public boolean canReplace(World world, int x, int y, int z) {
Block block = world.getBlock(x, y, z);
Material material = block.getMaterial();
- return (material.isReplaceable() && !material.isLiquid())
- || material == Material.air
+ return (material.isReplaceable() && !material.isLiquid()) || material == Material.air
|| material == Material.plants;
}
}
diff --git a/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java b/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java
index 178a9319e..9ffa458e9 100644
--- a/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveGenGround.java
@@ -1,17 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
import java.util.HashSet;
import java.util.Set;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
diff --git a/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java b/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java
index cde38a043..85f5212e2 100644
--- a/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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/HiveGenTree.java b/src/main/java/forestry/apiculture/worldgen/HiveGenTree.java
index aa2781dfe..9ab7cee1e 100644
--- a/src/main/java/forestry/apiculture/worldgen/HiveGenTree.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveGenTree.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
diff --git a/src/main/java/forestry/apiculture/worldgen/HiveRegistry.java b/src/main/java/forestry/apiculture/worldgen/HiveRegistry.java
index a10213dfa..fc6b00692 100644
--- a/src/main/java/forestry/apiculture/worldgen/HiveRegistry.java
+++ b/src/main/java/forestry/apiculture/worldgen/HiveRegistry.java
@@ -1,24 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.apiculture.worldgen;
-import forestry.api.apiculture.IHiveDrop;
-import forestry.api.apiculture.hives.IHiveDescription;
-import forestry.api.apiculture.hives.IHiveRegistry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import forestry.api.apiculture.IHiveDrop;
+import forestry.api.apiculture.hives.IHiveDescription;
+import forestry.api.apiculture.hives.IHiveRegistry;
+
public class HiveRegistry implements IHiveRegistry {
private final Map hives = new HashMap<>();
diff --git a/src/main/java/forestry/arboriculture/FruitProviderNone.java b/src/main/java/forestry/arboriculture/FruitProviderNone.java
index f268d4cb7..817495284 100755
--- a/src/main/java/forestry/arboriculture/FruitProviderNone.java
+++ b/src/main/java/forestry/arboriculture/FruitProviderNone.java
@@ -1,30 +1,31 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture;
+import java.util.HashMap;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.IFruitProvider;
import forestry.api.arboriculture.ITreeGenome;
import forestry.api.genetics.IFruitFamily;
import forestry.core.render.TextureManager;
-import java.util.HashMap;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
public class FruitProviderNone implements IFruitProvider {
private static class OverlayType {
+
public final String ident;
public final short texUID;
@@ -112,8 +113,8 @@ public class FruitProviderNone implements IFruitProvider {
}
@Override
- public short getIconIndex(
- ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy) {
+ public short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime,
+ boolean fancy) {
if (overlay != null) {
return overlay.texUID;
} else {
diff --git a/src/main/java/forestry/arboriculture/FruitProviderPod.java b/src/main/java/forestry/arboriculture/FruitProviderPod.java
index 5b38ffbb9..1b8f690e8 100755
--- a/src/main/java/forestry/arboriculture/FruitProviderPod.java
+++ b/src/main/java/forestry/arboriculture/FruitProviderPod.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture;
+import java.util.Locale;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumTreeChromosome;
@@ -19,16 +25,11 @@ import forestry.api.arboriculture.TreeManager;
import forestry.api.genetics.IFruitFamily;
import forestry.core.render.TextureManager;
import forestry.core.utils.BlockUtil;
-import java.util.Locale;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
public class FruitProviderPod extends FruitProviderNone {
public enum EnumPodType {
+
COCOA((short) 2000, (short) 2001, (short) 2002),
DATES((short) 2010, (short) 2011, (short) 2012),
PAPAYA((short) 2013, (short) 2014, (short) 2015); // , COCONUT((short)2016, (short)2017, (short)2018);
@@ -36,7 +37,7 @@ public class FruitProviderPod extends FruitProviderNone {
public final short[] uids;
EnumPodType(short stage1, short stage2, short stage3) {
- uids = new short[] {stage1, stage2, stage3};
+ uids = new short[] { stage1, stage2, stage3 };
}
@SideOnly(Side.CLIENT)
@@ -107,8 +108,8 @@ public class FruitProviderPod extends FruitProviderNone {
}
@Override
- public short getIconIndex(
- ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy) {
+ public short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime,
+ boolean fancy) {
return type.uids[0];
}
diff --git a/src/main/java/forestry/arboriculture/FruitProviderRandom.java b/src/main/java/forestry/arboriculture/FruitProviderRandom.java
index a7b6ff8cd..383c2e5a2 100755
--- a/src/main/java/forestry/arboriculture/FruitProviderRandom.java
+++ b/src/main/java/forestry/arboriculture/FruitProviderRandom.java
@@ -1,28 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture;
-import forestry.api.arboriculture.ITreeGenome;
-import forestry.api.arboriculture.TreeManager;
-import forestry.api.genetics.IFruitFamily;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+
import net.minecraft.item.ItemStack;
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.
+ * Simple fruit provider which drops from any leaf block according to yield and either marks all leave blocks as fruit
+ * leaves or none.
*/
public class FruitProviderRandom extends FruitProviderNone {
diff --git a/src/main/java/forestry/arboriculture/FruitProviderRipening.java b/src/main/java/forestry/arboriculture/FruitProviderRipening.java
index 227b07072..df992c2a1 100755
--- a/src/main/java/forestry/arboriculture/FruitProviderRipening.java
+++ b/src/main/java/forestry/arboriculture/FruitProviderRipening.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture;
-import forestry.api.arboriculture.ITreeGenome;
-import forestry.api.arboriculture.TreeManager;
-import forestry.api.genetics.IFruitFamily;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+
import net.minecraft.item.ItemStack;
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<>();
diff --git a/src/main/java/forestry/arboriculture/IWoodTyped.java b/src/main/java/forestry/arboriculture/IWoodTyped.java
index e5d6a1465..319ec6856 100755
--- a/src/main/java/forestry/arboriculture/IWoodTyped.java
+++ b/src/main/java/forestry/arboriculture/IWoodTyped.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture;
public interface IWoodTyped {
+
String getBlockKind();
boolean isFireproof();
diff --git a/src/main/java/forestry/arboriculture/LeafDecayHelper.java b/src/main/java/forestry/arboriculture/LeafDecayHelper.java
index 689dc481c..50621f9b4 100644
--- a/src/main/java/forestry/arboriculture/LeafDecayHelper.java
+++ b/src/main/java/forestry/arboriculture/LeafDecayHelper.java
@@ -6,6 +6,7 @@ import net.minecraft.world.World;
/** Based on vanilla leaf decay, but accepts leaves that are connected further from a trunk */
public abstract class LeafDecayHelper {
+
private static final short SUSTAINS_LEAVES = 0;
private static final short NOT_SUSTAINS_LEAVES = -1;
private static final short IS_LEAVES = -2;
@@ -37,24 +38,21 @@ public abstract class LeafDecayHelper {
if (!block.canSustainLeaves(world, x + xOffset, y + yOffset, z + zOffset)) {
if (block.isLeaves(world, x + xOffset, y + yOffset, z + zOffset)) {
- leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset] = IS_LEAVES;
+ leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] = IS_LEAVES;
} else {
- leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset] = NOT_SUSTAINS_LEAVES;
+ leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] = NOT_SUSTAINS_LEAVES;
}
} else {
- leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset] = SUSTAINS_LEAVES;
+ leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] = SUSTAINS_LEAVES;
}
}
}
@@ -64,88 +62,68 @@ public abstract class LeafDecayHelper {
for (int xOffset = -radius; xOffset <= radius; ++xOffset) {
for (int yOffset = -radius; yOffset <= radius; ++yOffset) {
for (int zOffset = -radius; zOffset <= radius; ++zOffset) {
- if (leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset]
- == sustainedValue - 1) {
- if (leafDecayValues[
- (xOffset + arrayOffset - 1) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset]
- == IS_LEAVES) {
- leafDecayValues[
- (xOffset + arrayOffset - 1) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset] = sustainedValue;
+ if (leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] == sustainedValue - 1) {
+ if (leafDecayValues[(xOffset + arrayOffset - 1) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] == IS_LEAVES) {
+ leafDecayValues[(xOffset + arrayOffset - 1) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] = sustainedValue;
}
- if (leafDecayValues[
- (xOffset + arrayOffset + 1) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset]
- == IS_LEAVES) {
- leafDecayValues[
- (xOffset + arrayOffset + 1) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset] = sustainedValue;
+ if (leafDecayValues[(xOffset + arrayOffset + 1) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] == IS_LEAVES) {
+ leafDecayValues[(xOffset + arrayOffset + 1) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset] = sustainedValue;
}
- if (leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset - 1) * yArrayMult
- + zOffset
- + arrayOffset]
- == IS_LEAVES) {
- leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset - 1) * yArrayMult
- + zOffset
- + arrayOffset] = sustainedValue;
+ if (leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset - 1) * yArrayMult
+ + zOffset
+ + arrayOffset] == IS_LEAVES) {
+ leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset - 1) * yArrayMult
+ + zOffset
+ + arrayOffset] = sustainedValue;
}
- if (leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset + 1) * yArrayMult
- + zOffset
- + arrayOffset]
- == IS_LEAVES) {
- leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset + 1) * yArrayMult
- + zOffset
- + arrayOffset] = sustainedValue;
+ if (leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset + 1) * yArrayMult
+ + zOffset
+ + arrayOffset] == IS_LEAVES) {
+ leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset + 1) * yArrayMult
+ + zOffset
+ + arrayOffset] = sustainedValue;
}
- if (leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + (zOffset + arrayOffset - 1)]
- == IS_LEAVES) {
- leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + (zOffset + arrayOffset - 1)] = sustainedValue;
+ if (leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + (zOffset + arrayOffset - 1)] == IS_LEAVES) {
+ leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + (zOffset + arrayOffset - 1)] = sustainedValue;
}
- if (leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset
- + 1]
- == IS_LEAVES) {
- leafDecayValues[
- (xOffset + arrayOffset) * xArrayMult
- + (yOffset + arrayOffset) * yArrayMult
- + zOffset
- + arrayOffset
- + 1] = sustainedValue;
+ if (leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset
+ + 1] == IS_LEAVES) {
+ leafDecayValues[(xOffset + arrayOffset) * xArrayMult
+ + (yOffset + arrayOffset) * yArrayMult
+ + zOffset
+ + arrayOffset
+ + 1] = sustainedValue;
}
}
}
diff --git a/src/main/java/forestry/arboriculture/VillageHandlerArboriculture.java b/src/main/java/forestry/arboriculture/VillageHandlerArboriculture.java
index 51e5e54f1..045fc2b7e 100755
--- a/src/main/java/forestry/arboriculture/VillageHandlerArboriculture.java
+++ b/src/main/java/forestry/arboriculture/VillageHandlerArboriculture.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture;
+import java.util.Random;
+
+import net.minecraft.entity.passive.EntityVillager;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.village.MerchantRecipe;
+import net.minecraft.village.MerchantRecipeList;
+
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler;
import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.arboriculture.EnumWoodType;
@@ -18,12 +24,6 @@ import forestry.api.arboriculture.ITreeGenome;
import forestry.api.arboriculture.TreeManager;
import forestry.api.genetics.IAllele;
import forestry.plugins.PluginArboriculture;
-import java.util.Random;
-import net.minecraft.entity.passive.EntityVillager;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.village.MerchantRecipe;
-import net.minecraft.village.MerchantRecipeList;
public class VillageHandlerArboriculture implements IVillageTradeHandler {
@@ -36,8 +36,10 @@ public class VillageHandlerArboriculture implements IVillageTradeHandler {
ItemStack randomTreeStack = TreeManager.treeRoot.getMemberStack(randomTree, EnumGermlingType.SAPLING.ordinal());
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 8), randomTreeStack));
- recipeList.add(new MerchantRecipe(
- new ItemStack(Items.emerald, 2), PluginArboriculture.items.grafterProven.getItemStack()));
+ recipeList.add(
+ new MerchantRecipe(
+ new ItemStack(Items.emerald, 2),
+ PluginArboriculture.items.grafterProven.getItemStack()));
EnumWoodType randomWoodType = EnumWoodType.getRandom(random);
ItemStack planks = TreeManager.woodItemAccess.getPlanks(randomWoodType, false);
diff --git a/src/main/java/forestry/arboriculture/WoodItemAccess.java b/src/main/java/forestry/arboriculture/WoodItemAccess.java
index e19fe8cb1..01d50dbb1 100644
--- a/src/main/java/forestry/arboriculture/WoodItemAccess.java
+++ b/src/main/java/forestry/arboriculture/WoodItemAccess.java
@@ -1,23 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture;
+import java.util.EnumMap;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+
import forestry.api.arboriculture.EnumWoodType;
import forestry.api.arboriculture.IWoodItemAccess;
import forestry.arboriculture.items.ItemBlockWood;
-import java.util.EnumMap;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
public class WoodItemAccess implements IWoodItemAccess {
+
private static final EnumMap logs = new EnumMap<>(EnumWoodType.class);
private static final EnumMap logsFireproof = new EnumMap<>(EnumWoodType.class);
private static final EnumMap planks = new EnumMap<>(EnumWoodType.class);
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockArbFence.java b/src/main/java/forestry/arboriculture/blocks/BlockArbFence.java
index f716b56ca..082cdef47 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockArbFence.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockArbFence.java
@@ -1,27 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.api.arboriculture.TreeManager;
-import forestry.api.core.Tabs;
-import forestry.arboriculture.IWoodTyped;
-import forestry.arboriculture.render.IconProviderWood;
-import forestry.arboriculture.tiles.TileWood;
-import forestry.core.render.ParticleHelper;
-import forestry.plugins.PluginArboriculture;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockFence;
import net.minecraft.block.BlockFenceGate;
@@ -40,6 +29,17 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.api.arboriculture.TreeManager;
+import forestry.api.core.Tabs;
+import forestry.arboriculture.IWoodTyped;
+import forestry.arboriculture.render.IconProviderWood;
+import forestry.arboriculture.tiles.TileWood;
+import forestry.core.render.ParticleHelper;
+import forestry.plugins.PluginArboriculture;
+
public class BlockArbFence extends BlockFence implements IWoodTyped, ITileEntityProvider {
private final ParticleHelper.Callback particleCallback;
@@ -59,7 +59,7 @@ public class BlockArbFence extends BlockFence implements IWoodTyped, ITileEntity
this.particleCallback = new ParticleHelper.DefaultCallback(this);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List list) {
for (EnumWoodType woodType : EnumWoodType.VALUES) {
@@ -80,8 +80,7 @@ public class BlockArbFence extends BlockFence implements IWoodTyped, ITileEntity
return true;
}
- return block.getMaterial().isOpaque()
- && block.renderAsNormalBlock()
+ return block.getMaterial().isOpaque() && block.renderAsNormalBlock()
&& block.getMaterial() != Material.gourd;
} else {
return true;
@@ -125,8 +124,8 @@ public class BlockArbFence extends BlockFence implements IWoodTyped, ITileEntity
}
/* DROP HANDLING */
- // Hack: When harvesting we need to get the drops in onBlockHarvested,
- // because Mojang destroys the block and tile before calling getDrops.
+ // Hack: When harvesting we need to get the drops in onBlockHarvested,
+ // because Mojang destroys the block and tile before calling getDrops.
private final ThreadLocal> drops = new ThreadLocal<>();
@Override
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockArbStairs.java b/src/main/java/forestry/arboriculture/blocks/BlockArbStairs.java
index 060832a2a..55f3d5e6a 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockArbStairs.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockArbStairs.java
@@ -1,26 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.api.arboriculture.TreeManager;
-import forestry.api.core.Tabs;
-import forestry.arboriculture.IWoodTyped;
-import forestry.arboriculture.render.IconProviderWood;
-import forestry.arboriculture.tiles.TileWood;
-import forestry.core.render.ParticleHelper;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;
import net.minecraft.block.ITileEntityProvider;
@@ -36,6 +26,16 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.api.arboriculture.TreeManager;
+import forestry.api.core.Tabs;
+import forestry.arboriculture.IWoodTyped;
+import forestry.arboriculture.render.IconProviderWood;
+import forestry.arboriculture.tiles.TileWood;
+import forestry.core.render.ParticleHelper;
+
public class BlockArbStairs extends BlockStairs implements IWoodTyped, ITileEntityProvider {
private final ParticleHelper.Callback particleCallback;
@@ -54,7 +54,7 @@ public class BlockArbStairs extends BlockStairs implements IWoodTyped, ITileEnti
this.particleCallback = new ParticleHelper.DefaultCallback(this);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
@@ -64,8 +64,8 @@ public class BlockArbStairs extends BlockStairs implements IWoodTyped, ITileEnti
}
/* DROP HANDLING */
- // Hack: When harvesting we need to get the drops in onBlockHarvested,
- // because Mojang destroys the block and tile before calling getDrops.
+ // Hack: When harvesting we need to get the drops in onBlockHarvested,
+ // because Mojang destroys the block and tile before calling getDrops.
private final ThreadLocal> drops = new ThreadLocal<>();
@Override
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockArboriculture.java b/src/main/java/forestry/arboriculture/blocks/BlockArboriculture.java
index 500d73969..5bdef3f78 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockArboriculture.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockArboriculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
@@ -14,6 +12,7 @@ import forestry.api.core.Tabs;
import forestry.core.blocks.BlockBase;
public class BlockArboriculture extends BlockBase {
+
public BlockArboriculture() {
super(true);
setCreativeTab(Tabs.tabArboriculture);
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockArboricultureType.java b/src/main/java/forestry/arboriculture/blocks/BlockArboricultureType.java
index 946a32b7d..8e107404b 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockArboricultureType.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockArboricultureType.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
@@ -17,7 +15,9 @@ import forestry.core.render.IBlockRenderer;
import forestry.core.tiles.TileForestry;
public enum BlockArboricultureType implements IMachinePropertiesTESR {
+
ARBCHEST(TileArboristChest.class, "ArbChest") {
+
@Override
public IBlockRenderer getRenderer() {
return Proxies.render.getRenderChest("arbchest");
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java b/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java
index dee0dc964..d08856887 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java
@@ -1,16 +1,41 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+
+import javax.annotation.Nullable;
+
+import net.minecraft.block.BlockNewLeaf;
+import net.minecraft.block.IGrowable;
+import net.minecraft.block.ITileEntityProvider;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumGermlingType;
@@ -31,29 +56,6 @@ import forestry.arboriculture.tiles.TileLeaves;
import forestry.core.proxy.Proxies;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginArboriculture;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Random;
-import javax.annotation.Nullable;
-import net.minecraft.block.BlockNewLeaf;
-import net.minecraft.block.IGrowable;
-import net.minecraft.block.ITileEntityProvider;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public class BlockForestryLeaves extends BlockNewLeaf implements ITileEntityProvider, IGrowable {
@@ -77,7 +79,7 @@ public class BlockForestryLeaves extends BlockNewLeaf implements ITileEntityProv
@SideOnly(Side.CLIENT)
@Override
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (ITree tree : TreeManager.treeRoot.getIndividualTemplates()) {
@@ -96,8 +98,8 @@ public class BlockForestryLeaves extends BlockNewLeaf implements ITileEntityProv
}
/* DROP HANDLING */
- // Hack: When harvesting leaves we need to get the drops in onBlockHarvested,
- // because Mojang destroys the block and tile before calling getDrops.
+ // Hack: When harvesting leaves we need to get the drops in onBlockHarvested,
+ // because Mojang destroys the block and tile before calling getDrops.
private final ThreadLocal> drops = new ThreadLocal<>();
@Override
@@ -138,8 +140,8 @@ public class BlockForestryLeaves extends BlockNewLeaf implements ITileEntityProv
return ret;
}
- private static ArrayList getLeafDrop(
- World world, @Nullable GameProfile playerProfile, int x, int y, int z, float saplingModifier, int fortune) {
+ private static ArrayList getLeafDrop(World world, @Nullable GameProfile playerProfile, int x, int y,
+ int z, float saplingModifier, int fortune) {
ArrayList prod = new ArrayList<>();
TileLeaves tile = getLeafTile(world, x, y, z);
@@ -330,15 +332,15 @@ public class BlockForestryLeaves extends BlockNewLeaf implements ITileEntityProv
}
@Override
- public boolean onBlockActivated(
- World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7,
+ float par8, float par9) {
ItemStack heldItem = player.getHeldItem();
TileEntity tile = world.getTileEntity(x, y, z);
IButterfly caterpillar = tile instanceof TileLeaves ? ((TileLeaves) tile).getCaterpillar() : null;
if (heldItem != null && (heldItem.getItem() instanceof IToolScoop) && caterpillar != null) {
- ItemStack butterfly =
- ButterflyManager.butterflyRoot.getMemberStack(caterpillar, EnumFlutterType.CATERPILLAR.ordinal());
+ ItemStack butterfly = ButterflyManager.butterflyRoot
+ .getMemberStack(caterpillar, EnumFlutterType.CATERPILLAR.ordinal());
ItemStackUtil.dropItemStackAsEntity(butterfly, world, x, y, z);
((TileLeaves) tile).setCaterpillar(null);
return true;
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java b/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java
index 14d67fdfb..da4b898a8 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockFruitPod.java
@@ -1,24 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.arboriculture.tiles.TileFruitPod;
-import forestry.core.render.TextureManager;
-import forestry.core.utils.BlockUtil;
-import forestry.core.utils.ItemStackUtil;
-import forestry.plugins.PluginArboriculture;
import java.util.ArrayList;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockCocoa;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -29,6 +21,14 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.arboriculture.tiles.TileFruitPod;
+import forestry.core.render.TextureManager;
+import forestry.core.utils.BlockUtil;
+import forestry.core.utils.ItemStackUtil;
+import forestry.plugins.PluginArboriculture;
+
public class BlockFruitPod extends BlockCocoa {
public BlockFruitPod() {
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockLog.java b/src/main/java/forestry/arboriculture/blocks/BlockLog.java
index b129dfdc4..d6044a928 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockLog.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockLog.java
@@ -1,22 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.api.arboriculture.TreeManager;
-import forestry.arboriculture.render.IconProviderWood;
-import forestry.arboriculture.tiles.TileWood;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
@@ -26,6 +19,13 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.api.arboriculture.TreeManager;
+import forestry.arboriculture.render.IconProviderWood;
+import forestry.arboriculture.tiles.TileWood;
+
public class BlockLog extends BlockWood {
public BlockLog(boolean fireproof) {
@@ -46,8 +46,8 @@ public class BlockLog extends BlockWood {
byte radius = 4;
int boundary = radius + 1;
- if (world.checkChunksExist(
- x - boundary, y - boundary, z - boundary, x + boundary, y + boundary, z + boundary)) {
+ if (world
+ .checkChunksExist(x - boundary, y - boundary, z - boundary, x + boundary, y + boundary, z + boundary)) {
for (int i = -radius; i <= radius; ++i) {
for (int j = -radius; j <= radius; ++j) {
for (int k = -radius; k <= radius; ++k) {
@@ -81,7 +81,7 @@ public class BlockLog extends BlockWood {
return meta | b0;
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (EnumWoodType woodType : EnumWoodType.VALUES) {
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockPlanks.java b/src/main/java/forestry/arboriculture/blocks/BlockPlanks.java
index f5972ad08..57aafe8c8 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockPlanks.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockPlanks.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumWoodType;
import forestry.api.arboriculture.TreeManager;
import forestry.arboriculture.render.IconProviderWood;
import forestry.arboriculture.tiles.TileWood;
-import java.util.List;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class BlockPlanks extends BlockWood {
@@ -30,7 +30,7 @@ public class BlockPlanks extends BlockWood {
setHarvestLevel("axe", 0);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List list) {
for (EnumWoodType woodType : EnumWoodType.VALUES) {
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java b/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java
index 5ee583a87..005648bba 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockRegistryArboriculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
@@ -17,6 +15,7 @@ import forestry.core.blocks.BlockRegistry;
import forestry.core.items.ItemBlockForestry;
public class BlockRegistryArboriculture extends BlockRegistry {
+
public final BlockLog logs;
public final BlockPlanks planks;
public final BlockSlab slabs;
@@ -49,8 +48,12 @@ public class BlockRegistryArboriculture extends BlockRegistry {
slabs = registerBlock(blockSlab, ItemBlockWoodSlab.class, "slabs", blockSlabDouble, blockSlab);
registerOreDictWildcard("slabWood", slabs);
- slabsDouble =
- registerBlock(blockSlabDouble, ItemBlockWoodSlab.class, "slabsDouble", blockSlabDouble, blockSlab);
+ slabsDouble = registerBlock(
+ blockSlabDouble,
+ ItemBlockWoodSlab.class,
+ "slabsDouble",
+ blockSlabDouble,
+ blockSlab);
fences = registerBlock(new BlockArbFence(false), ItemBlockWood.class, "fences");
registerOreDictWildcard("fenceWood", fences);
@@ -84,8 +87,10 @@ public class BlockRegistryArboriculture extends BlockRegistry {
fencesFireproof = registerBlock(new BlockArbFence(true), ItemBlockWood.class, "fencesFireproof");
registerOreDictWildcard("fenceWood", fencesFireproof);
- stairsFireproof =
- registerBlock(new BlockArbStairs(planksFireproof, true), ItemBlockWood.class, "stairsFireproof");
+ stairsFireproof = registerBlock(
+ new BlockArbStairs(planksFireproof, true),
+ ItemBlockWood.class,
+ "stairsFireproof");
registerOreDictWildcard("stairWood", stairsFireproof);
// Saplings
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockSapling.java b/src/main/java/forestry/arboriculture/blocks/BlockSapling.java
index 604978a79..0c9e1ec10 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockSapling.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockSapling.java
@@ -1,15 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.IGrowable;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumGermlingType;
@@ -23,20 +37,6 @@ import forestry.core.render.TextureManager;
import forestry.core.tiles.TileUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginArboriculture;
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.IGrowable;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
public class BlockSapling extends BlockTreeContainer implements IGrowable {
@@ -88,8 +88,7 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable {
public void registerBlockIcons(IIconRegister register) {
defaultIcon = TextureManager.registerTex(register, "germlings/sapling.treeBalsa");
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleTreeSpecies) {
((IAlleleTreeSpecies) allele).getIconProvider().registerIcons(register);
}
@@ -176,8 +175,8 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable {
TileSapling sapling = getSaplingTile(world, x, y, z);
if (sapling != null && sapling.getTree() != null) {
- ItemStack saplingStack =
- TreeManager.treeRoot.getMemberStack(sapling.getTree(), EnumGermlingType.SAPLING.ordinal());
+ ItemStack saplingStack = TreeManager.treeRoot
+ .getMemberStack(sapling.getTree(), EnumGermlingType.SAPLING.ordinal());
ItemStackUtil.dropItemStackAsEntity(saplingStack, world, x, y, z);
}
}
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockSlab.java b/src/main/java/forestry/arboriculture/blocks/BlockSlab.java
index d957ef3e5..f36b0e82a 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockSlab.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockSlab.java
@@ -1,26 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.api.arboriculture.TreeManager;
-import forestry.api.core.Tabs;
-import forestry.arboriculture.IWoodTyped;
-import forestry.arboriculture.render.IconProviderWood;
-import forestry.arboriculture.tiles.TileWood;
-import forestry.core.render.ParticleHelper;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.client.particle.EffectRenderer;
@@ -37,6 +27,16 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.api.arboriculture.TreeManager;
+import forestry.api.core.Tabs;
+import forestry.arboriculture.IWoodTyped;
+import forestry.arboriculture.render.IconProviderWood;
+import forestry.arboriculture.tiles.TileWood;
+import forestry.core.render.ParticleHelper;
+
public class BlockSlab extends net.minecraft.block.BlockSlab implements IWoodTyped, ITileEntityProvider {
private final ParticleHelper.Callback particleCallback;
@@ -92,7 +92,7 @@ public class BlockSlab extends net.minecraft.block.BlockSlab implements IWoodTyp
return "SomeSlab";
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List list) {
if (!isDoubleSlab()) {
@@ -114,8 +114,8 @@ public class BlockSlab extends net.minecraft.block.BlockSlab implements IWoodTyp
}
/* DROP HANDLING */
- // Hack: When harvesting we need to get the drops in onBlockHarvested,
- // because Mojang destroys the block and tile before calling getDrops.
+ // Hack: When harvesting we need to get the drops in onBlockHarvested,
+ // because Mojang destroys the block and tile before calling getDrops.
private final ThreadLocal> drops = new ThreadLocal<>();
@Override
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java b/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java
index 03c82e867..acd8cfe16 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockTreeContainer.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
-import forestry.arboriculture.tiles.TileTreeContainer;
import java.util.Random;
+
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+import forestry.arboriculture.tiles.TileTreeContainer;
+
public abstract class BlockTreeContainer extends BlockContainer {
protected BlockTreeContainer(Material material) {
diff --git a/src/main/java/forestry/arboriculture/blocks/BlockWood.java b/src/main/java/forestry/arboriculture/blocks/BlockWood.java
index 655eb4551..7070c3cac 100644
--- a/src/main/java/forestry/arboriculture/blocks/BlockWood.java
+++ b/src/main/java/forestry/arboriculture/blocks/BlockWood.java
@@ -1,24 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.api.core.Tabs;
-import forestry.arboriculture.IWoodTyped;
-import forestry.arboriculture.render.IconProviderWood;
-import forestry.arboriculture.tiles.TileWood;
-import forestry.core.render.ParticleHelper;
import java.util.ArrayList;
+
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
@@ -33,6 +24,15 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.api.core.Tabs;
+import forestry.arboriculture.IWoodTyped;
+import forestry.arboriculture.render.IconProviderWood;
+import forestry.arboriculture.tiles.TileWood;
+import forestry.core.render.ParticleHelper;
+
public abstract class BlockWood extends Block implements ITileEntityProvider, IWoodTyped {
private final ParticleHelper.Callback particleCallback;
@@ -77,8 +77,8 @@ public abstract class BlockWood extends Block implements ITileEntityProvider, IW
}
/* DROP HANDLING */
- // Hack: When harvesting we need to get the drops in onBlockHarvested,
- // because Mojang destroys the block and tile before calling getDrops.
+ // Hack: When harvesting we need to get the drops in onBlockHarvested,
+ // because Mojang destroys the block and tile before calling getDrops.
private final ThreadLocal> drops = new ThreadLocal<>();
@Override
diff --git a/src/main/java/forestry/arboriculture/commands/CommandTree.java b/src/main/java/forestry/arboriculture/commands/CommandTree.java
index 5712bb3cc..05c6f9b9c 100644
--- a/src/main/java/forestry/arboriculture/commands/CommandTree.java
+++ b/src/main/java/forestry/arboriculture/commands/CommandTree.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.commands;
diff --git a/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java b/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java
index a236f02e1..ceec23628 100644
--- a/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java
+++ b/src/main/java/forestry/arboriculture/commands/CommandTreeSpawn.java
@@ -1,26 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.commands;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.command.ICommandSender;
+import net.minecraft.command.PlayerNotFoundException;
+import net.minecraft.entity.player.EntityPlayer;
+
+import org.apache.commons.lang3.StringUtils;
+
import forestry.api.arboriculture.IAlleleTreeSpecies;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
import forestry.core.commands.CommandHelpers;
import forestry.core.commands.SubCommand;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.command.PlayerNotFoundException;
-import net.minecraft.entity.player.EntityPlayer;
-import org.apache.commons.lang3.StringUtils;
public final class CommandTreeSpawn extends SubCommand {
@@ -72,8 +73,7 @@ public final class CommandTreeSpawn extends SubCommand {
private static String[] getSpecies() {
List species = new ArrayList<>();
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleTreeSpecies) {
species.add(allele.getName().replaceAll("\\s", ""));
}
diff --git a/src/main/java/forestry/arboriculture/commands/ForestSpawner.java b/src/main/java/forestry/arboriculture/commands/ForestSpawner.java
index 09148f726..eb8ef8426 100644
--- a/src/main/java/forestry/arboriculture/commands/ForestSpawner.java
+++ b/src/main/java/forestry/arboriculture/commands/ForestSpawner.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.commands;
diff --git a/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java b/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java
index 7c25b1949..a55e10b35 100644
--- a/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java
+++ b/src/main/java/forestry/arboriculture/commands/ITreeSpawner.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.commands;
diff --git a/src/main/java/forestry/arboriculture/commands/TreeGenHelper.java b/src/main/java/forestry/arboriculture/commands/TreeGenHelper.java
index 59c3ec438..df53c30a4 100644
--- a/src/main/java/forestry/arboriculture/commands/TreeGenHelper.java
+++ b/src/main/java/forestry/arboriculture/commands/TreeGenHelper.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.commands;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
import forestry.api.arboriculture.IAlleleTreeSpecies;
import forestry.api.arboriculture.ITree;
import forestry.api.arboriculture.ITreeGenome;
@@ -19,8 +20,6 @@ import forestry.api.genetics.IAllele;
import forestry.core.commands.SpeciesNotFoundException;
import forestry.core.commands.TemplateNotFoundException;
import forestry.core.worldgen.WorldGenBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.world.gen.feature.WorldGenerator;
public final class TreeGenHelper {
@@ -59,8 +58,7 @@ public final class TreeGenHelper {
}
if (species == null) {
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleTreeSpecies
&& allele.getName().replaceAll("\\s", "").equals(speciesName)) {
species = (IAlleleTreeSpecies) allele;
diff --git a/src/main/java/forestry/arboriculture/commands/TreeModeHelper.java b/src/main/java/forestry/arboriculture/commands/TreeModeHelper.java
index afb173690..e4e866434 100644
--- a/src/main/java/forestry/arboriculture/commands/TreeModeHelper.java
+++ b/src/main/java/forestry/arboriculture/commands/TreeModeHelper.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.commands;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.world.World;
+
import forestry.api.arboriculture.ITreekeepingMode;
import forestry.api.arboriculture.TreeManager;
import forestry.core.commands.ICommandModeHelper;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.world.World;
public class TreeModeHelper implements ICommandModeHelper {
diff --git a/src/main/java/forestry/arboriculture/commands/TreeSpawner.java b/src/main/java/forestry/arboriculture/commands/TreeSpawner.java
index e32000656..0da28e2fe 100644
--- a/src/main/java/forestry/arboriculture/commands/TreeSpawner.java
+++ b/src/main/java/forestry/arboriculture/commands/TreeSpawner.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.commands;
diff --git a/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java b/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java
index 90f59fa1e..6d21bdc28 100644
--- a/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java
+++ b/src/main/java/forestry/arboriculture/commands/TreeStatsSaveHelper.java
@@ -1,16 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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;
@@ -18,9 +22,6 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IBreedingTracker;
import forestry.core.commands.IStatsSaveHelper;
-import java.util.ArrayList;
-import java.util.Collection;
-import net.minecraft.world.World;
public class TreeStatsSaveHelper implements IStatsSaveHelper {
@@ -35,8 +36,7 @@ public class TreeStatsSaveHelper implements IStatsSaveHelper {
@Override
public Collection getSpecies() {
Collection species = new ArrayList<>();
- for (IAllele allele :
- AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
+ for (IAllele allele : AlleleManager.alleleRegistry.getRegisteredAlleles().values()) {
if (allele instanceof IAlleleTreeSpecies) {
species.add((IAlleleTreeSpecies) allele);
}
diff --git a/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java b/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java
index 84209483a..25e6056d5 100755
--- a/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java
+++ b/src/main/java/forestry/arboriculture/genetics/ArboristTracker.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 {
diff --git a/src/main/java/forestry/arboriculture/genetics/BranchTrees.java b/src/main/java/forestry/arboriculture/genetics/BranchTrees.java
index da246f04a..a6723cfee 100755
--- a/src/main/java/forestry/arboriculture/genetics/BranchTrees.java
+++ b/src/main/java/forestry/arboriculture/genetics/BranchTrees.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
diff --git a/src/main/java/forestry/arboriculture/genetics/GrowthProvider.java b/src/main/java/forestry/arboriculture/genetics/GrowthProvider.java
index 610108e4f..6d54734e4 100755
--- a/src/main/java/forestry/arboriculture/genetics/GrowthProvider.java
+++ b/src/main/java/forestry/arboriculture/genetics/GrowthProvider.java
@@ -1,15 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import forestry.api.arboriculture.EnumGrowthConditions;
import forestry.api.arboriculture.IGrowthProvider;
import forestry.api.arboriculture.ITree;
@@ -18,15 +20,12 @@ import forestry.arboriculture.tiles.TileSapling;
import forestry.core.utils.BlockUtil;
import forestry.core.utils.StringUtil;
import forestry.core.utils.vect.Vect;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public class GrowthProvider implements IGrowthProvider {
@Override
- public boolean canGrow(
- ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth, int expectedHeight) {
+ public boolean canGrow(ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth,
+ int expectedHeight) {
if (!hasRoom(world, xPos, yPos, zPos, expectedGirth, expectedHeight)) {
return false;
}
@@ -53,8 +52,8 @@ public class GrowthProvider implements IGrowthProvider {
return new String[0];
}
- protected static EnumGrowthConditions getConditionsFromRainfall(
- World world, int xPos, int yPos, int zPos, float min, float max) {
+ protected static EnumGrowthConditions getConditionsFromRainfall(World world, int xPos, int yPos, int zPos,
+ float min, float max) {
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(xPos, zPos);
if (biome.rainfall < min || biome.rainfall > max) {
@@ -64,8 +63,8 @@ public class GrowthProvider implements IGrowthProvider {
return EnumGrowthConditions.EXCELLENT;
}
- protected static EnumGrowthConditions getConditionsFromTemperature(
- World world, int xPos, int yPos, int zPos, float min, float max) {
+ protected static EnumGrowthConditions getConditionsFromTemperature(World world, int xPos, int yPos, int zPos,
+ float min, float max) {
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(xPos, zPos);
float biomeTemperature = biome.getFloatTemperature(xPos, yPos, zPos);
@@ -116,8 +115,8 @@ public class GrowthProvider implements IGrowthProvider {
return true;
}
- private static boolean hasSufficientSaplings(
- ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth) {
+ private static boolean hasSufficientSaplings(ITreeGenome genome, World world, int xPos, int yPos, int zPos,
+ int expectedGirth) {
if (expectedGirth == 1) {
return true;
@@ -138,11 +137,7 @@ public class GrowthProvider implements IGrowthProvider {
}
ITree tree = ((TileSapling) tile).getTree();
- if (tree == null
- || !tree.getGenome()
- .getPrimary()
- .getUID()
- .equals(genome.getPrimary().getUID())) {
+ if (tree == null || !tree.getGenome().getPrimary().getUID().equals(genome.getPrimary().getUID())) {
return false;
}
}
diff --git a/src/main/java/forestry/arboriculture/genetics/GrowthProviderTropical.java b/src/main/java/forestry/arboriculture/genetics/GrowthProviderTropical.java
index f41a6c814..3d29d5a22 100755
--- a/src/main/java/forestry/arboriculture/genetics/GrowthProviderTropical.java
+++ b/src/main/java/forestry/arboriculture/genetics/GrowthProviderTropical.java
@@ -1,34 +1,44 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import java.util.EnumSet;
+
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import forestry.api.arboriculture.EnumGrowthConditions;
import forestry.api.arboriculture.ITreeGenome;
import forestry.core.utils.StringUtil;
-import java.util.EnumSet;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public class GrowthProviderTropical extends GrowthProvider {
@Override
public EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, int xPos, int yPos, int zPos) {
EnumGrowthConditions light = getConditionFromLight(world, xPos, yPos, zPos);
- EnumGrowthConditions moisture =
- getConditionsFromRainfall(world, xPos, yPos, zPos, BiomeGenBase.jungle.rainfall, 2.0f);
+ EnumGrowthConditions moisture = getConditionsFromRainfall(
+ world,
+ xPos,
+ yPos,
+ zPos,
+ BiomeGenBase.jungle.rainfall,
+ 2.0f);
float jungleTemperature = BiomeGenBase.jungle.getFloatTemperature(xPos, yPos, zPos);
float desertTemperature = BiomeGenBase.desert.getFloatTemperature(xPos, yPos, zPos);
- EnumGrowthConditions temperature =
- getConditionsFromTemperature(world, xPos, yPos, zPos, jungleTemperature, desertTemperature - 0.1f);
+ EnumGrowthConditions temperature = getConditionsFromTemperature(
+ world,
+ xPos,
+ yPos,
+ zPos,
+ jungleTemperature,
+ desertTemperature - 0.1f);
EnumSet conditions = EnumSet.of(light, moisture, temperature);
diff --git a/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java b/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java
index 625bfd3c0..3d60bfb24 100644
--- a/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java
+++ b/src/main/java/forestry/arboriculture/genetics/ITreeDefinition.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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
ITreeGenome getGenome();
diff --git a/src/main/java/forestry/arboriculture/genetics/Tree.java b/src/main/java/forestry/arboriculture/genetics/Tree.java
index cd622ec23..dfca8ae9b 100755
--- a/src/main/java/forestry/arboriculture/genetics/Tree.java
+++ b/src/main/java/forestry/arboriculture/genetics/Tree.java
@@ -1,16 +1,34 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+import net.minecraftforge.common.EnumPlantType;
+import net.minecraftforge.common.IPlantable;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.arboriculture.EnumGrowthConditions;
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleLeafEffect;
@@ -33,22 +51,6 @@ import forestry.core.config.Config;
import forestry.core.genetics.Chromosome;
import forestry.core.genetics.Individual;
import forestry.core.utils.StringUtil;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.EnumSet;
-import java.util.List;
-import javax.annotation.Nullable;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
-import net.minecraftforge.common.EnumPlantType;
-import net.minecraftforge.common.IPlantable;
-import net.minecraftforge.common.util.ForgeDirection;
public class Tree extends Individual implements ITree, IPlantable {
@@ -288,9 +290,7 @@ public class Tree extends Individual implements ITree, IPlantable {
@Override
public boolean isPureBred(EnumTreeChromosome chromosome) {
- return genome.getActiveAllele(chromosome)
- .getUID()
- .equals(genome.getInactiveAllele(chromosome).getUID());
+ return genome.getActiveAllele(chromosome).getUID().equals(genome.getInactiveAllele(chromosome).getUID());
}
@Override
@@ -311,10 +311,9 @@ public class Tree extends Individual implements ITree, IPlantable {
IAlleleTreeSpecies primary = genome.getPrimary();
IAlleleTreeSpecies secondary = genome.getSecondary();
if (!isPureBred(EnumTreeChromosome.SPECIES)) {
- list.add(EnumChatFormatting.BLUE
- + StringUtil.localize("trees.hybrid")
- .replaceAll("%PRIMARY", primary.getName())
- .replaceAll("%SECONDARY", secondary.getName()));
+ list.add(
+ EnumChatFormatting.BLUE + StringUtil.localize("trees.hybrid")
+ .replaceAll("%PRIMARY", primary.getName()).replaceAll("%SECONDARY", secondary.getName()));
}
String sappiness = EnumChatFormatting.GOLD + "S: "
@@ -326,8 +325,7 @@ public class Tree extends Individual implements ITree, IPlantable {
String girth = EnumChatFormatting.AQUA + "G: " + String.format("%sx%s", genome.getGirth(), genome.getGirth());
String saplings = EnumChatFormatting.YELLOW + "S: "
+ genome.getActiveAllele(EnumTreeChromosome.FERTILITY).getName();
- String yield = EnumChatFormatting.WHITE + "Y: "
- + genome.getActiveAllele(EnumTreeChromosome.YIELD).getName();
+ String yield = EnumChatFormatting.WHITE + "Y: " + genome.getActiveAllele(EnumTreeChromosome.YIELD).getName();
list.add(String.format("%s, %s", saplings, maturation));
list.add(String.format("%s, %s", height, girth));
list.add(String.format("%s, %s", yield, sappiness));
@@ -343,8 +341,10 @@ public class Tree extends Individual implements ITree, IPlantable {
if (!canBearFruit()) {
strike = EnumChatFormatting.STRIKETHROUGH.toString();
}
- list.add(strike + EnumChatFormatting.GREEN + "F: "
- + StringUtil.localize(genome.getFruitProvider().getDescription()));
+ list.add(
+ strike + EnumChatFormatting.GREEN
+ + "F: "
+ + StringUtil.localize(genome.getFruitProvider().getDescription()));
}
}
@@ -392,14 +392,8 @@ public class Tree extends Individual implements ITree, IPlantable {
return new Tree(new TreeGenome(chromosomes));
}
- private static IChromosome[] mutateSpecies(
- World world,
- @Nullable GameProfile playerProfile,
- int x,
- int y,
- int z,
- ITreeGenome genomeOne,
- ITreeGenome genomeTwo) {
+ private static IChromosome[] mutateSpecies(World world, @Nullable GameProfile playerProfile, int x, int y, int z,
+ ITreeGenome genomeOne, ITreeGenome genomeTwo) {
IChromosome[] parent1 = genomeOne.getChromosomes();
IChromosome[] parent2 = genomeTwo.getChromosomes();
@@ -459,9 +453,7 @@ public class Tree extends Individual implements ITree, IPlantable {
/* PRODUCTION */
@Override
public boolean canBearFruit() {
- return genome.getPrimary()
- .getSuitableFruit()
- .contains(genome.getFruitProvider().getFamily());
+ return genome.getPrimary().getSuitableFruit().contains(genome.getFruitProvider().getFamily());
}
@Override
diff --git a/src/main/java/forestry/arboriculture/genetics/TreeBranchDefinition.java b/src/main/java/forestry/arboriculture/genetics/TreeBranchDefinition.java
index 176c99ade..37122ade3 100644
--- a/src/main/java/forestry/arboriculture/genetics/TreeBranchDefinition.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreeBranchDefinition.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import java.util.Arrays;
+import java.util.Locale;
+
+import org.apache.commons.lang3.text.WordUtils;
+
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
@@ -23,11 +26,9 @@ import forestry.core.genetics.IBranchDefinition;
import forestry.core.genetics.alleles.AlleleHelper;
import forestry.core.genetics.alleles.AllelePlantType;
import forestry.core.genetics.alleles.EnumAllele;
-import java.util.Arrays;
-import java.util.Locale;
-import org.apache.commons.lang3.text.WordUtils;
public enum TreeBranchDefinition implements IBranchDefinition {
+
ACACIA,
ACER,
ADANSONIA,
@@ -61,8 +62,7 @@ public enum TreeBranchDefinition implements IBranchDefinition {
// unclassified
CARICA,
- TROPICAL(""),
- ;
+ TROPICAL(""),;
private final IClassification branch;
@@ -111,152 +111,190 @@ public enum TreeBranchDefinition implements IBranchDefinition {
IClassification plantae = alleleRegistry.getClassification("kingdom.plantae");
- plantae.addMemberGroup(alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.DIVISION,
- "angiosperms",
- "Angiosperms",
+ plantae.addMemberGroup(
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.CLASS,
- "asterids",
- "Asterids",
+ EnumClassLevel.DIVISION,
+ "angiosperms",
+ "Angiosperms",
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "ericales",
- "Ericales",
+ EnumClassLevel.CLASS,
+ "asterids",
+ "Asterids",
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "ebenaceae", "Ebenaceae", EBONY.getBranch()),
+ EnumClassLevel.ORDER,
+ "ericales",
+ "Ericales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "ebenaceae",
+ "Ebenaceae",
+ EBONY.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "fabaceae",
+ "Fabaceae",
+ ACACIA.getBranch(),
+ DALBERGIA.getBranch(),
+ MILLETTIA.getBranch(),
+ PTEROCARPUS.getBranch())),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "fabaceae",
- "Fabaceae",
- ACACIA.getBranch(),
- DALBERGIA.getBranch(),
- MILLETTIA.getBranch(),
- PTEROCARPUS.getBranch())),
+ EnumClassLevel.ORDER,
+ "lamiales",
+ "Lamiales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "bignoniaceae",
+ "Bignoniaceae",
+ TABEBUIA.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "lamiaceae",
+ "Lamiaceae",
+ TECTONA.getBranch()))),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "lamiales",
- "Lamiales",
+ EnumClassLevel.CLASS,
+ "commelinids",
+ "Commelinids",
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "bignoniaceae", "Bignoniaceae", TABEBUIA.getBranch()),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "lamiaceae", "Lamiaceae", TECTONA.getBranch()))),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.CLASS,
- "commelinids",
- "Commelinids",
+ EnumClassLevel.ORDER,
+ "arecales",
+ "Arecales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "arecaceae",
+ "Arecaceae",
+ PHOENIX.getBranch()))),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "arecales",
- "Arecales",
+ EnumClassLevel.CLASS,
+ "rosids",
+ "Rosids",
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "arecaceae", "Arecaceae", PHOENIX.getBranch()))),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.CLASS,
- "rosids",
- "Rosids",
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "brassicales",
- "Brassicales",
+ EnumClassLevel.ORDER,
+ "brassicales",
+ "Brassicales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "caricaceae",
+ "Caricaceae")),
+ alleleRegistry
+ .createAndRegisterClassification(EnumClassLevel.ORDER, "fabales", "Fabales"),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "caricaceae", "Caricaceae")),
- alleleRegistry.createAndRegisterClassification(EnumClassLevel.ORDER, "fabales", "Fabales"),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "fagales",
- "Fagales",
+ EnumClassLevel.ORDER,
+ "fagales",
+ "Fagales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "betulaceae",
+ "Betulaceae",
+ BETULA.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "fagaceae",
+ "Fagaceae",
+ CASTANEA.getBranch(),
+ QUERCUS.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "juglandaceae",
+ "Juglandaceae",
+ JUGLANS.getBranch())),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "betulaceae", "Betulaceae", BETULA.getBranch()),
+ EnumClassLevel.ORDER,
+ "rosales",
+ "Rosales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "rosaceae",
+ "Rosaceae",
+ PRUNUS.getBranch())),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "fagaceae",
- "Fagaceae",
- CASTANEA.getBranch(),
- QUERCUS.getBranch()),
+ EnumClassLevel.ORDER,
+ "malvales",
+ "Malvales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "dipterocarpaceae",
+ "Dipterocarpaceae",
+ MAHOGANY.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "malvaceae",
+ "Malvaceae",
+ ADANSONIA.getBranch(),
+ CEIBA.getBranch(),
+ OCHROMA.getBranch(),
+ TALIPARITI.getBranch(),
+ TILIA.getBranch())),
+ alleleRegistry
+ .createAndRegisterClassification(EnumClassLevel.ORDER, "laurales", "Laurales"),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "juglandaceae", "Juglandaceae", JUGLANS.getBranch())),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "rosales",
- "Rosales",
+ EnumClassLevel.ORDER,
+ "malpighiales",
+ "Malpighiales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "salicaceae",
+ "Salicaceae",
+ CHLOROCARDIUM.getBranch(),
+ POPULUS.getBranch(),
+ SALIX.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "lauraceae",
+ "Lauraceae")),
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "rosaceae", "Rosaceae", PRUNUS.getBranch())),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "malvales",
- "Malvales",
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "dipterocarpaceae",
- "Dipterocarpaceae",
- MAHOGANY.getBranch()),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "malvaceae",
- "Malvaceae",
- ADANSONIA.getBranch(),
- CEIBA.getBranch(),
- OCHROMA.getBranch(),
- TALIPARITI.getBranch(),
- TILIA.getBranch())),
- alleleRegistry.createAndRegisterClassification(EnumClassLevel.ORDER, "laurales", "Laurales"),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "malpighiales",
- "Malpighiales",
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "salicaceae",
- "Salicaceae",
- CHLOROCARDIUM.getBranch(),
- POPULUS.getBranch(),
- SALIX.getBranch()),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "lauraceae", "Lauraceae")),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "sapindales",
- "Sapindales",
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "rutaceae", "Rutaceae", CITRUS.getBranch()),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY, "sapindaceae", "Sapindaceae", ACER.getBranch()),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "anacardiaceae",
- "Anacardiaceae",
- ASTRONIUM.getBranch())))));
+ EnumClassLevel.ORDER,
+ "sapindales",
+ "Sapindales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "rutaceae",
+ "Rutaceae",
+ CITRUS.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "sapindaceae",
+ "Sapindaceae",
+ ACER.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "anacardiaceae",
+ "Anacardiaceae",
+ ASTRONIUM.getBranch())))));
- plantae.addMemberGroup(alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.DIVISION,
- "pinophyta",
- "Pinophyta",
+ plantae.addMemberGroup(
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.CLASS,
- "pinopsida",
- "Pinopsida",
+ EnumClassLevel.DIVISION,
+ "pinophyta",
+ "Pinophyta",
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.ORDER,
- "pinales",
- "Pinales",
+ EnumClassLevel.CLASS,
+ "pinopsida",
+ "Pinopsida",
alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "pinaceae",
- "Pinaceae",
- PICEA.getBranch(),
- PINUS.getBranch(),
- LARIX.getBranch()),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.FAMILY,
- "cupressaceae",
- "Cupressaceae",
- SEQUOIA.getBranch(),
- SEQUOIADENDRON.getBranch()))),
- alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.CLASS, "magnoliopsida", "Magnoliopsida")));
+ EnumClassLevel.ORDER,
+ "pinales",
+ "Pinales",
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "pinaceae",
+ "Pinaceae",
+ PICEA.getBranch(),
+ PINUS.getBranch(),
+ LARIX.getBranch()),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.FAMILY,
+ "cupressaceae",
+ "Cupressaceae",
+ SEQUOIA.getBranch(),
+ SEQUOIADENDRON.getBranch()))),
+ alleleRegistry.createAndRegisterClassification(
+ EnumClassLevel.CLASS,
+ "magnoliopsida",
+ "Magnoliopsida")));
- plantae.addMemberGroup(alleleRegistry.createAndRegisterClassification(
- EnumClassLevel.DIVISION, "magnoliophyta", "Magnoliophyta"));
+ plantae.addMemberGroup(
+ alleleRegistry
+ .createAndRegisterClassification(EnumClassLevel.DIVISION, "magnoliophyta", "Magnoliophyta"));
}
}
diff --git a/src/main/java/forestry/arboriculture/genetics/TreeDefinition.java b/src/main/java/forestry/arboriculture/genetics/TreeDefinition.java
index 73d7726b3..d7688381a 100644
--- a/src/main/java/forestry/arboriculture/genetics/TreeDefinition.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreeDefinition.java
@@ -1,16 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import java.awt.Color;
+import java.util.Arrays;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.arboriculture.EnumFruitFamily;
import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.arboriculture.EnumLeafType;
@@ -76,26 +85,12 @@ import forestry.core.genetics.alleles.AlleleHelper;
import forestry.core.genetics.alleles.AllelePlantType;
import forestry.core.genetics.alleles.EnumAllele;
import forestry.plugins.PluginArboriculture;
-import java.awt.Color;
-import java.util.Arrays;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
-import net.minecraftforge.common.util.ForgeDirection;
public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
- Oak(
- TreeBranchDefinition.QUERCUS,
- "appleOak",
- "robur",
- false,
- EnumLeafType.DECIDUOUS,
- new Color(4764952),
- new Color(4764952).brighter(),
- 0,
- new ItemStack(Blocks.log, 1, 0)) {
+
+ Oak(TreeBranchDefinition.QUERCUS, "appleOak", "robur", false, EnumLeafType.DECIDUOUS, new Color(4764952),
+ new Color(4764952).brighter(), 0, new ItemStack(Blocks.log, 1, 0)) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenOak(tree);
@@ -118,16 +113,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
// vanilla
}
},
- DarkOak(
- TreeBranchDefinition.QUERCUS,
- "darkOak",
- "velutina",
- false,
- EnumLeafType.DECIDUOUS,
- new Color(4764952),
- new Color(4764952).brighter(),
- 5,
- new ItemStack(Blocks.log2, 1, 1)) {
+ DarkOak(TreeBranchDefinition.QUERCUS, "darkOak", "velutina", false, EnumLeafType.DECIDUOUS, new Color(4764952),
+ new Color(4764952).brighter(), 5, new ItemStack(Blocks.log2, 1, 1)) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenDarkOak(tree);
@@ -150,16 +138,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
// vanilla
}
},
- Birch(
- TreeBranchDefinition.BETULA,
- "silverBirch",
- "pendula",
- false,
- EnumLeafType.DECIDUOUS,
- new Color(8431445),
- new Color(0xb0c648),
- 2,
- new ItemStack(Blocks.log, 1, 2)) {
+ Birch(TreeBranchDefinition.BETULA, "silverBirch", "pendula", false, EnumLeafType.DECIDUOUS, new Color(8431445),
+ new Color(0xb0c648), 2, new ItemStack(Blocks.log, 1, 2)) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenBirch(tree);
@@ -179,15 +160,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
// vanilla
}
},
- Lime(
- TreeBranchDefinition.TILIA,
- "silverLime",
- "pendula",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x5ea107),
- new Color(0x5ea107).brighter(),
- EnumWoodType.LIME) {
+ Lime(TreeBranchDefinition.TILIA, "silverLime", "pendula", true, EnumLeafType.DECIDUOUS, new Color(0x5ea107),
+ new Color(0x5ea107).brighter(), EnumWoodType.LIME) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenSilverLime(tree);
@@ -203,9 +178,7 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
protected void setSpeciesProperties(IAlleleTreeSpeciesCustom treeSpecies) {
- treeSpecies
- .addFruitFamily(EnumFruitFamily.NUX)
- .addFruitFamily(EnumFruitFamily.PRUNES)
+ treeSpecies.addFruitFamily(EnumFruitFamily.NUX).addFruitFamily(EnumFruitFamily.PRUNES)
.addFruitFamily(EnumFruitFamily.POMES);
}
@@ -214,15 +187,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Birch, Oak, 15);
}
},
- Walnut(
- TreeBranchDefinition.JUGLANS,
- "commonWalnut",
- "regia",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x798c55),
- new Color(0xb0c648),
- EnumWoodType.WALNUT) {
+ Walnut(TreeBranchDefinition.JUGLANS, "commonWalnut", "regia", true, EnumLeafType.DECIDUOUS, new Color(0x798c55),
+ new Color(0xb0c648), EnumWoodType.WALNUT) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenWalnut(tree);
@@ -230,9 +197,7 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
protected void setSpeciesProperties(IAlleleTreeSpeciesCustom treeSpecies) {
- treeSpecies
- .addFruitFamily(EnumFruitFamily.NUX)
- .addFruitFamily(EnumFruitFamily.PRUNES)
+ treeSpecies.addFruitFamily(EnumFruitFamily.NUX).addFruitFamily(EnumFruitFamily.PRUNES)
.addFruitFamily(EnumFruitFamily.POMES);
}
@@ -251,15 +216,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Lime, Cherry, 10);
}
},
- Chestnut(
- TreeBranchDefinition.CASTANEA,
- "sweetChestnut",
- "sativa",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x5ea107),
- new Color(0xb0c648),
- EnumWoodType.CHESTNUT) {
+ Chestnut(TreeBranchDefinition.CASTANEA, "sweetChestnut", "sativa", true, EnumLeafType.DECIDUOUS,
+ new Color(0x5ea107), new Color(0xb0c648), EnumWoodType.CHESTNUT) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenChestnut(tree);
@@ -267,9 +226,7 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
protected void setSpeciesProperties(IAlleleTreeSpeciesCustom treeSpecies) {
- treeSpecies
- .addFruitFamily(EnumFruitFamily.NUX)
- .addFruitFamily(EnumFruitFamily.PRUNES)
+ treeSpecies.addFruitFamily(EnumFruitFamily.NUX).addFruitFamily(EnumFruitFamily.PRUNES)
.addFruitFamily(EnumFruitFamily.POMES);
}
@@ -288,15 +245,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Walnut, Cherry, 10);
}
},
- Cherry(
- TreeBranchDefinition.PRUNUS,
- "hillCherry",
- "serrulata",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0xe691da),
- new Color(0xe63e59),
- EnumWoodType.CHERRY) {
+ Cherry(TreeBranchDefinition.PRUNUS, "hillCherry", "serrulata", true, EnumLeafType.DECIDUOUS, new Color(0xe691da),
+ new Color(0xe63e59), EnumWoodType.CHERRY) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenCherry(tree);
@@ -322,15 +273,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Lime, Birch, 10);
}
},
- Lemon(
- TreeBranchDefinition.CITRUS,
- "lemon",
- "limon",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x88af54),
- new Color(0xa3b850),
- EnumWoodType.CITRUS) {
+ Lemon(TreeBranchDefinition.CITRUS, "lemon", "limon", true, EnumLeafType.DECIDUOUS, new Color(0x88af54),
+ new Color(0xa3b850), EnumWoodType.CITRUS) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenLemon(tree);
@@ -354,15 +299,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Lime, Cherry, 5);
}
},
- Plum(
- TreeBranchDefinition.PRUNUS,
- "plum",
- "domestica",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x589246),
- new Color(0xa3b850),
- EnumWoodType.PLUM) {
+ Plum(TreeBranchDefinition.PRUNUS, "plum", "domestica", true, EnumLeafType.DECIDUOUS, new Color(0x589246),
+ new Color(0xa3b850), EnumWoodType.PLUM) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenPlum(tree);
@@ -386,15 +325,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Lemon, Cherry, 5);
}
},
- Maple(
- TreeBranchDefinition.ACER,
- "sugarMaple",
- "saccharum",
- true,
- EnumLeafType.MAPLE,
- new Color(0xd4f425),
- new Color(0x619a3c),
- EnumWoodType.MAPLE) {
+ Maple(TreeBranchDefinition.ACER, "sugarMaple", "saccharum", true, EnumLeafType.MAPLE, new Color(0xd4f425),
+ new Color(0x619a3c), EnumWoodType.MAPLE) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenMaple(tree);
@@ -417,16 +350,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Spruce, Larch, 5);
}
},
- Spruce(
- TreeBranchDefinition.PICEA,
- "redSpruce",
- "abies",
- false,
- EnumLeafType.CONIFERS,
- new Color(6396257),
- new Color(0x539d12),
- 1,
- new ItemStack(Blocks.log, 1, 1)) {
+ Spruce(TreeBranchDefinition.PICEA, "redSpruce", "abies", false, EnumLeafType.CONIFERS, new Color(6396257),
+ new Color(0x539d12), 1, new ItemStack(Blocks.log, 1, 1)) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenSpruce(tree);
@@ -447,15 +373,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
// vanilla
}
},
- Larch(
- TreeBranchDefinition.LARIX,
- "mundaneLarch",
- "decidua",
- true,
- EnumLeafType.CONIFERS,
- new Color(0x698f90),
- new Color(0x569896),
- EnumWoodType.LARCH) {
+ Larch(TreeBranchDefinition.LARIX, "mundaneLarch", "decidua", true, EnumLeafType.CONIFERS, new Color(0x698f90),
+ new Color(0x569896), EnumWoodType.LARCH) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenLarch(tree);
@@ -477,15 +397,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Spruce, Oak, 10);
}
},
- Pine(
- TreeBranchDefinition.PINUS,
- "bullPine",
- "sabiniana",
- true,
- EnumLeafType.CONIFERS,
- new Color(0xfeff8f),
- new Color(0xffd98f),
- EnumWoodType.PINE) {
+ Pine(TreeBranchDefinition.PINUS, "bullPine", "sabiniana", true, EnumLeafType.CONIFERS, new Color(0xfeff8f),
+ new Color(0xffd98f), EnumWoodType.PINE) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenPine(tree);
@@ -506,15 +420,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Spruce, Larch, 10);
}
},
- Sequioa(
- TreeBranchDefinition.SEQUOIA,
- "coastSequoia",
- "sempervirens",
- false,
- EnumLeafType.CONIFERS,
- new Color(0x418e71),
- new Color(0x569896),
- EnumWoodType.SEQUOIA) {
+ Sequioa(TreeBranchDefinition.SEQUOIA, "coastSequoia", "sempervirens", false, EnumLeafType.CONIFERS,
+ new Color(0x418e71), new Color(0x569896), EnumWoodType.SEQUOIA) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenSequoia(tree);
@@ -537,15 +445,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Larch, Pine, 5);
}
},
- Gigant(
- TreeBranchDefinition.SEQUOIADENDRON,
- "giantSequoia",
- "giganteum",
- false,
- EnumLeafType.CONIFERS,
- new Color(0x738434),
- new Color(0x738434).brighter(),
- EnumWoodType.GIGANTEUM) {
+ Gigant(TreeBranchDefinition.SEQUOIADENDRON, "giantSequoia", "giganteum", false, EnumLeafType.CONIFERS,
+ new Color(0x738434), new Color(0x738434).brighter(), EnumWoodType.GIGANTEUM) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenGiganteum(tree);
@@ -568,16 +470,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Sequioa, Baobab, 1);
}
},
- Jungle(
- TreeBranchDefinition.TROPICAL,
- "jungle",
- "tectona",
- false,
- EnumLeafType.JUNGLE,
- new Color(4764952),
- new Color(0x658917),
- 3,
- new ItemStack(Blocks.log, 1, 3)) {
+ Jungle(TreeBranchDefinition.TROPICAL, "jungle", "tectona", false, EnumLeafType.JUNGLE, new Color(4764952),
+ new Color(0x658917), 3, new ItemStack(Blocks.log, 1, 3)) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenJungle(tree);
@@ -600,15 +495,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
// vanilla
}
},
- Teak(
- TreeBranchDefinition.TECTONA,
- "teak",
- "grandis",
- true,
- EnumLeafType.JUNGLE,
- new Color(0xfeff8f),
- new Color(0xffd98f),
- EnumWoodType.TEAK) {
+ Teak(TreeBranchDefinition.TECTONA, "teak", "grandis", true, EnumLeafType.JUNGLE, new Color(0xfeff8f),
+ new Color(0xffd98f), EnumWoodType.TEAK) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenTeak(tree);
@@ -629,15 +518,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(DarkOak, Jungle, 10);
}
},
- Ipe(
- TreeBranchDefinition.TABEBUIA,
- "ipe",
- "serratifolia",
- true,
- EnumLeafType.JUNGLE,
- new Color(0xfdd207),
- new Color(0xad8f04),
- EnumWoodType.IPE) {
+ Ipe(TreeBranchDefinition.TABEBUIA, "ipe", "serratifolia", true, EnumLeafType.JUNGLE, new Color(0xfdd207),
+ new Color(0xad8f04), EnumWoodType.IPE) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenIpe(tree);
@@ -660,15 +543,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Teak, DarkOak, 10);
}
},
- Kapok(
- TreeBranchDefinition.CEIBA,
- "kapok",
- "pentandra",
- true,
- EnumLeafType.JUNGLE,
- new Color(0x89987b),
- new Color(0x89aa9e),
- EnumWoodType.KAPOK) {
+ Kapok(TreeBranchDefinition.CEIBA, "kapok", "pentandra", true, EnumLeafType.JUNGLE, new Color(0x89987b),
+ new Color(0x89aa9e), EnumWoodType.KAPOK) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenKapok(tree);
@@ -691,15 +568,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Jungle, Teak, 10);
}
},
- Ebony(
- TreeBranchDefinition.EBONY,
- "myrtleEbony",
- "pentamera",
- true,
- EnumLeafType.JUNGLE,
- new Color(0xa2d24a),
- new Color(0xc4d24a),
- EnumWoodType.EBONY) {
+ Ebony(TreeBranchDefinition.EBONY, "myrtleEbony", "pentamera", true, EnumLeafType.JUNGLE, new Color(0xa2d24a),
+ new Color(0xc4d24a), EnumWoodType.EBONY) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenEbony(tree);
@@ -723,15 +594,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(DarkOak, Kapok, 10);
}
},
- Zebrawood(
- TreeBranchDefinition.ASTRONIUM,
- "zebrawood",
- "graveolens",
- false,
- EnumLeafType.JUNGLE,
- new Color(0xa2d24a),
- new Color(0xc4d24a),
- EnumWoodType.ZEBRAWOOD) {
+ Zebrawood(TreeBranchDefinition.ASTRONIUM, "zebrawood", "graveolens", false, EnumLeafType.JUNGLE,
+ new Color(0xa2d24a), new Color(0xc4d24a), EnumWoodType.ZEBRAWOOD) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenZebrawood(tree);
@@ -753,15 +618,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Ebony, Poplar, 5);
}
},
- Mahogony(
- TreeBranchDefinition.MAHOGANY,
- "yellowMeranti",
- "gibbosa",
- true,
- EnumLeafType.JUNGLE,
- new Color(0x8ab154),
- new Color(0xa9b154),
- EnumWoodType.MAHOGANY) {
+ Mahogony(TreeBranchDefinition.MAHOGANY, "yellowMeranti", "gibbosa", true, EnumLeafType.JUNGLE, new Color(0x8ab154),
+ new Color(0xa9b154), EnumWoodType.MAHOGANY) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenMahogany(tree);
@@ -785,16 +644,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Kapok, Ebony, 10);
}
},
- AcaciaVanilla(
- TreeBranchDefinition.ACACIA,
- "acacia",
- "aneura",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x616101),
- new Color(0xb3b302),
- 4,
- new ItemStack(Blocks.log2, 1, 0)) {
+ AcaciaVanilla(TreeBranchDefinition.ACACIA, "acacia", "aneura", true, EnumLeafType.DECIDUOUS, new Color(0x616101),
+ new Color(0xb3b302), 4, new ItemStack(Blocks.log2, 1, 0)) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenAcaciaVanilla(tree);
@@ -813,15 +665,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
// vanilla
}
},
- Acacia(
- TreeBranchDefinition.ACACIA,
- "desertAcacia",
- "erioloba",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x748C1C),
- new Color(0xb3b302),
- EnumWoodType.ACACIA) {
+ Acacia(TreeBranchDefinition.ACACIA, "desertAcacia", "erioloba", true, EnumLeafType.DECIDUOUS, new Color(0x748C1C),
+ new Color(0xb3b302), EnumWoodType.ACACIA) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenAcacia(tree);
@@ -842,15 +688,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Teak, Balsa, 10);
}
},
- Padauk(
- TreeBranchDefinition.PTEROCARPUS,
- "padauk",
- "soyauxii",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0xd0df8c),
- new Color(0x435c32),
- EnumWoodType.PADAUK) {
+ Padauk(TreeBranchDefinition.PTEROCARPUS, "padauk", "soyauxii", true, EnumLeafType.DECIDUOUS, new Color(0xd0df8c),
+ new Color(0x435c32), EnumWoodType.PADAUK) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenPadauk(tree);
@@ -872,15 +712,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(AcaciaVanilla, Jungle, 10);
}
},
- Balsa(
- TreeBranchDefinition.OCHROMA,
- "balsa",
- "pyramidale",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x59ac00),
- new Color(0xfeff8f),
- EnumWoodType.BALSA) {
+ Balsa(TreeBranchDefinition.OCHROMA, "balsa", "pyramidale", true, EnumLeafType.DECIDUOUS, new Color(0x59ac00),
+ new Color(0xfeff8f), EnumWoodType.BALSA) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenBalsa(tree);
@@ -903,15 +737,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Teak, AcaciaVanilla, 10);
}
},
- Cocobolo(
- TreeBranchDefinition.DALBERGIA,
- "cocobolo",
- "retusa",
- false,
- EnumLeafType.DECIDUOUS,
- new Color(0x6aa17a),
- new Color(0x487d4c),
- EnumWoodType.COCOBOLO) {
+ Cocobolo(TreeBranchDefinition.DALBERGIA, "cocobolo", "retusa", false, EnumLeafType.DECIDUOUS, new Color(0x6aa17a),
+ new Color(0x487d4c), EnumWoodType.COCOBOLO) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenCocobolo(tree);
@@ -932,15 +760,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Acacia, DarkOak, 10);
}
},
- Wenge(
- TreeBranchDefinition.MILLETTIA,
- "wenge",
- "laurentii",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0xada157),
- new Color(0xad8a57),
- EnumWoodType.WENGE) {
+ Wenge(TreeBranchDefinition.MILLETTIA, "wenge", "laurentii", true, EnumLeafType.DECIDUOUS, new Color(0xada157),
+ new Color(0xad8a57), EnumWoodType.WENGE) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenWenge(tree);
@@ -962,15 +784,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Cocobolo, Balsa, 10);
}
},
- Baobab(
- TreeBranchDefinition.ADANSONIA,
- "grandidierBaobab",
- "digitata",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0xfeff8f),
- new Color(0xffd98f),
- EnumWoodType.BAOBAB) {
+ Baobab(TreeBranchDefinition.ADANSONIA, "grandidierBaobab", "digitata", true, EnumLeafType.DECIDUOUS,
+ new Color(0xfeff8f), new Color(0xffd98f), EnumWoodType.BAOBAB) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenBaobab(tree);
@@ -995,15 +811,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Balsa, Wenge, 10);
}
},
- Mahoe(
- TreeBranchDefinition.TALIPARITI,
- "blueMahoe",
- "elatum",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0xa0ba1b),
- new Color(0x79a175),
- EnumWoodType.MAHOE) {
+ Mahoe(TreeBranchDefinition.TALIPARITI, "blueMahoe", "elatum", true, EnumLeafType.DECIDUOUS, new Color(0xa0ba1b),
+ new Color(0x79a175), EnumWoodType.MAHOE) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenMahoe(tree);
@@ -1011,9 +821,7 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
protected void setSpeciesProperties(IAlleleTreeSpeciesCustom treeSpecies) {
- treeSpecies
- .addFruitFamily(EnumFruitFamily.JUNGLE)
- .addFruitFamily(EnumFruitFamily.POMES)
+ treeSpecies.addFruitFamily(EnumFruitFamily.JUNGLE).addFruitFamily(EnumFruitFamily.POMES)
.addFruitFamily(EnumFruitFamily.PRUNES);
}
@@ -1029,15 +837,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Balsa, Acacia, 5);
}
},
- Willow(
- TreeBranchDefinition.SALIX,
- "whiteWillow",
- "alba",
- true,
- EnumLeafType.WILLOW,
- new Color(0xa3b8a5),
- new Color(0xa3b850),
- EnumWoodType.WILLOW) {
+ Willow(TreeBranchDefinition.SALIX, "whiteWillow", "alba", true, EnumLeafType.WILLOW, new Color(0xa3b8a5),
+ new Color(0xa3b850), EnumWoodType.WILLOW) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenWillow(tree);
@@ -1045,9 +847,7 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
protected void setSpeciesProperties(IAlleleTreeSpeciesCustom treeSpecies) {
- treeSpecies
- .addFruitFamily(EnumFruitFamily.NUX)
- .addFruitFamily(EnumFruitFamily.PRUNES)
+ treeSpecies.addFruitFamily(EnumFruitFamily.NUX).addFruitFamily(EnumFruitFamily.PRUNES)
.addFruitFamily(EnumFruitFamily.POMES);
}
@@ -1060,26 +860,17 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
protected void registerMutations() {
- registerMutation(Oak, Birch, 10)
- .restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
+ registerMutation(Oak, Birch, 10).restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
.restrictHumidity(EnumHumidity.DAMP);
- registerMutation(Oak, Lime, 10)
- .restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
+ registerMutation(Oak, Lime, 10).restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
.restrictHumidity(EnumHumidity.DAMP);
- registerMutation(Lime, Birch, 10)
- .restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
+ registerMutation(Lime, Birch, 10).restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
.restrictHumidity(EnumHumidity.DAMP);
}
},
- Sipiri(
- TreeBranchDefinition.CHLOROCARDIUM,
- "sipiri",
- "rodiei",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0x678911),
- new Color(0x79a175),
- EnumWoodType.GREENHEART) {
+ Sipiri(TreeBranchDefinition.CHLOROCARDIUM, "sipiri", "rodiei", true, EnumLeafType.DECIDUOUS, new Color(0x678911),
+ new Color(0x79a175), EnumWoodType.GREENHEART) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenGreenheart(tree);
@@ -1100,20 +891,13 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
protected void registerMutations() {
- registerMutation(Kapok, Mahogony, 10)
- .restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
+ registerMutation(Kapok, Mahogony, 10).restrictTemperature(EnumTemperature.WARM, EnumTemperature.HOT)
.restrictHumidity(EnumHumidity.DAMP);
}
},
- Papaya(
- TreeBranchDefinition.CARICA,
- "papaya",
- "papaya",
- true,
- EnumLeafType.PALM,
- new Color(0x6d9f58),
- new Color(0x75E675),
- EnumWoodType.PAPAYA) {
+ Papaya(TreeBranchDefinition.CARICA, "papaya", "papaya", true, EnumLeafType.PALM, new Color(0x6d9f58),
+ new Color(0x75E675), EnumWoodType.PAPAYA) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenPapaya(tree);
@@ -1137,15 +921,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Jungle, Cherry, 5);
}
},
- Date(
- TreeBranchDefinition.PHOENIX,
- "datePalm",
- "dactylifera",
- true,
- EnumLeafType.PALM,
- new Color(0xcbcd79),
- new Color(0xB3F370),
- EnumWoodType.PALM) {
+ Date(TreeBranchDefinition.PHOENIX, "datePalm", "dactylifera", true, EnumLeafType.PALM, new Color(0xcbcd79),
+ new Color(0xB3F370), EnumWoodType.PALM) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenDate(tree);
@@ -1170,15 +948,9 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
registerMutation(Jungle, Papaya, 5);
}
},
- Poplar(
- TreeBranchDefinition.POPULUS,
- "whitePoplar",
- "alba",
- true,
- EnumLeafType.DECIDUOUS,
- new Color(0xa3b8a5),
- new Color(0x539d12),
- EnumWoodType.POPLAR) {
+ Poplar(TreeBranchDefinition.POPULUS, "whitePoplar", "alba", true, EnumLeafType.DECIDUOUS, new Color(0xa3b8a5),
+ new Color(0x539d12), EnumWoodType.POPLAR) {
+
@Override
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
return new WorldGenPoplar(tree);
@@ -1214,16 +986,8 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
private ITreeGenome genome;
// vanilla tree constructor
- TreeDefinition(
- TreeBranchDefinition branch,
- String speciesName,
- String binomial,
- boolean dominant,
- EnumLeafType leafType,
- Color primary,
- Color secondary,
- int vanillaMeta,
- ItemStack vanillaWood) {
+ TreeDefinition(TreeBranchDefinition branch, String speciesName, String binomial, boolean dominant,
+ EnumLeafType leafType, Color primary, Color secondary, int vanillaMeta, ItemStack vanillaWood) {
String uid = "forestry.tree" + this;
String unlocalizedDescription = "for.description.tree" + this;
String unlocalizedName = "for.trees.species." + speciesName;
@@ -1249,15 +1013,8 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
}
// forestry tree constructor
- TreeDefinition(
- TreeBranchDefinition branch,
- String speciesName,
- String binomial,
- boolean dominant,
- EnumLeafType leafType,
- Color primary,
- Color secondary,
- EnumWoodType woodType) {
+ TreeDefinition(TreeBranchDefinition branch, String speciesName, String binomial, boolean dominant,
+ EnumLeafType leafType, Color primary, Color secondary, EnumWoodType woodType) {
String uid = "forestry.tree" + this;
String unlocalizedDescription = "for.description.tree" + this;
String unlocalizedName = "for.trees.species." + speciesName;
@@ -1323,8 +1080,8 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
@Override
public void setLeaves(ITreeGenome genome, World world, GameProfile owner, int x, int y, int z, boolean decorative) {
- boolean placed =
- world.setBlock(x, y, z, PluginArboriculture.blocks.leaves, 0, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
+ boolean placed = world
+ .setBlock(x, y, z, PluginArboriculture.blocks.leaves, 0, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
if (!placed) {
return;
}
diff --git a/src/main/java/forestry/arboriculture/genetics/TreeFactory.java b/src/main/java/forestry/arboriculture/genetics/TreeFactory.java
index 4a97e5ef7..fcfe0f106 100644
--- a/src/main/java/forestry/arboriculture/genetics/TreeFactory.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreeFactory.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import java.awt.Color;
+
import forestry.api.arboriculture.EnumLeafType;
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleTreeSpeciesCustom;
@@ -21,21 +21,13 @@ import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IClassification;
import forestry.arboriculture.genetics.alleles.AlleleTreeSpecies;
import forestry.arboriculture.render.IconProviderLeaves;
-import java.awt.Color;
public class TreeFactory implements ITreeFactory {
+
@Override
- public IAlleleTreeSpeciesCustom createSpecies(
- String uid,
- String unlocalizedName,
- String authority,
- String unlocalizedDescription,
- boolean dominant,
- IClassification branch,
- String binomial,
- ILeafIconProvider leafIconProvider,
- IGermlingIconProvider germlingIconProvider,
- ITreeGenerator generator) {
+ public IAlleleTreeSpeciesCustom createSpecies(String uid, String unlocalizedName, String authority,
+ String unlocalizedDescription, boolean dominant, IClassification branch, String binomial,
+ ILeafIconProvider leafIconProvider, IGermlingIconProvider germlingIconProvider, ITreeGenerator generator) {
IAlleleTreeSpeciesCustom treeSpecies = new AlleleTreeSpecies(
uid,
unlocalizedName,
diff --git a/src/main/java/forestry/arboriculture/genetics/TreeGenome.java b/src/main/java/forestry/arboriculture/genetics/TreeGenome.java
index 05c48ff63..1c3d1edad 100755
--- a/src/main/java/forestry/arboriculture/genetics/TreeGenome.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreeGenome.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import java.util.EnumSet;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleFruit;
import forestry.api.arboriculture.IAlleleGrowth;
@@ -26,10 +30,6 @@ import forestry.api.genetics.IChromosome;
import forestry.api.genetics.ISpeciesRoot;
import forestry.core.genetics.Genome;
import forestry.core.genetics.alleles.AllelePlantType;
-import java.util.EnumSet;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.EnumPlantType;
public class TreeGenome extends Genome implements ITreeGenome {
diff --git a/src/main/java/forestry/arboriculture/genetics/TreeHelper.java b/src/main/java/forestry/arboriculture/genetics/TreeHelper.java
index de7083a83..7f8ddf27b 100755
--- a/src/main/java/forestry/arboriculture/genetics/TreeHelper.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreeHelper.java
@@ -1,16 +1,32 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map.Entry;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.fml.common.FMLCommonHandler;
import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.arboriculture.EnumTreeChromosome;
@@ -36,21 +52,6 @@ import forestry.core.config.Constants;
import forestry.core.genetics.SpeciesRoot;
import forestry.core.utils.BlockUtil;
import forestry.plugins.PluginArboriculture;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map.Entry;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraftforge.oredict.OreDictionary;
public class TreeHelper extends SpeciesRoot implements ITreeRoot {
@@ -79,8 +80,7 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
public int getSpeciesCount() {
if (treeSpeciesCount < 0) {
treeSpeciesCount = 0;
- for (Entry entry :
- AlleleManager.alleleRegistry.getRegisteredAlleles().entrySet()) {
+ for (Entry entry : AlleleManager.alleleRegistry.getRegisteredAlleles().entrySet()) {
if (entry.getValue() instanceof IAlleleTreeSpecies) {
if (((IAlleleTreeSpecies) entry.getValue()).isCounted()) {
treeSpeciesCount++;
@@ -187,8 +187,8 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
@Override
public boolean plantSapling(World world, ITree tree, GameProfile owner, int x, int y, int z) {
- boolean placed =
- world.setBlock(x, y, z, PluginArboriculture.blocks.saplingGE, 0, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
+ boolean placed = world
+ .setBlock(x, y, z, PluginArboriculture.blocks.saplingGE, 0, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
if (!placed) {
return false;
}
@@ -212,16 +212,16 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
}
@Override
- public boolean setFruitBlock(
- World world, IAlleleFruit allele, float sappiness, short[] indices, int x, int y, int z) {
+ public boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, short[] indices, int x, int y,
+ int z) {
int direction = BlockUtil.getDirectionalMetadata(world, x, y, z);
if (direction < 0) {
return false;
}
- boolean placed = world.setBlock(
- x, y, z, PluginArboriculture.blocks.pods, direction, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
+ boolean placed = world
+ .setBlock(x, y, z, PluginArboriculture.blocks.pods, direction, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
if (!placed) {
return false;
}
@@ -325,8 +325,7 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
}
}
- FMLCommonHandler.instance()
- .getFMLLogger()
+ FMLCommonHandler.instance().getFMLLogger()
.debug("Failed to find a Treekeeping mode called '%s', reverting to fallback.");
return treekeepingModes.get(0);
}
diff --git a/src/main/java/forestry/arboriculture/genetics/TreeMutation.java b/src/main/java/forestry/arboriculture/genetics/TreeMutation.java
index d7fee7e1d..94eb3fda0 100755
--- a/src/main/java/forestry/arboriculture/genetics/TreeMutation.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreeMutation.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
+import net.minecraft.world.World;
+
import forestry.api.arboriculture.IAlleleTreeSpecies;
import forestry.api.arboriculture.ITreeGenome;
import forestry.api.arboriculture.ITreeMutationCustom;
@@ -18,7 +18,6 @@ import forestry.api.arboriculture.TreeManager;
import forestry.api.core.ForestryAPI;
import forestry.api.genetics.IAllele;
import forestry.core.genetics.mutations.Mutation;
-import net.minecraft.world.World;
public class TreeMutation extends Mutation implements ITreeMutationCustom {
@@ -32,15 +31,8 @@ public class TreeMutation extends Mutation implements ITreeMutationCustom {
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAlleleTreeSpecies allele0,
- IAlleleTreeSpecies allele1,
- ITreeGenome genome0,
- ITreeGenome genome1) {
+ public float getChance(World world, int x, int y, int z, IAlleleTreeSpecies allele0, IAlleleTreeSpecies allele1,
+ ITreeGenome genome0, ITreeGenome genome1) {
float processedChance = super.getChance(
world,
x,
diff --git a/src/main/java/forestry/arboriculture/genetics/TreeMutationFactory.java b/src/main/java/forestry/arboriculture/genetics/TreeMutationFactory.java
index dd58d0966..3dd3bc5e3 100644
--- a/src/main/java/forestry/arboriculture/genetics/TreeMutationFactory.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreeMutationFactory.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
@@ -19,8 +17,8 @@ import forestry.api.genetics.IAllele;
public class TreeMutationFactory implements ITreeMutationFactory {
@Override
- public ITreeMutationCustom createMutation(
- IAlleleTreeSpecies parent0, IAlleleTreeSpecies parent1, IAllele[] result, int chance) {
+ public ITreeMutationCustom createMutation(IAlleleTreeSpecies parent0, IAlleleTreeSpecies parent1, IAllele[] result,
+ int chance) {
ITreeMutationCustom mutation = new TreeMutation(parent0, parent1, result, chance);
TreeManager.treeRoot.registerMutation(mutation);
return mutation;
diff --git a/src/main/java/forestry/arboriculture/genetics/TreekeepingMode.java b/src/main/java/forestry/arboriculture/genetics/TreekeepingMode.java
index 9fa66024f..c7097e2d2 100755
--- a/src/main/java/forestry/arboriculture/genetics/TreekeepingMode.java
+++ b/src/main/java/forestry/arboriculture/genetics/TreekeepingMode.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics;
-import forestry.api.arboriculture.ITreeGenome;
-import forestry.api.arboriculture.ITreekeepingMode;
import java.util.ArrayList;
import java.util.Locale;
+import forestry.api.arboriculture.ITreeGenome;
+import forestry.api.arboriculture.ITreekeepingMode;
+
public class TreekeepingMode implements ITreekeepingMode {
public static final ITreekeepingMode easy = new TreekeepingMode("EASY", 1.4f, 1.3f, 1.2f, 1.2f);
@@ -29,11 +28,7 @@ public class TreekeepingMode implements ITreekeepingMode {
private final float maturationModifier;
private final float mutationModifier;
- public TreekeepingMode(
- String name,
- float yieldModifier,
- float sappinessModifier,
- float maturationModifier,
+ public TreekeepingMode(String name, float yieldModifier, float sappinessModifier, float maturationModifier,
float mutationModifier) {
this.name = name;
this.yieldModifier = yieldModifier;
diff --git a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleFruit.java b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleFruit.java
index 5aa4fc16e..ce5e68ed5 100644
--- a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleFruit.java
+++ b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleFruit.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.alleles;
+import java.util.Arrays;
+import java.util.List;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+
import forestry.api.arboriculture.EnumFruitFamily;
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleFruit;
@@ -21,10 +25,6 @@ import forestry.arboriculture.FruitProviderRandom;
import forestry.arboriculture.FruitProviderRipening;
import forestry.core.genetics.alleles.AlleleCategorized;
import forestry.core.items.ItemFruit;
-import java.util.Arrays;
-import java.util.List;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
public class AlleleFruit extends AlleleCategorized implements IAlleleFruit {
@@ -47,8 +47,7 @@ public class AlleleFruit extends AlleleCategorized implements IAlleleFruit {
fruitApple = new AlleleFruit(
"apple",
new FruitProviderRandom("apple", EnumFruitFamily.POMES, new ItemStack(Items.apple), 1.0f)
- .setColour(0xff2e2e)
- .setOverlay("pomes")),
+ .setColour(0xff2e2e).setOverlay("pomes")),
fruitCocoa = new AlleleFruit(
"cocoa",
new FruitProviderPod("cocoa", EnumFruitFamily.JUNGLE, FruitProviderPod.EnumPodType.COCOA)),
@@ -56,25 +55,26 @@ public class AlleleFruit extends AlleleCategorized implements IAlleleFruit {
fruitChestnut = new AlleleFruit(
"chestnut",
new FruitProviderRipening(
- "chestnut", EnumFruitFamily.NUX, ItemFruit.EnumFruit.CHESTNUT.getStack(), 1.0f)
- .setRipeningPeriod(6)
- .setColours(0x7f333d, 0xc4d24a)
- .setOverlay("nuts"),
+ "chestnut",
+ EnumFruitFamily.NUX,
+ ItemFruit.EnumFruit.CHESTNUT.getStack(),
+ 1.0f).setRipeningPeriod(6).setColours(0x7f333d, 0xc4d24a).setOverlay("nuts"),
true),
fruitWalnut = new AlleleFruit(
"walnut",
new FruitProviderRipening(
- "walnut", EnumFruitFamily.NUX, ItemFruit.EnumFruit.WALNUT.getStack(), 1.0f)
- .setRipeningPeriod(8)
- .setColours(0xfba248, 0xc4d24a)
- .setOverlay("nuts"),
+ "walnut",
+ EnumFruitFamily.NUX,
+ ItemFruit.EnumFruit.WALNUT.getStack(),
+ 1.0f).setRipeningPeriod(8).setColours(0xfba248, 0xc4d24a).setOverlay("nuts"),
true),
fruitCherry = new AlleleFruit(
"cherry",
new FruitProviderRipening(
- "cherry", EnumFruitFamily.PRUNES, ItemFruit.EnumFruit.CHERRY.getStack(), 1.0f)
- .setColours(0xff2e2e, 0xc4d24a)
- .setOverlay("berries"),
+ "cherry",
+ EnumFruitFamily.PRUNES,
+ ItemFruit.EnumFruit.CHERRY.getStack(),
+ 1.0f).setColours(0xff2e2e, 0xc4d24a).setOverlay("berries"),
true),
fruitDates = new AlleleFruit(
"dates",
@@ -93,16 +93,18 @@ public class AlleleFruit extends AlleleCategorized implements IAlleleFruit {
fruitLemon = new AlleleFruit(
"lemon",
new FruitProviderRipening(
- "lemon", EnumFruitFamily.PRUNES, ItemFruit.EnumFruit.LEMON.getStack(), 1.0f)
- .setColours(0xeeee00, 0x99ff00)
- .setOverlay("citrus"),
+ "lemon",
+ EnumFruitFamily.PRUNES,
+ ItemFruit.EnumFruit.LEMON.getStack(),
+ 1.0f).setColours(0xeeee00, 0x99ff00).setOverlay("citrus"),
true),
fruitPlum = new AlleleFruit(
"plum",
new FruitProviderRipening(
- "plum", EnumFruitFamily.PRUNES, ItemFruit.EnumFruit.PLUM.getStack(), 1.0f)
- .setColours(0x663446, 0xeeff1a)
- .setOverlay("plums"),
+ "plum",
+ EnumFruitFamily.PRUNES,
+ ItemFruit.EnumFruit.PLUM.getStack(),
+ 1.0f).setColours(0x663446, 0xeeff1a).setOverlay("plums"),
true));
for (IAlleleFruit fruitAllele : fruitAlleles) {
diff --git a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleGrowth.java b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleGrowth.java
index db2d3bd55..a1d18cabd 100644
--- a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleGrowth.java
+++ b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleGrowth.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.alleles;
+import java.util.Arrays;
+import java.util.List;
+
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleGrowth;
import forestry.api.arboriculture.IGrowthProvider;
@@ -17,8 +18,6 @@ import forestry.api.genetics.AlleleManager;
import forestry.arboriculture.genetics.GrowthProvider;
import forestry.arboriculture.genetics.GrowthProviderTropical;
import forestry.core.genetics.alleles.AlleleCategorized;
-import java.util.Arrays;
-import java.util.List;
public class AlleleGrowth extends AlleleCategorized implements IAlleleGrowth {
diff --git a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java
index 7f47dddc4..adf060ed9 100644
--- a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java
+++ b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffect.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.alleles;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.world.World;
+
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleLeafEffect;
import forestry.api.arboriculture.ITreeGenome;
@@ -18,11 +19,10 @@ import forestry.api.genetics.IEffectData;
import forestry.core.genetics.alleles.Allele;
import forestry.core.genetics.alleles.AlleleCategorized;
import forestry.core.utils.vect.Vect;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.world.World;
public class AlleleLeafEffect extends AlleleCategorized implements IAlleleLeafEffect {
- private static final int[] DEFAULT_EFFECT_AREA = new int[] {12, 12, 12};
+
+ private static final int[] DEFAULT_EFFECT_AREA = new int[] { 12, 12, 12 };
public static Allele leavesNone;
diff --git a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffectNone.java b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffectNone.java
index f086507a4..67ff88865 100644
--- a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffectNone.java
+++ b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleLeafEffectNone.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.alleles;
public class AlleleLeafEffectNone extends AlleleLeafEffect {
+
public AlleleLeafEffectNone() {
super("none", true);
}
diff --git a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleTreeSpecies.java b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleTreeSpecies.java
index 2278146b1..a71fcd788 100644
--- a/src/main/java/forestry/arboriculture/genetics/alleles/AlleleTreeSpecies.java
+++ b/src/main/java/forestry/arboriculture/genetics/alleles/AlleleTreeSpecies.java
@@ -1,15 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.alleles;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.util.IIcon;
+import net.minecraftforge.common.EnumPlantType;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumGermlingType;
@@ -24,13 +29,9 @@ import forestry.api.genetics.IClassification;
import forestry.api.genetics.IFruitFamily;
import forestry.core.genetics.alleles.AlleleSpecies;
import forestry.core.render.TextureManager;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
-import net.minecraftforge.common.EnumPlantType;
public class AlleleTreeSpecies extends AlleleSpecies implements IAlleleTreeSpeciesCustom, IIconProvider {
+
private final ITreeGenerator generator;
private final IGermlingIconProvider germlingIconProvider;
private final ILeafIconProvider leafIconProvider;
@@ -38,17 +39,9 @@ public class AlleleTreeSpecies extends AlleleSpecies implements IAlleleTreeSpeci
private EnumPlantType nativeType = EnumPlantType.Plains;
- public AlleleTreeSpecies(
- String uid,
- String unlocalizedName,
- String authority,
- String unlocalizedDescription,
- boolean isDominant,
- IClassification branch,
- String binomial,
- ILeafIconProvider leafIconProvider,
- IGermlingIconProvider germlingIconProvider,
- ITreeGenerator generator) {
+ public AlleleTreeSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription,
+ boolean isDominant, IClassification branch, String binomial, ILeafIconProvider leafIconProvider,
+ IGermlingIconProvider germlingIconProvider, ITreeGenerator generator) {
super(uid, unlocalizedName, authority, unlocalizedDescription, isDominant, branch, binomial);
this.generator = generator;
diff --git a/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatable.java b/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatable.java
index 4ededf226..6b198fac2 100644
--- a/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatable.java
+++ b/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatable.java
@@ -1,19 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.pollination;
+import java.util.EnumSet;
+
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.IPollinatable;
-import java.util.EnumSet;
-import net.minecraftforge.common.EnumPlantType;
public class CheckPollinatable implements ICheckPollinatable {
diff --git a/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatableTree.java b/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatableTree.java
index 1daceedb9..404850c81 100644
--- a/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatableTree.java
+++ b/src/main/java/forestry/arboriculture/genetics/pollination/CheckPollinatableTree.java
@@ -1,19 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.pollination;
+import java.util.EnumSet;
+
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.arboriculture.ITree;
import forestry.api.genetics.IIndividual;
-import java.util.EnumSet;
-import net.minecraftforge.common.EnumPlantType;
public class CheckPollinatableTree implements ICheckPollinatable {
diff --git a/src/main/java/forestry/arboriculture/genetics/pollination/FakePollinatable.java b/src/main/java/forestry/arboriculture/genetics/pollination/FakePollinatable.java
index 80ab2bf8b..b90bd0b49 100644
--- a/src/main/java/forestry/arboriculture/genetics/pollination/FakePollinatable.java
+++ b/src/main/java/forestry/arboriculture/genetics/pollination/FakePollinatable.java
@@ -1,9 +1,11 @@
package forestry.arboriculture.genetics.pollination;
+import java.util.EnumSet;
+
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.IPollinatable;
-import java.util.EnumSet;
-import net.minecraftforge.common.EnumPlantType;
public class FakePollinatable implements IPollinatable {
diff --git a/src/main/java/forestry/arboriculture/genetics/pollination/ICheckPollinatable.java b/src/main/java/forestry/arboriculture/genetics/pollination/ICheckPollinatable.java
index ac2cd99ac..af0e124b6 100644
--- a/src/main/java/forestry/arboriculture/genetics/pollination/ICheckPollinatable.java
+++ b/src/main/java/forestry/arboriculture/genetics/pollination/ICheckPollinatable.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.genetics.pollination;
-import forestry.api.genetics.IIndividual;
import java.util.EnumSet;
+
import net.minecraftforge.common.EnumPlantType;
+import forestry.api.genetics.IIndividual;
+
/** Just like IPollinatible but for checking only, it can't be mated */
public interface ICheckPollinatable {
/**
- * @return plant types this pollinatable is classified as. (Can be used by bees to determine whether to interact or not.
+ * @return plant types this pollinatable is classified as. (Can be used by bees to determine whether to interact or
+ * not.
*/
EnumSet getPlantType();
diff --git a/src/main/java/forestry/arboriculture/gui/GuiTreealyzer.java b/src/main/java/forestry/arboriculture/gui/GuiTreealyzer.java
index 87da50b03..ad8446816 100755
--- a/src/main/java/forestry/arboriculture/gui/GuiTreealyzer.java
+++ b/src/main/java/forestry/arboriculture/gui/GuiTreealyzer.java
@@ -1,15 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.gui;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.common.EnumPlantType;
+
import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleFruit;
@@ -29,14 +37,6 @@ import forestry.core.gui.ContainerAlyzer;
import forestry.core.gui.GuiAlyzer;
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginArboriculture;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Locale;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.common.EnumPlantType;
public class GuiTreealyzer extends GuiAlyzer {
@@ -110,9 +110,11 @@ public class GuiTreealyzer extends GuiAlyzer {
textLayout.newLine();
{
- String customPrimaryTreeKey = "trees.custom.treealyzer." + type.getName() + "."
+ String customPrimaryTreeKey = "trees.custom.treealyzer." + type.getName()
+ + "."
+ tree.getGenome().getPrimary().getUnlocalizedName().replace("trees.species.", "");
- String customSecondaryTreeKey = "trees.custom.treealyzer." + type.getName() + "."
+ String customSecondaryTreeKey = "trees.custom.treealyzer." + type.getName()
+ + "."
+ tree.getGenome().getSecondary().getUnlocalizedName().replace("trees.species.", "");
drawSpeciesRow(
@@ -158,8 +160,8 @@ public class GuiTreealyzer extends GuiAlyzer {
String no = StringUtil.localize("no");
AlleleBoolean primaryFireproof = (AlleleBoolean) tree.getGenome().getActiveAllele(EnumTreeChromosome.FIREPROOF);
- AlleleBoolean secondaryFireproof =
- (AlleleBoolean) tree.getGenome().getInactiveAllele(EnumTreeChromosome.FIREPROOF);
+ AlleleBoolean secondaryFireproof = (AlleleBoolean) tree.getGenome()
+ .getInactiveAllele(EnumTreeChromosome.FIREPROOF);
textLayout.drawLine(StringUtil.localize("gui.fireproof"), COLUMN_0);
drawLine(
@@ -203,8 +205,7 @@ public class GuiTreealyzer extends GuiAlyzer {
EnumTreeChromosome.GROWTH,
false);
drawLine(
- ((IAlleleGrowth) tree.getGenome().getInactiveAllele(EnumTreeChromosome.GROWTH))
- .getProvider()
+ ((IAlleleGrowth) tree.getGenome().getInactiveAllele(EnumTreeChromosome.GROWTH)).getProvider()
.getDescription(),
COLUMN_2,
tree,
@@ -215,21 +216,13 @@ public class GuiTreealyzer extends GuiAlyzer {
textLayout.drawLine(StringUtil.localize("gui.native"), COLUMN_0);
textLayout.drawLine(
- StringUtil.localize("gui."
- + tree.getGenome()
- .getPrimary()
- .getPlantType()
- .toString()
- .toLowerCase(Locale.ENGLISH)),
+ StringUtil.localize(
+ "gui." + tree.getGenome().getPrimary().getPlantType().toString().toLowerCase(Locale.ENGLISH)),
COLUMN_1,
speciesDominance0);
textLayout.drawLine(
- StringUtil.localize("gui."
- + tree.getGenome()
- .getSecondary()
- .getPlantType()
- .toString()
- .toLowerCase(Locale.ENGLISH)),
+ StringUtil.localize(
+ "gui." + tree.getGenome().getSecondary().getPlantType().toString().toLowerCase(Locale.ENGLISH)),
COLUMN_2,
speciesDominance1);
@@ -252,8 +245,7 @@ public class GuiTreealyzer extends GuiAlyzer {
}
if (activeTolerated.size() > i) {
drawLine(
- StringUtil.localize(
- "gui." + activeTolerated.get(i).toString().toLowerCase(Locale.ENGLISH)),
+ StringUtil.localize("gui." + activeTolerated.get(i).toString().toLowerCase(Locale.ENGLISH)),
COLUMN_1,
tree,
EnumTreeChromosome.PLANT,
@@ -261,8 +253,7 @@ public class GuiTreealyzer extends GuiAlyzer {
}
if (inactiveTolerated.size() > i) {
drawLine(
- StringUtil.localize(
- "gui." + inactiveTolerated.get(i).toString().toLowerCase(Locale.ENGLISH)),
+ StringUtil.localize("gui." + inactiveTolerated.get(i).toString().toLowerCase(Locale.ENGLISH)),
COLUMN_2,
tree,
EnumTreeChromosome.PLANT,
@@ -273,10 +264,8 @@ public class GuiTreealyzer extends GuiAlyzer {
// FRUITS
textLayout.drawLine(StringUtil.localize("gui.supports"), COLUMN_0);
- List families0 =
- new ArrayList<>(tree.getGenome().getPrimary().getSuitableFruit());
- List families1 =
- new ArrayList<>(tree.getGenome().getSecondary().getSuitableFruit());
+ List families0 = new ArrayList<>(tree.getGenome().getPrimary().getSuitableFruit());
+ List families1 = new ArrayList<>(tree.getGenome().getSecondary().getSuitableFruit());
max = Math.max(families0.size(), families1.size());
for (int i = 0; i < max; i++) {
@@ -295,8 +284,7 @@ public class GuiTreealyzer extends GuiAlyzer {
textLayout.newLine();
textLayout.newLine();
- int fruitDominance0 = getColorCoding(
- tree.getGenome().getActiveAllele(EnumTreeChromosome.FRUITS).isDominant());
+ int fruitDominance0 = getColorCoding(tree.getGenome().getActiveAllele(EnumTreeChromosome.FRUITS).isDominant());
int fruitDominance1 = getColorCoding(
tree.getGenome().getInactiveAllele(EnumTreeChromosome.FRUITS).isDominant());
@@ -313,17 +301,12 @@ public class GuiTreealyzer extends GuiAlyzer {
strike = "";
IAllele fruit1 = tree.getGenome().getInactiveAllele(EnumTreeChromosome.FRUITS);
- if (!tree.getGenome()
- .getSecondary()
- .getSuitableFruit()
- .contains(((IAlleleFruit) fruit1).getProvider().getFamily())
- && fruit1 != AlleleFruit.fruitNone) {
+ if (!tree.getGenome().getSecondary().getSuitableFruit()
+ .contains(((IAlleleFruit) fruit1).getProvider().getFamily()) && fruit1 != AlleleFruit.fruitNone) {
strike = EnumChatFormatting.STRIKETHROUGH.toString();
}
textLayout.drawLine(
- strike
- + StringUtil.localize(
- ((IAlleleFruit) fruit1).getProvider().getDescription()),
+ strike + StringUtil.localize(((IAlleleFruit) fruit1).getProvider().getDescription()),
COLUMN_2,
fruitDominance1);
@@ -332,8 +315,7 @@ public class GuiTreealyzer extends GuiAlyzer {
textLayout.drawLine(StringUtil.localize("gui.family"), COLUMN_0);
IFruitFamily primary = tree.getGenome().getFruitProvider().getFamily();
IFruitFamily secondary = ((IAlleleFruit) tree.getGenome().getInactiveAllele(EnumTreeChromosome.FRUITS))
- .getProvider()
- .getFamily();
+ .getProvider().getFamily();
if (primary != null) {
textLayout.drawLine(primary.getName(), COLUMN_1, fruitDominance0);
@@ -355,7 +337,11 @@ public class GuiTreealyzer extends GuiAlyzer {
int x = COLUMN_0;
for (ItemStack stack : tree.getProduceList()) {
itemRender.renderItemIntoGUI(
- fontRendererObj, mc.renderEngine, stack, guiLeft + x, guiTop + textLayout.getLineY());
+ fontRendererObj,
+ mc.renderEngine,
+ stack,
+ guiLeft + x,
+ guiTop + textLayout.getLineY());
x += 18;
if (x > 148) {
x = COLUMN_0;
@@ -374,7 +360,11 @@ public class GuiTreealyzer extends GuiAlyzer {
x = COLUMN_0;
for (ItemStack stack : tree.getSpecialtyList()) {
itemRender.renderItemIntoGUI(
- fontRendererObj, mc.renderEngine, stack, guiLeft + x, guiTop + textLayout.getLineY());
+ fontRendererObj,
+ mc.renderEngine,
+ stack,
+ guiLeft + x,
+ guiTop + textLayout.getLineY());
x += 18;
if (x > 148) {
x = COLUMN_0;
diff --git a/src/main/java/forestry/arboriculture/inventory/ItemInventoryTreealyzer.java b/src/main/java/forestry/arboriculture/inventory/ItemInventoryTreealyzer.java
index b73127513..18dfbe33a 100644
--- a/src/main/java/forestry/arboriculture/inventory/ItemInventoryTreealyzer.java
+++ b/src/main/java/forestry/arboriculture/inventory/ItemInventoryTreealyzer.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.inventory;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.api.arboriculture.TreeManager;
import forestry.core.config.Config;
import forestry.core.gui.IHintSource;
import forestry.core.inventory.ItemInventoryAlyzer;
import forestry.core.utils.GeneticsUtil;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class ItemInventoryTreealyzer extends ItemInventoryAlyzer implements IHintSource {
diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java b/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java
index 515b60c6e..311d6ccd0 100644
--- a/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java
+++ b/src/main/java/forestry/arboriculture/items/ItemBlockLeaves.java
@@ -1,25 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.items;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
import forestry.arboriculture.tiles.TileLeaves;
import forestry.core.items.ItemBlockForestry;
import forestry.core.proxy.Proxies;
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginArboriculture;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
public class ItemBlockLeaves extends ItemBlockForestry {
@@ -63,18 +62,8 @@ public class ItemBlockLeaves extends ItemBlockForestry {
}
@Override
- public boolean placeBlockAt(
- ItemStack itemStack,
- EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int side,
- float hitX,
- float hitY,
- float hitZ,
- int metadata) {
+ public boolean placeBlockAt(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side,
+ float hitX, float hitY, float hitZ, int metadata) {
if (!itemStack.hasTagCompound()) {
return false;
}
diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java
index 4d27f9388..d908988f0 100644
--- a/src/main/java/forestry/arboriculture/items/ItemBlockWood.java
+++ b/src/main/java/forestry/arboriculture/items/ItemBlockWood.java
@@ -1,15 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.items;
+import javax.annotation.Nullable;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumWoodType;
@@ -20,41 +29,25 @@ import forestry.arboriculture.tiles.TileWood;
import forestry.core.config.Constants;
import forestry.core.items.ItemBlockForestry;
import forestry.core.utils.StringUtil;
-import javax.annotation.Nullable;
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
public class ItemBlockWood extends ItemBlockForestry {
+
private static final String LEGACY_WOOD_TYPE_KEY = "WoodType";
public ItemBlockWood(Block block) {
super(block);
}
- public static boolean placeWood(
- ItemStack stack, @Nullable EntityPlayer player, World world, int x, int y, int z, int metadata) {
+ public static boolean placeWood(ItemStack stack, @Nullable EntityPlayer player, World world, int x, int y, int z,
+ int metadata) {
EnumWoodType woodType = getWoodType(stack);
Block block = Block.getBlockFromItem(stack.getItem());
return placeWood(stack, woodType, block, player, world, x, y, z, metadata);
}
- public static boolean placeWood(
- ItemStack stack,
- EnumWoodType woodType,
- Block block,
- @Nullable EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int metadata) {
+ public static boolean placeWood(ItemStack stack, EnumWoodType woodType, Block block, @Nullable EntityPlayer player,
+ World world, int x, int y, int z, int metadata) {
boolean placed = world.setBlock(x, y, z, block, metadata, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
if (!placed) {
return false;
@@ -137,18 +130,8 @@ public class ItemBlockWood extends ItemBlockForestry {
}
@Override
- public boolean placeBlockAt(
- ItemStack stack,
- EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int side,
- float hitX,
- float hitY,
- float hitZ,
- int metadata) {
+ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side,
+ float hitX, float hitY, float hitZ, int metadata) {
return placeWood(stack, player, world, x, y, z, metadata);
}
diff --git a/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java b/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java
index 262297b28..4b0b5a7a5 100644
--- a/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java
+++ b/src/main/java/forestry/arboriculture/items/ItemBlockWoodSlab.java
@@ -1,17 +1,19 @@
package forestry.arboriculture.items;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumWoodType;
import forestry.arboriculture.blocks.BlockSlab;
import forestry.arboriculture.tiles.TileWood;
import forestry.core.tiles.TileUtil;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
public class ItemBlockWoodSlab extends ItemBlockWood {
+
private final BlockSlab slab;
private final BlockSlab doubleSlab;
private final boolean isDoubleSlab;
@@ -24,17 +26,8 @@ public class ItemBlockWoodSlab extends ItemBlockWood {
}
@Override
- public boolean onItemUse(
- ItemStack itemStack,
- EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int side,
- float hitX,
- float hitY,
- float hitZ) {
+ public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side,
+ float hitX, float hitY, float hitZ) {
if (isDoubleSlab) {
return super.onItemUse(itemStack, player, world, x, y, z, side, hitX, hitY, hitZ);
} else if (itemStack.stackSize == 0) {
@@ -138,8 +131,8 @@ public class ItemBlockWoodSlab extends ItemBlockWood {
}
}
- private boolean func_150946_a(
- ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side) {
+ private boolean func_150946_a(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z,
+ int side) {
if (side == 0) {
--y;
}
diff --git a/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java b/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java
index 08b8e73dc..9e0fe0161 100755
--- a/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java
+++ b/src/main/java/forestry/arboriculture/items/ItemGermlingGE.java
@@ -1,15 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.items;
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.World;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumGermlingType;
@@ -33,13 +40,6 @@ import forestry.core.render.SpriteSheet;
import forestry.core.utils.BlockUtil;
import forestry.core.utils.GeneticsUtil;
import forestry.core.utils.StringUtil;
-import java.util.List;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
public class ItemGermlingGE extends ItemGE implements IVariableFermentable {
@@ -86,13 +86,13 @@ public class ItemGermlingGE extends ItemGE implements IVariableFermentable {
}
IAlleleSpecies species = getSpecies(itemstack);
- String customTreeKey = "trees.custom." + type.getName() + "."
+ String customTreeKey = "trees.custom." + type.getName()
+ + "."
+ species.getUnlocalizedName().replace("trees.species.", "");
if (StringUtil.canTranslate(customTreeKey)) {
return StringUtil.localize(customTreeKey);
}
- return StringUtil.localize("trees.grammar." + type.getName())
- .replaceAll("%SPECIES", species.getName())
+ return StringUtil.localize("trees.grammar." + type.getName()).replaceAll("%SPECIES", species.getName())
.replaceAll("%TYPE", StringUtil.localize("trees.grammar." + type.getName() + ".type"));
}
@@ -102,7 +102,7 @@ public class ItemGermlingGE extends ItemGE implements IVariableFermentable {
addCreativeItems(itemList, true);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void addCreativeItems(List itemList, boolean hideSecrets) {
for (IIndividual individual : TreeManager.treeRoot.getIndividualTemplates()) {
// Don't show secrets unless ordered to.
@@ -149,17 +149,8 @@ public class ItemGermlingGE extends ItemGE implements IVariableFermentable {
}
@Override
- public boolean onItemUse(
- ItemStack itemstack,
- EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int par7,
- float facingX,
- float facingY,
- float facingZ) {
+ public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7,
+ float facingX, float facingY, float facingZ) {
ITree tree = TreeManager.treeRoot.getMember(itemstack);
if (tree == null) {
return false;
diff --git a/src/main/java/forestry/arboriculture/items/ItemGrafter.java b/src/main/java/forestry/arboriculture/items/ItemGrafter.java
index 001c1388f..9a8973ea0 100755
--- a/src/main/java/forestry/arboriculture/items/ItemGrafter.java
+++ b/src/main/java/forestry/arboriculture/items/ItemGrafter.java
@@ -1,18 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.items;
-import forestry.api.arboriculture.IToolGrafter;
-import forestry.api.core.Tabs;
-import forestry.core.items.ItemForestryTool;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeaves;
import net.minecraft.block.material.Material;
@@ -21,7 +16,12 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
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(null);
setMaxDamage(maxDamage);
@@ -40,8 +40,8 @@ public class ItemGrafter extends ItemForestryTool implements IToolGrafter {
}
@Override
- public boolean onBlockDestroyed(
- ItemStack itemstack, World world, Block block, int j, int k, int l, EntityLivingBase entityliving) {
+ public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int j, int k, int l,
+ EntityLivingBase entityliving) {
// damage is done by the harvested leaves
return true;
}
diff --git a/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java b/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java
index dfbb9c1bd..2e5ebb67b 100644
--- a/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java
+++ b/src/main/java/forestry/arboriculture/items/ItemRegistryArboriculture.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.items;
-import forestry.api.arboriculture.EnumGermlingType;
-import forestry.core.items.ItemRegistry;
import net.minecraftforge.oredict.OreDictionary;
+import forestry.api.arboriculture.EnumGermlingType;
+import forestry.core.items.ItemRegistry;
+
public class ItemRegistryArboriculture extends ItemRegistry {
+
public final ItemGermlingGE sapling;
public final ItemGermlingGE pollenFertile;
public final ItemTreealyzer treealyzer;
diff --git a/src/main/java/forestry/arboriculture/items/ItemTreealyzer.java b/src/main/java/forestry/arboriculture/items/ItemTreealyzer.java
index 39918aa55..e0228dc5b 100644
--- a/src/main/java/forestry/arboriculture/items/ItemTreealyzer.java
+++ b/src/main/java/forestry/arboriculture/items/ItemTreealyzer.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.items;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import forestry.api.core.Tabs;
import forestry.arboriculture.gui.GuiTreealyzer;
import forestry.arboriculture.inventory.ItemInventoryTreealyzer;
import forestry.core.gui.ContainerAlyzer;
import forestry.core.items.ItemWithGui;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class ItemTreealyzer extends ItemWithGui {
+
public ItemTreealyzer() {
setCreativeTab(Tabs.tabArboriculture);
}
diff --git a/src/main/java/forestry/arboriculture/network/IRipeningPacketReceiver.java b/src/main/java/forestry/arboriculture/network/IRipeningPacketReceiver.java
index c6ffd1188..21629bb7e 100644
--- a/src/main/java/forestry/arboriculture/network/IRipeningPacketReceiver.java
+++ b/src/main/java/forestry/arboriculture/network/IRipeningPacketReceiver.java
@@ -1,15 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.network;
public interface IRipeningPacketReceiver {
+
void fromRipeningPacket(int ripeningValue);
}
diff --git a/src/main/java/forestry/arboriculture/network/PacketRegistryArboriculture.java b/src/main/java/forestry/arboriculture/network/PacketRegistryArboriculture.java
index e64a3d3e9..62132a0b2 100644
--- a/src/main/java/forestry/arboriculture/network/PacketRegistryArboriculture.java
+++ b/src/main/java/forestry/arboriculture/network/PacketRegistryArboriculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.network;
@@ -14,6 +12,7 @@ import forestry.arboriculture.network.packets.PacketRipeningUpdate;
import forestry.core.network.PacketRegistry;
public class PacketRegistryArboriculture extends PacketRegistry {
+
@Override
public void registerPackets() {
registerClientPacket(new PacketRipeningUpdate());
diff --git a/src/main/java/forestry/arboriculture/network/packets/PacketRipeningUpdate.java b/src/main/java/forestry/arboriculture/network/packets/PacketRipeningUpdate.java
index c91b3a583..64f05b29c 100644
--- a/src/main/java/forestry/arboriculture/network/packets/PacketRipeningUpdate.java
+++ b/src/main/java/forestry/arboriculture/network/packets/PacketRipeningUpdate.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.network.packets;
+import java.io.IOException;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+
import forestry.arboriculture.network.IRipeningPacketReceiver;
import forestry.arboriculture.tiles.TileFruitPod;
import forestry.arboriculture.tiles.TileLeaves;
@@ -19,9 +22,6 @@ import forestry.core.network.IForestryPacketClient;
import forestry.core.network.PacketIdClient;
import forestry.core.network.packets.PacketCoordinates;
import forestry.core.proxy.Proxies;
-import java.io.IOException;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
public class PacketRipeningUpdate extends PacketCoordinates implements IForestryPacketClient {
diff --git a/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java b/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java
index e2706691a..7e18f40ac 100755
--- a/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java
+++ b/src/main/java/forestry/arboriculture/proxy/ProxyArboriculture.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.proxy;
diff --git a/src/main/java/forestry/arboriculture/proxy/ProxyArboricultureClient.java b/src/main/java/forestry/arboriculture/proxy/ProxyArboricultureClient.java
index 184805dee..e2d36bae6 100644
--- a/src/main/java/forestry/arboriculture/proxy/ProxyArboricultureClient.java
+++ b/src/main/java/forestry/arboriculture/proxy/ProxyArboricultureClient.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.proxy;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.world.ColorizerFoliage;
+import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient;
+
import cpw.mods.fml.client.registry.RenderingRegistry;
import forestry.arboriculture.render.RenderFenceItem;
import forestry.arboriculture.render.RenderFruitPodBlock;
@@ -21,13 +25,9 @@ import forestry.arboriculture.render.RenderSaplingBlock;
import forestry.arboriculture.render.RenderSlabItem;
import forestry.arboriculture.render.RenderStairItem;
import forestry.plugins.PluginArboriculture;
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.world.ColorizerFoliage;
-import net.minecraftforge.client.IItemRenderer;
-import net.minecraftforge.client.MinecraftForgeClient;
public class ProxyArboricultureClient extends ProxyArboriculture {
+
@Override
public void initializeRendering() {
PluginArboriculture.modelIdSaplings = RenderingRegistry.getNextAvailableRenderId();
diff --git a/src/main/java/forestry/arboriculture/render/IconProviderGermling.java b/src/main/java/forestry/arboriculture/render/IconProviderGermling.java
index ac7d87c0f..de6c8fcb3 100644
--- a/src/main/java/forestry/arboriculture/render/IconProviderGermling.java
+++ b/src/main/java/forestry/arboriculture/render/IconProviderGermling.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.util.IIcon;
+
import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.arboriculture.IGermlingIconProvider;
import forestry.core.render.TextureManager;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
public class IconProviderGermling implements IGermlingIconProvider {
diff --git a/src/main/java/forestry/arboriculture/render/IconProviderGermlingVanilla.java b/src/main/java/forestry/arboriculture/render/IconProviderGermlingVanilla.java
index 9ee9f1e15..5697afc21 100644
--- a/src/main/java/forestry/arboriculture/render/IconProviderGermlingVanilla.java
+++ b/src/main/java/forestry/arboriculture/render/IconProviderGermlingVanilla.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.api.arboriculture.EnumGermlingType;
-import forestry.api.arboriculture.IGermlingIconProvider;
-import forestry.core.render.TextureManager;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon;
+import forestry.api.arboriculture.EnumGermlingType;
+import forestry.api.arboriculture.IGermlingIconProvider;
+import forestry.core.render.TextureManager;
+
public class IconProviderGermlingVanilla implements IGermlingIconProvider {
+
private final int vanillaMap;
private IIcon icon;
diff --git a/src/main/java/forestry/arboriculture/render/IconProviderLeaves.java b/src/main/java/forestry/arboriculture/render/IconProviderLeaves.java
index 41b0d949c..ec95e6d83 100644
--- a/src/main/java/forestry/arboriculture/render/IconProviderLeaves.java
+++ b/src/main/java/forestry/arboriculture/render/IconProviderLeaves.java
@@ -1,19 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
+import java.awt.Color;
+
+import net.minecraft.util.IIcon;
+
import forestry.api.arboriculture.EnumLeafType;
import forestry.api.arboriculture.ILeafIconProvider;
-import java.awt.Color;
-import net.minecraft.util.IIcon;
public class IconProviderLeaves implements ILeafIconProvider {
diff --git a/src/main/java/forestry/arboriculture/render/IconProviderWood.java b/src/main/java/forestry/arboriculture/render/IconProviderWood.java
index 2429873bd..a6061b55f 100644
--- a/src/main/java/forestry/arboriculture/render/IconProviderWood.java
+++ b/src/main/java/forestry/arboriculture/render/IconProviderWood.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
+import java.util.Locale;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumWoodType;
import forestry.core.render.TextureManager;
-import java.util.Locale;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
public abstract class IconProviderWood {
+
@SideOnly(Side.CLIENT)
private static IIcon[][] icons;
diff --git a/src/main/java/forestry/arboriculture/render/RenderFenceItem.java b/src/main/java/forestry/arboriculture/render/RenderFenceItem.java
index 39cb2fda4..cfdf4159d 100644
--- a/src/main/java/forestry/arboriculture/render/RenderFenceItem.java
+++ b/src/main/java/forestry/arboriculture/render/RenderFenceItem.java
@@ -1,26 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.arboriculture.items.ItemBlockWood;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
+
import org.lwjgl.opengl.GL11;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.arboriculture.items.ItemBlockWood;
+
public class RenderFenceItem implements IItemRenderer {
+
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
diff --git a/src/main/java/forestry/arboriculture/render/RenderFruitPodBlock.java b/src/main/java/forestry/arboriculture/render/RenderFruitPodBlock.java
index eb20c23d4..dbe8cffdd 100644
--- a/src/main/java/forestry/arboriculture/render/RenderFruitPodBlock.java
+++ b/src/main/java/forestry/arboriculture/render/RenderFruitPodBlock.java
@@ -1,19 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
-import forestry.arboriculture.blocks.BlockFruitPod;
-import forestry.arboriculture.tiles.TileFruitPod;
-import forestry.plugins.PluginArboriculture;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDirectional;
import net.minecraft.client.renderer.RenderBlocks;
@@ -21,14 +15,19 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import forestry.arboriculture.blocks.BlockFruitPod;
+import forestry.arboriculture.tiles.TileFruitPod;
+import forestry.plugins.PluginArboriculture;
+
public class RenderFruitPodBlock implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {}
@Override
- public boolean renderWorldBlock(
- IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
+ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
+ RenderBlocks renderer) {
int maturity = 0;
diff --git a/src/main/java/forestry/arboriculture/render/RenderLeavesBlock.java b/src/main/java/forestry/arboriculture/render/RenderLeavesBlock.java
index 469010615..c341b1a23 100644
--- a/src/main/java/forestry/arboriculture/render/RenderLeavesBlock.java
+++ b/src/main/java/forestry/arboriculture/render/RenderLeavesBlock.java
@@ -1,25 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.arboriculture.blocks.BlockForestryLeaves;
-import forestry.arboriculture.tiles.TileLeaves;
-import forestry.core.render.RenderOverlayBlock;
-import forestry.plugins.PluginArboriculture;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import forestry.arboriculture.blocks.BlockForestryLeaves;
+import forestry.arboriculture.tiles.TileLeaves;
+import forestry.core.render.RenderOverlayBlock;
+import forestry.plugins.PluginArboriculture;
+
/**
* Ugly but serviceable renderer for leaves, taking fruits into account.
*/
@@ -31,8 +30,8 @@ public class RenderLeavesBlock extends RenderOverlayBlock {
}
@Override
- public boolean renderWorldBlock(
- IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
+ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
+ RenderBlocks renderer) {
TileLeaves tile = BlockForestryLeaves.getLeafTile(world, x, y, z);
if (tile == null) {
@@ -63,15 +62,8 @@ public class RenderLeavesBlock extends RenderOverlayBlock {
return PluginArboriculture.modelIdLeaves;
}
- private static boolean renderFruitOverlay(
- IBlockAccess world,
- Block block,
- int x,
- int y,
- int z,
- RenderBlocks renderer,
- IIcon texture,
- int multiplier) {
+ private static boolean renderFruitOverlay(IBlockAccess world, Block block, int x, int y, int z,
+ RenderBlocks renderer, IIcon texture, int multiplier) {
float mR = (multiplier >> 16 & 255) / 255.0F;
float mG = (multiplier >> 8 & 255) / 255.0F;
@@ -86,17 +78,8 @@ public class RenderLeavesBlock extends RenderOverlayBlock {
return renderFruitOverlayWithColorMultiplier(world, block, x, y, z, mR, mG, mB, renderer, texture);
}
- private static boolean renderFruitOverlayWithColorMultiplier(
- IBlockAccess world,
- Block block,
- int x,
- int y,
- int z,
- float r,
- float g,
- float b,
- RenderBlocks renderer,
- IIcon texture) {
+ private static boolean renderFruitOverlayWithColorMultiplier(IBlockAccess world, Block block, int x, int y, int z,
+ float r, float g, float b, RenderBlocks renderer, IIcon texture) {
int mixedBrightness = block.getMixedBrightnessForBlock(world, x, y, z);
diff --git a/src/main/java/forestry/arboriculture/render/RenderLeavesItem.java b/src/main/java/forestry/arboriculture/render/RenderLeavesItem.java
index 25ca3804d..1e0564c8d 100644
--- a/src/main/java/forestry/arboriculture/render/RenderLeavesItem.java
+++ b/src/main/java/forestry/arboriculture/render/RenderLeavesItem.java
@@ -1,29 +1,30 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.arboriculture.genetics.TreeHelper;
-import forestry.arboriculture.items.ItemBlockLeaves;
-import forestry.arboriculture.tiles.TileLeaves;
-import forestry.core.proxy.Proxies;
-import forestry.core.utils.ItemStackUtil;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
+
import org.lwjgl.opengl.GL11;
+import forestry.arboriculture.genetics.TreeHelper;
+import forestry.arboriculture.items.ItemBlockLeaves;
+import forestry.arboriculture.tiles.TileLeaves;
+import forestry.core.proxy.Proxies;
+import forestry.core.utils.ItemStackUtil;
+
public class RenderLeavesItem implements IItemRenderer {
+
protected static final double OVERLAY_SHIFT = 0.001;
@Override
@@ -40,8 +41,8 @@ public class RenderLeavesItem implements IItemRenderer {
}
@Override
- public boolean shouldUseRenderHelper(
- IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) {
+ public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item,
+ IItemRenderer.ItemRendererHelper helper) {
return true;
}
diff --git a/src/main/java/forestry/arboriculture/render/RenderLogItem.java b/src/main/java/forestry/arboriculture/render/RenderLogItem.java
index 5bf8b769a..0abb9e795 100644
--- a/src/main/java/forestry/arboriculture/render/RenderLogItem.java
+++ b/src/main/java/forestry/arboriculture/render/RenderLogItem.java
@@ -1,27 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.arboriculture.items.ItemBlockWood;
-import forestry.core.utils.ItemStackUtil;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
+
import org.lwjgl.opengl.GL11;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.arboriculture.items.ItemBlockWood;
+import forestry.core.utils.ItemStackUtil;
+
public class RenderLogItem implements IItemRenderer {
+
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
@@ -57,8 +58,8 @@ public class RenderLogItem implements IItemRenderer {
}
}
- private static void renderItem(
- RenderBlocks renderer, ItemStack itemStack, float x, float y, float z, boolean fullBlock) {
+ private static void renderItem(RenderBlocks renderer, ItemStack itemStack, float x, float y, float z,
+ boolean fullBlock) {
Tessellator tessellator = Tessellator.instance;
Block block = ItemStackUtil.getBlock(itemStack);
diff --git a/src/main/java/forestry/arboriculture/render/RenderPlankItem.java b/src/main/java/forestry/arboriculture/render/RenderPlankItem.java
index 73206e46c..1c745f3ee 100644
--- a/src/main/java/forestry/arboriculture/render/RenderPlankItem.java
+++ b/src/main/java/forestry/arboriculture/render/RenderPlankItem.java
@@ -1,27 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.arboriculture.items.ItemBlockWood;
-import forestry.core.utils.ItemStackUtil;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
+
import org.lwjgl.opengl.GL11;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.arboriculture.items.ItemBlockWood;
+import forestry.core.utils.ItemStackUtil;
+
public class RenderPlankItem implements IItemRenderer {
+
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
@@ -57,8 +58,8 @@ public class RenderPlankItem implements IItemRenderer {
}
}
- private static void renderItem(
- RenderBlocks renderer, ItemStack itemStack, float x, float y, float z, boolean fullBlock) {
+ private static void renderItem(RenderBlocks renderer, ItemStack itemStack, float x, float y, float z,
+ boolean fullBlock) {
Tessellator tessellator = Tessellator.instance;
Block block = ItemStackUtil.getBlock(itemStack);
diff --git a/src/main/java/forestry/arboriculture/render/RenderSaplingBlock.java b/src/main/java/forestry/arboriculture/render/RenderSaplingBlock.java
index 026d72a0c..46fc9970b 100644
--- a/src/main/java/forestry/arboriculture/render/RenderSaplingBlock.java
+++ b/src/main/java/forestry/arboriculture/render/RenderSaplingBlock.java
@@ -1,27 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.EntityRenderer;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.arboriculture.IAlleleTreeSpecies;
import forestry.arboriculture.blocks.BlockSapling;
import forestry.arboriculture.tiles.TileSapling;
import forestry.plugins.PluginArboriculture;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.EntityRenderer;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class RenderSaplingBlock implements ISimpleBlockRenderingHandler {
@@ -31,8 +30,8 @@ public class RenderSaplingBlock implements ISimpleBlockRenderingHandler {
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {}
@Override
- public boolean renderWorldBlock(
- IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
+ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
+ RenderBlocks renderer) {
if (modelId != this.getRenderId()) {
return false;
@@ -63,8 +62,8 @@ public class RenderSaplingBlock implements ISimpleBlockRenderingHandler {
return PluginArboriculture.modelIdSaplings;
}
- private static boolean renderCrossedSquares(
- IAlleleTreeSpecies species, IBlockAccess world, Block block, int x, int y, int z) {
+ private static boolean renderCrossedSquares(IAlleleTreeSpecies species, IBlockAccess world, Block block, int x,
+ int y, int z) {
Tessellator tess = Tessellator.instance;
@@ -86,8 +85,8 @@ public class RenderSaplingBlock implements ISimpleBlockRenderingHandler {
return true;
}
- private static void drawCrossedSquares(
- IAlleleTreeSpecies species, double par3, double par5, double par7, float mod) {
+ private static void drawCrossedSquares(IAlleleTreeSpecies species, double par3, double par5, double par7,
+ float mod) {
Tessellator tess = Tessellator.instance;
IIcon icon = species.getGermlingIcon(EnumGermlingType.SAPLING, renderLayer);
diff --git a/src/main/java/forestry/arboriculture/render/RenderSlabItem.java b/src/main/java/forestry/arboriculture/render/RenderSlabItem.java
index d6883d42a..5c6e0f5cc 100644
--- a/src/main/java/forestry/arboriculture/render/RenderSlabItem.java
+++ b/src/main/java/forestry/arboriculture/render/RenderSlabItem.java
@@ -1,17 +1,20 @@
package forestry.arboriculture.render;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.arboriculture.items.ItemBlockWood;
-import forestry.core.utils.ItemStackUtil;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
+
import org.lwjgl.opengl.GL11;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.arboriculture.items.ItemBlockWood;
+import forestry.core.utils.ItemStackUtil;
+
public class RenderSlabItem implements IItemRenderer {
+
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch (type) {
@@ -47,8 +50,8 @@ public class RenderSlabItem implements IItemRenderer {
}
}
- private static void renderItem(
- RenderBlocks renderer, ItemStack itemStack, float x, float y, float z, boolean fullBlock) {
+ private static void renderItem(RenderBlocks renderer, ItemStack itemStack, float x, float y, float z,
+ boolean fullBlock) {
Tessellator tessellator = Tessellator.instance;
Block block = ItemStackUtil.getBlock(itemStack);
diff --git a/src/main/java/forestry/arboriculture/render/RenderStairItem.java b/src/main/java/forestry/arboriculture/render/RenderStairItem.java
index eb44cacae..fa209e98a 100644
--- a/src/main/java/forestry/arboriculture/render/RenderStairItem.java
+++ b/src/main/java/forestry/arboriculture/render/RenderStairItem.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.api.arboriculture.EnumWoodType;
-import forestry.arboriculture.items.ItemBlockWood;
-import forestry.core.utils.ItemStackUtil;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
+
import org.lwjgl.opengl.GL11;
+import forestry.api.arboriculture.EnumWoodType;
+import forestry.arboriculture.items.ItemBlockWood;
+import forestry.core.utils.ItemStackUtil;
+
public class RenderStairItem implements IItemRenderer {
@Override
diff --git a/src/main/java/forestry/arboriculture/render/TextureLeaves.java b/src/main/java/forestry/arboriculture/render/TextureLeaves.java
index 11b230210..48261f39f 100644
--- a/src/main/java/forestry/arboriculture/render/TextureLeaves.java
+++ b/src/main/java/forestry/arboriculture/render/TextureLeaves.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.render;
-import forestry.api.arboriculture.EnumLeafType;
-import forestry.core.render.TextureManager;
import java.util.EnumMap;
import java.util.Locale;
import java.util.Map;
+
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
+import forestry.api.arboriculture.EnumLeafType;
+import forestry.core.render.TextureManager;
+
public class TextureLeaves {
+
private static final Map leafTextures = new EnumMap<>(EnumLeafType.class);
static {
diff --git a/src/main/java/forestry/arboriculture/tiles/TileArboristChest.java b/src/main/java/forestry/arboriculture/tiles/TileArboristChest.java
index 372edea85..ccdb1380d 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileArboristChest.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileArboristChest.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.tiles;
@@ -14,6 +12,7 @@ import forestry.api.arboriculture.TreeManager;
import forestry.core.tiles.TileNaturalistChest;
public class TileArboristChest extends TileNaturalistChest {
+
public TileArboristChest() {
super(TreeManager.treeRoot);
}
diff --git a/src/main/java/forestry/arboriculture/tiles/TileFruitPod.java b/src/main/java/forestry/arboriculture/tiles/TileFruitPod.java
index f67a1452b..0fe2288c3 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileFruitPod.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileFruitPod.java
@@ -1,15 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.tiles;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.Packet;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.IAlleleFruit;
@@ -25,15 +34,6 @@ import forestry.core.network.IStreamable;
import forestry.core.network.packets.PacketTileStream;
import forestry.core.proxy.Proxies;
import forestry.core.render.TextureManager;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.Packet;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
public class TileFruitPod extends TileEntity implements IFruitBearer, IStreamable, IRipeningPacketReceiver {
diff --git a/src/main/java/forestry/arboriculture/tiles/TileLeaves.java b/src/main/java/forestry/arboriculture/tiles/TileLeaves.java
index 1e62d67f4..d9382e032 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileLeaves.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileLeaves.java
@@ -1,16 +1,31 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.tiles;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTUtil;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraftforge.common.EnumPlantType;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumTreeChromosome;
@@ -48,20 +63,6 @@ import forestry.core.render.TextureManager;
import forestry.core.utils.ColourUtil;
import forestry.core.utils.GeneticsUtil;
import forestry.core.utils.Log;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTUtil;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.EnumPlantType;
public class TileLeaves extends TileTreeContainer
implements IPollinatable, IFruitBearer, IButterflyNursery, IRipeningPacketReceiver {
@@ -231,8 +232,8 @@ public class TileLeaves extends TileTreeContainer
&& (fruitProvider == AlleleFruit.fruitApple.getProvider())) {
textureIndexFruits = -1;
} else {
- textureIndexFruits = fruitProvider.getIconIndex(
- genome, worldObj, xCoord, yCoord, zCoord, getRipeningTime(), true);
+ textureIndexFruits = fruitProvider
+ .getIconIndex(genome, worldObj, xCoord, yCoord, zCoord, getRipeningTime(), true);
}
ripeningPeriod = (short) tree.getGenome().getFruitProvider().getRipeningPeriod();
@@ -405,10 +406,7 @@ public class TileLeaves extends TileTreeContainer
data.writeByte(leafState);
if (hasFruit) {
- String fruitAlleleUID = getTree()
- .getGenome()
- .getActiveAllele(EnumTreeChromosome.FRUITS)
- .getUID();
+ String fruitAlleleUID = getTree().getGenome().getActiveAllele(EnumTreeChromosome.FRUITS).getUID();
int colourFruits = getFruitColour();
data.writeUTF(fruitAlleleUID);
@@ -527,8 +525,8 @@ public class TileLeaves extends TileTreeContainer
damage += caterpillar.getGenome().getMetabolism();
IButterflyGenome caterpillarGenome = caterpillar.getGenome();
- int caterpillarMatureTime =
- Math.round((float) caterpillarGenome.getLifespan() / (caterpillarGenome.getFertility() * 2));
+ int caterpillarMatureTime = Math
+ .round((float) caterpillarGenome.getLifespan() / (caterpillarGenome.getFertility() * 2));
if (maturationTime >= caterpillarMatureTime && caterpillar.canTakeFlight(worldObj, xCoord, yCoord, zCoord)) {
if (worldObj.isAirBlock(xCoord - 1, yCoord, zCoord)) {
diff --git a/src/main/java/forestry/arboriculture/tiles/TileSapling.java b/src/main/java/forestry/arboriculture/tiles/TileSapling.java
index 010f71c4e..2f6a1a189 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileSapling.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileSapling.java
@@ -1,24 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.tiles;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
import forestry.api.arboriculture.ITree;
import forestry.api.arboriculture.ITreekeepingMode;
import forestry.api.arboriculture.TreeManager;
import forestry.api.genetics.IBreedingTracker;
import forestry.arboriculture.worldgen.WorldGenArboriculture;
import forestry.core.worldgen.WorldGenBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
public class TileSapling extends TileTreeContainer {
diff --git a/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java b/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java
index d552fc1bf..1778ce24b 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java
@@ -1,16 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.tiles;
+import java.io.IOException;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTUtil;
+import net.minecraft.network.Packet;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.arboriculture.ITree;
import forestry.api.arboriculture.TreeManager;
import forestry.api.genetics.IAllele;
@@ -21,14 +30,6 @@ import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.IStreamable;
import forestry.core.network.packets.PacketTileStream;
import forestry.core.utils.PlayerUtil;
-import java.io.IOException;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTUtil;
-import net.minecraft.network.Packet;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
/**
* This is the base TE class for any block that needs to contain tree genome information.
@@ -145,12 +146,13 @@ public abstract class TileTreeContainer extends TileEntity implements IStreamabl
public abstract void onBlockTick();
/**
- * Called from Chunk.setBlockIDWithMetadata, determines if this tile entity should be re-created when the ID, or Metadata changes.
- * Use with caution as this will leave straggler TileEntities, or create conflicts with other TileEntities if not used properly.
+ * Called from Chunk.setBlockIDWithMetadata, determines if this tile entity should be re-created when the ID, or
+ * Metadata changes. Use with caution as this will leave straggler TileEntities, or create conflicts with other
+ * TileEntities if not used properly.
*/
@Override
- public boolean shouldRefresh(
- Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z) {
+ public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y,
+ int z) {
return !Block.isEqualTo(oldBlock, newBlock);
}
diff --git a/src/main/java/forestry/arboriculture/tiles/TileWood.java b/src/main/java/forestry/arboriculture/tiles/TileWood.java
index f23dbfaeb..06e6cb857 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileWood.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileWood.java
@@ -1,15 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.tiles;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.Packet;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
import forestry.api.arboriculture.EnumWoodType;
import forestry.arboriculture.IWoodTyped;
import forestry.arboriculture.blocks.BlockSlab;
@@ -20,17 +29,9 @@ import forestry.core.network.IStreamable;
import forestry.core.network.packets.PacketTileStream;
import forestry.core.tiles.TileUtil;
import forestry.plugins.PluginArboriculture;
-import java.io.IOException;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.Packet;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
public class TileWood extends TileEntity implements IStreamable {
+
private EnumWoodType woodType;
public TileWood() {
@@ -111,8 +112,8 @@ public class TileWood extends TileEntity implements IStreamable {
return TileUtil.getTile(world, x, y, z, TileWood.class);
}
- public static ArrayList getDrops(
- T block, World world, int x, int y, int z) {
+ public static ArrayList getDrops(T block, World world, int x, int y,
+ int z) {
ArrayList drops = new ArrayList<>();
ItemStack stack = getPickBlock(block, world, x, y, z);
diff --git a/src/main/java/forestry/arboriculture/worldgen/BlockTypeLog.java b/src/main/java/forestry/arboriculture/worldgen/BlockTypeLog.java
index 3c08b1a91..edafe5da7 100644
--- a/src/main/java/forestry/arboriculture/worldgen/BlockTypeLog.java
+++ b/src/main/java/forestry/arboriculture/worldgen/BlockTypeLog.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
@@ -14,6 +12,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockTypeLog extends BlockTypeWood {
+
public BlockTypeLog(ItemStack itemStack) {
super(itemStack);
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java b/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java
index 7c26f278e..1b478dc87 100644
--- a/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java
+++ b/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.core.worldgen.BlockType;
import net.minecraft.init.Blocks;
import net.minecraftforge.common.util.ForgeDirection;
+import forestry.core.worldgen.BlockType;
+
public class BlockTypeVanillaStairs extends BlockType {
+
public BlockTypeVanillaStairs(int meta) {
super(Blocks.oak_stairs, meta);
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/BlockTypeWood.java b/src/main/java/forestry/arboriculture/worldgen/BlockTypeWood.java
index 9a8c13932..d06ab9c8b 100644
--- a/src/main/java/forestry/arboriculture/worldgen/BlockTypeWood.java
+++ b/src/main/java/forestry/arboriculture/worldgen/BlockTypeWood.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import forestry.api.world.ITreeGenData;
import forestry.arboriculture.items.ItemBlockWood;
import forestry.core.worldgen.IBlockType;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public class BlockTypeWood implements IBlockType, ITreeBlockType {
diff --git a/src/main/java/forestry/arboriculture/worldgen/BlockTypeWoodStairs.java b/src/main/java/forestry/arboriculture/worldgen/BlockTypeWoodStairs.java
index 25f3d468f..50eed9d5e 100644
--- a/src/main/java/forestry/arboriculture/worldgen/BlockTypeWoodStairs.java
+++ b/src/main/java/forestry/arboriculture/worldgen/BlockTypeWoodStairs.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
@@ -14,6 +12,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockTypeWoodStairs extends BlockTypeWood {
+
public BlockTypeWoodStairs(ItemStack itemStack) {
super(itemStack);
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/ITreeBlockType.java b/src/main/java/forestry/arboriculture/worldgen/ITreeBlockType.java
index f02c6d749..50740e6e5 100644
--- a/src/main/java/forestry/arboriculture/worldgen/ITreeBlockType.java
+++ b/src/main/java/forestry/arboriculture/worldgen/ITreeBlockType.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import forestry.api.world.ITreeGenData;
+
public interface ITreeBlockType {
+
void setDirection(ForgeDirection facing);
void setBlock(World world, ITreeGenData tree, int x, int y, int z);
diff --git a/src/main/java/forestry/arboriculture/worldgen/TreeBlockType.java b/src/main/java/forestry/arboriculture/worldgen/TreeBlockType.java
index 7968d6464..7bf79e11d 100644
--- a/src/main/java/forestry/arboriculture/worldgen/TreeBlockType.java
+++ b/src/main/java/forestry/arboriculture/worldgen/TreeBlockType.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
-import forestry.core.config.Constants;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import forestry.api.world.ITreeGenData;
+import forestry.core.config.Constants;
+
public class TreeBlockType implements ITreeBlockType {
private final Block block;
diff --git a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java
index 852f37b8b..f3bd5b02f 100644
--- a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java
+++ b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLeaf.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import com.mojang.authlib.GameProfile;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import com.mojang.authlib.GameProfile;
+import forestry.api.world.ITreeGenData;
+
public class TreeBlockTypeLeaf implements ITreeBlockType {
private final GameProfile owner;
diff --git a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java
index 7223c6c83..884a05525 100644
--- a/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java
+++ b/src/main/java/forestry/arboriculture/worldgen/TreeBlockTypeLog.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import forestry.api.world.ITreeGenData;
+
public class TreeBlockTypeLog implements ITreeBlockType {
+
private ForgeDirection facing = ForgeDirection.UP;
public TreeBlockTypeLog() {}
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenAcacia.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenAcacia.java
index a4b95f0ff..28d61180d 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenAcacia.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenAcacia.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenAcacia extends WorldGenTree {
public WorldGenAcacia(ITreeGenData tree) {
@@ -27,12 +27,22 @@ public class WorldGenAcacia extends WorldGenTree {
Direction leanDirection = Direction.getRandom(world.rand);
float leanAmount = height / 4.0f;
- List treeTops =
- generateTreeTrunk(world, height, girth, 0, leanDirection.forgeDirection, leanAmount);
+ List treeTops = generateTreeTrunk(
+ world,
+ height,
+ girth,
+ 0,
+ leanDirection.forgeDirection,
+ leanAmount);
if (height > 5 && world.rand.nextBoolean()) {
Direction branchDirection = Direction.getRandomOther(world.rand, leanDirection);
List treeTops2 = generateTreeTrunk(
- world, Math.round(height * 0.66f), girth, 0, branchDirection.forgeDirection, leanAmount);
+ world,
+ Math.round(height * 0.66f),
+ girth,
+ 0,
+ branchDirection.forgeDirection,
+ leanAmount);
treeTops.addAll(treeTops2);
}
@@ -46,7 +56,14 @@ public class WorldGenAcacia extends WorldGenTree {
int canopyThickness = Math.max(1, Math.round(yOffset / 10.0f));
generateAdjustedCylinder(
- world, yOffset--, xOffset, zOffset, canopyMultiplier, 1, leaf, EnumReplaceMode.NONE);
+ world,
+ yOffset--,
+ xOffset,
+ zOffset,
+ canopyMultiplier,
+ 1,
+ leaf,
+ EnumReplaceMode.NONE);
float canopyWidth = world.rand.nextBoolean() ? 3.0f : 2.5f;
List branches = generateBranches(
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenAcaciaVanilla.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenAcaciaVanilla.java
index e78729ab0..c64063512 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenAcaciaVanilla.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenAcaciaVanilla.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java
index 39e4643a8..e08b1cb40 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java
@@ -1,16 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.world.ITreeGenData;
import forestry.arboriculture.tiles.TileTreeContainer;
import forestry.core.tiles.TileUtil;
@@ -18,18 +27,11 @@ import forestry.core.utils.BlockUtil;
import forestry.core.worldgen.BlockType;
import forestry.core.worldgen.BlockTypeVoid;
import forestry.core.worldgen.WorldGenBase;
-import java.util.ArrayList;
-import java.util.EnumSet;
-import java.util.List;
-import java.util.Random;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public abstract class WorldGenArboriculture extends WorldGenBase {
enum Direction {
+
NORTH(ForgeDirection.NORTH),
SOUTH(ForgeDirection.SOUTH),
WEST(ForgeDirection.WEST),
@@ -120,20 +122,14 @@ public abstract class WorldGenArboriculture extends WorldGenBase {
return generateTreeTrunk(world, height, girth, vinesChance, ForgeDirection.UNKNOWN, 0);
}
- protected List generateTreeTrunk(
- World world, int height, int girth, float vinesChance, ForgeDirection leanDirection, float leanAmount) {
+ protected List generateTreeTrunk(World world, int height, int girth, float vinesChance,
+ ForgeDirection leanDirection, float leanAmount) {
return generateTreeTrunk(world, height, girth, 0, vinesChance, leanDirection, leanAmount);
}
/** Returns a list of trunk top coordinates */
- protected List generateTreeTrunk(
- World world,
- int height,
- int girth,
- int yStart,
- float vinesChance,
- ForgeDirection leanDirection,
- float leanAmount) {
+ protected List generateTreeTrunk(World world, int height, int girth, int yStart,
+ float vinesChance, ForgeDirection leanDirection, float leanAmount) {
List treeTops = new ArrayList<>();
final int leanStartY = (int) Math.floor(height * 0.33f);
@@ -241,27 +237,13 @@ public abstract class WorldGenArboriculture extends WorldGenBase {
}
}
- protected List generateBranches(
- World world,
- final int startY,
- int xOffset,
- int zOffset,
- float spreadY,
- float spreadXZ,
- int radius,
- int count) {
+ protected List generateBranches(World world, final int startY, int xOffset, int zOffset,
+ float spreadY, float spreadXZ, int radius, int count) {
return generateBranches(world, startY, xOffset, zOffset, spreadY, spreadXZ, radius, count, 1.0f);
}
- protected List generateBranches(
- World world,
- final int startY,
- final int xOffset,
- final int zOffset,
- final float spreadY,
- final float spreadXZ,
- int radius,
- final int count,
+ protected List generateBranches(World world, final int startY, final int xOffset,
+ final int zOffset, final float spreadY, final float spreadXZ, int radius, final int count,
final float chance) {
List branchEnds = new ArrayList<>();
if (radius < 1) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenBalsa.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenBalsa.java
index 24a6a09ae..27ba9ce64 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenBalsa.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenBalsa.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenBalsa extends WorldGenTree {
public WorldGenBalsa(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenBaobab.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenBaobab.java
index c2b4d2aff..80c022655 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenBaobab.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenBaobab.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenBaobab extends WorldGenTree {
public WorldGenBaobab(ITreeGenData tree) {
@@ -28,7 +28,14 @@ public class WorldGenBaobab extends WorldGenTree {
List branchCoords = generateBranches(world, height, 0, 0, 0, 0.5f, 4, 6);
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 0.0f, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 0.0f,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
if (world.rand.nextFloat() < 0.3f) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenBirch.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenBirch.java
index 2f2b9c7ae..2511fee21 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenBirch.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenBirch.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenCherry.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenCherry.java
index f7b07e8cd..3467ff031 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenCherry.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenCherry.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenCherry extends WorldGenTree {
public WorldGenCherry(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java
index be020b4d6..55a03edc4 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenChestnut.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenChestnut extends WorldGenTree {
public WorldGenChestnut(ITreeGenData tree) {
@@ -42,7 +42,14 @@ public class WorldGenChestnut extends WorldGenTree {
List branchCoords = generateBranches(world, leafSpawn, 0, 0, 0.5f, 0.5f, branchRadius, 2);
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 1.0f, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 1.0f,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
generateAdjustedCylinder(world, leafSpawn, 1.5f, 1, leaf);
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java
index 93c99dce8..86deaade9 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenCocobolo.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenCocobolo extends WorldGenTree {
public WorldGenCocobolo(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenDarkOak.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenDarkOak.java
index 473270e53..6e1e1e208 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenDarkOak.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenDarkOak.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java
index 895196991..ef84bf111 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenDate.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenDate extends WorldGenTree {
public WorldGenDate(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenEbony.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenEbony.java
index fbac4dd25..1b0767ca6 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenEbony.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenEbony.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenEbony extends WorldGenTree {
public WorldGenEbony(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenGiganteum.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenGiganteum.java
index 23f7e40ae..7ab6a7c5b 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenGiganteum.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenGiganteum.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenGreenheart.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenGreenheart.java
index 492308bdd..363dffa24 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenGreenheart.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenGreenheart.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenGreenheart extends WorldGenTree {
public WorldGenGreenheart(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenIpe.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenIpe.java
index 11787861f..7e86769a7 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenIpe.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenIpe.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenIpe extends WorldGenTree {
public WorldGenIpe(ITreeGenData tree) {
@@ -42,7 +42,14 @@ public class WorldGenIpe extends WorldGenTree {
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 2.0f, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 2.0f,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
}
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenJungle.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenJungle.java
index 3ebed700a..3e49ca358 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenJungle.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenJungle.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
/**
* This is a dummy and needs to be replaced with something proper.
*/
@@ -45,7 +45,14 @@ public class WorldGenJungle extends WorldGenTreeVanilla {
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 0f, 1, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 0f,
+ 1,
+ leaf,
+ EnumReplaceMode.NONE);
}
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java
index 0d920f302..79c0d9c35 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenKapok.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenKapok extends WorldGenTree {
public WorldGenKapok(ITreeGenData tree) {
@@ -44,7 +44,14 @@ public class WorldGenKapok extends WorldGenTree {
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY + 1, branchEnd.posX, branchEnd.posZ, 2.0f, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY + 1,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 2.0f,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
// Add some smaller twigs below for flavour
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java
index 6b6e974ae..5991abb50 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenLarch.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenLarch extends WorldGenTree {
public WorldGenLarch(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java
index a8b947c8f..ce89fc7a4 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenLemon.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenLemon extends WorldGenTree {
public WorldGenLemon(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java
index 4f5a7b878..94c2f511e 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahoe.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenMahoe extends WorldGenTree {
public WorldGenMahoe(ITreeGenData tree) {
@@ -28,12 +28,28 @@ public class WorldGenMahoe extends WorldGenTree {
List branchCoords = new ArrayList<>();
for (int yBranch = 2; yBranch < height - 1; yBranch++) {
- branchCoords.addAll(generateBranches(
- world, yBranch, 0, 0, 0.15f, 0.25f, Math.round((height - yBranch) * 0.75f), 1, 0.25f));
+ branchCoords.addAll(
+ generateBranches(
+ world,
+ yBranch,
+ 0,
+ 0,
+ 0.15f,
+ 0.25f,
+ Math.round((height - yBranch) * 0.75f),
+ 1,
+ 0.25f));
}
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 2, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 2,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
int yCenter = height - girth;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java
index f5f838dd1..372cc522c 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenMahogany.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenMahogany extends WorldGenTree {
public WorldGenMahogany(ITreeGenData tree) {
@@ -29,12 +29,28 @@ public class WorldGenMahogany extends WorldGenTree {
List branchCoords = new ArrayList<>();
for (int yBranch = height - 4; yBranch < height - 2; yBranch++) {
- branchCoords.addAll(generateBranches(
- world, yBranch, 0, 0, 0.15f, 0.25f, Math.round((height - yBranch) * 0.5f), 1, 0.25f));
+ branchCoords.addAll(
+ generateBranches(
+ world,
+ yBranch,
+ 0,
+ 0,
+ 0.15f,
+ 0.25f,
+ Math.round((height - yBranch) * 0.5f),
+ 1,
+ 0.25f));
}
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 2, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 2,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
int leafSpawn = height + 1;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java
index f0860b17b..475a79df8 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenMaple.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenMaple extends WorldGenTree {
public WorldGenMaple(ITreeGenData tree) {
@@ -28,12 +28,28 @@ public class WorldGenMaple extends WorldGenTree {
List branchCoords = new ArrayList<>();
for (int yBranch = 2; yBranch < height - 2; yBranch++) {
- branchCoords.addAll(generateBranches(
- world, yBranch, 0, 0, 0.15f, 0.25f, Math.round((height - yBranch) * 0.25f), 1, 0.25f));
+ branchCoords.addAll(
+ generateBranches(
+ world,
+ yBranch,
+ 0,
+ 0,
+ 0.15f,
+ 0.25f,
+ Math.round((height - yBranch) * 0.25f),
+ 1,
+ 0.25f));
}
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 2, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 2,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
int leafSpawn = height + 1;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenOak.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenOak.java
index 89f5c9c41..ddc7dbfa7 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenOak.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenOak.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java
index 7faf56b5f..a9f2d1aea 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPadauk.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.Random;
+
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenPadauk extends WorldGenTree {
public WorldGenPadauk(ITreeGenData tree) {
@@ -43,18 +43,17 @@ public class WorldGenPadauk extends WorldGenTree {
for (int i = 0; i < girth * 4; i++) {
if (world.rand.nextBoolean()) {
- int[] offset = {-1, 1};
+ int[] offset = { -1, 1 };
int offsetValue = (offset[new Random().nextInt(offset.length)]);
int maxBranchLength = 3;
int branchLength = new Random().nextInt(maxBranchLength + 1);
- ForgeDirection[] direction = {ForgeDirection.NORTH, ForgeDirection.EAST};
+ ForgeDirection[] direction = { ForgeDirection.NORTH, ForgeDirection.EAST };
ForgeDirection directionValue = (direction[new Random().nextInt(direction.length)]);
int branchSpawn = leafSpawn;
for (int j = 1; j < branchLength + 1; j++) {
- if (j == branchLength
- && world.rand
- .nextBoolean()) { // Just adding a bit of variation to the ends for character
+ if (j == branchLength && world.rand.nextBoolean()) { // Just adding a bit of variation to the
+ // ends for character
branchSpawn += 1;
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java
index 0fc949ceb..6df8b24c6 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPapaya.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenPapaya extends WorldGenTree {
public WorldGenPapaya(ITreeGenData tree) {
@@ -28,7 +28,14 @@ public class WorldGenPapaya extends WorldGenTree {
List branchCoords = generateBranches(world, height, 0, 0, 0.15f, 0.25f, height / 4, 1, 0.25f);
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 1, 1, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 1,
+ 1,
+ leaf,
+ EnumReplaceMode.NONE);
}
int yCenter = height - girth;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java
index 3676e5bc7..6f8c3851d 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPine.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenPine extends WorldGenTree {
public WorldGenPine(ITreeGenData tree) {
@@ -28,12 +28,28 @@ public class WorldGenPine extends WorldGenTree {
List branchCoords = new ArrayList<>();
for (int yBranch = 2; yBranch < height - 2; yBranch++) {
- branchCoords.addAll(generateBranches(
- world, yBranch, 0, 0, 0.05f, 0.1f, Math.round((height - yBranch) * 0.25f), 1, 0.25f));
+ branchCoords.addAll(
+ generateBranches(
+ world,
+ yBranch,
+ 0,
+ 0,
+ 0.05f,
+ 0.1f,
+ Math.round((height - yBranch) * 0.25f),
+ 1,
+ 0.25f));
}
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 2, 1, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 2,
+ 1,
+ leaf,
+ EnumReplaceMode.NONE);
}
int leafSpawn = height + 1;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java
index b69bc8404..7c58bd8e5 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPlum.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenPlum extends WorldGenTree {
public WorldGenPlum(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java
index 8d3aa68e6..ff1f12475 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenPoplar.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenPoplar extends WorldGenTree {
public WorldGenPoplar(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java
index a03dfb913..92a03bfd5 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenSequoia.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenSequoia extends WorldGenTree {
public WorldGenSequoia(ITreeGenData tree) {
@@ -43,7 +43,14 @@ public class WorldGenSequoia extends WorldGenTree {
}
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 1.0f, 1, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 1.0f,
+ 1,
+ leaf,
+ EnumReplaceMode.NONE);
}
int leafSpawn = height + 2;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java
index 20fdcbec3..fa8eb1d53 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenSilverLime.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenSilverLime extends WorldGenTree {
public WorldGenSilverLime(ITreeGenData tree) {
@@ -25,10 +25,25 @@ public class WorldGenSilverLime extends WorldGenTree {
public void generate(World world) {
generateTreeTrunk(world, height, girth);
List branchCoords = generateBranches(
- world, 3 + world.rand.nextInt(1), 0, 0, 0.25f, 0.10f, Math.round(height * 0.25f), 2, 0.5f);
+ world,
+ 3 + world.rand.nextInt(1),
+ 0,
+ 0,
+ 0.25f,
+ 0.10f,
+ Math.round(height * 0.25f),
+ 2,
+ 0.5f);
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 0, 1, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 0,
+ 1,
+ leaf,
+ EnumReplaceMode.NONE);
}
int leafSpawn = height + 1;
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java
index ba7a555e1..257ec4616 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenSpruce.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenSpruce extends WorldGenTree {
public WorldGenSpruce(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java
index 535fe40ee..b126c2fb4 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenTeak.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenTeak extends WorldGenTree {
public WorldGenTeak(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java
index 542fb8f7d..6f1433d8e 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenTree.java
@@ -1,22 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.arboriculture.ITreeModifier;
import forestry.api.arboriculture.TreeManager;
import forestry.api.world.ITreeGenData;
-import net.minecraft.world.World;
public abstract class WorldGenTree extends WorldGenArboriculture {
+
private static final int minHeight = 4;
private static final int maxHeight = 80;
@@ -54,35 +55,19 @@ public abstract class WorldGenTree extends WorldGenArboriculture {
generateAdjustedCylinder(world, yCenter, 0, 0, radius, height, block, EnumReplaceMode.SOFT);
}
- protected void generateAdjustedCylinder(
- World world, int yCenter, float radius, int height, ITreeBlockType block, EnumReplaceMode replace) {
+ protected void generateAdjustedCylinder(World world, int yCenter, float radius, int height, ITreeBlockType block,
+ EnumReplaceMode replace) {
generateAdjustedCylinder(world, yCenter, 0, 0, radius, height, block, replace);
}
- protected void generateAdjustedCylinder(
- World world,
- int yCenter,
- int xOffset,
- int zOffset,
- float radius,
- int height,
- ITreeBlockType block,
- EnumReplaceMode replace) {
+ protected void generateAdjustedCylinder(World world, int yCenter, int xOffset, int zOffset, float radius,
+ int height, ITreeBlockType block, EnumReplaceMode replace) {
Vector center = getCenteredAt(yCenter, xOffset, zOffset);
generateCylinder(world, center, radius + girth, height, block, replace);
}
- protected void generateAdjustedCircle(
- World world,
- int yCenter,
- int xOffset,
- int zOffset,
- float radius,
- int width,
- int height,
- ITreeBlockType block,
- float chance,
- EnumReplaceMode replace) {
+ protected void generateAdjustedCircle(World world, int yCenter, int xOffset, int zOffset, float radius, int width,
+ int height, ITreeBlockType block, float chance, EnumReplaceMode replace) {
Vector center = getCenteredAt(yCenter, xOffset, zOffset);
generateCircle(world, center, radius, width, height, block, chance, replace);
}
@@ -101,16 +86,16 @@ public abstract class WorldGenTree extends WorldGenArboriculture {
protected int modifyByHeight(World world, int val, int min, int max) {
ITreeModifier treeModifier = TreeManager.treeRoot.getTreekeepingMode(world);
- int determined =
- Math.round(val * tree.getHeightModifier() * treeModifier.getHeightModifier(tree.getGenome(), 1f));
+ int determined = Math
+ .round(val * tree.getHeightModifier() * treeModifier.getHeightModifier(tree.getGenome(), 1f));
return determined < min ? min : determined > max ? max : determined;
}
private int determineHeight(World world, int required, int variation) {
ITreeModifier treeModifier = TreeManager.treeRoot.getTreekeepingMode(world);
int baseHeight = required + world.rand.nextInt(variation);
- int height = Math.round(
- baseHeight * tree.getHeightModifier() * treeModifier.getHeightModifier(tree.getGenome(), 1f));
+ int height = Math
+ .round(baseHeight * tree.getHeightModifier() * treeModifier.getHeightModifier(tree.getGenome(), 1f));
return height < minHeight ? minHeight : height > maxHeight ? maxHeight : height;
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenTreeVanilla.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenTreeVanilla.java
index 05e0f9328..bfb5ec4ef 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenTreeVanilla.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenTreeVanilla.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
import forestry.api.world.ITreeGenData;
public abstract class WorldGenTreeVanilla extends WorldGenTree {
+
protected WorldGenTreeVanilla(ITreeGenData tree) {
super(tree, 5, 2);
}
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java
index 00f036fa4..73ba0c02a 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenWalnut.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenWalnut extends WorldGenTree {
public WorldGenWalnut(ITreeGenData tree) {
@@ -36,8 +36,16 @@ public class WorldGenWalnut extends WorldGenTree {
float branchSize = 2;
while (leafSpawn >= 3) {
int leafRadius = Math.min(4, (int) branchSize);
- List branchCoords =
- generateBranches(world, leafSpawn, 0, 0, 0.2f, 0.2f, (int) branchSize, 1, 0.5f);
+ List branchCoords = generateBranches(
+ world,
+ leafSpawn,
+ 0,
+ 0,
+ 0.2f,
+ 0.2f,
+ (int) branchSize,
+ 1,
+ 0.5f);
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCircle(
world,
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java
index a280076fe..6c4a2f743 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenWenge.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenWenge extends WorldGenTree {
public WorldGenWenge(ITreeGenData tree) {
@@ -37,8 +37,16 @@ public class WorldGenWenge extends WorldGenTree {
while (leafSpawn > 1) {
generateAdjustedCylinder(world, leafSpawn--, 3f, 1, leaf);
- List branchCoords =
- generateBranches(world, leafSpawn, 0, 0, 0.2f, 0.2f, (int) branchSize, 2, 0.75f);
+ List branchCoords = generateBranches(
+ world,
+ leafSpawn,
+ 0,
+ 0,
+ 0.2f,
+ 0.2f,
+ (int) branchSize,
+ 2,
+ 0.75f);
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCircle(
world,
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java
index 7231644cd..4dcd761a2 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenWillow.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenWillow extends WorldGenTree {
public WorldGenWillow(ITreeGenData tree) {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java
index 218f82e60..b45c43e6c 100644
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenZebrawood.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.arboriculture.worldgen;
-import forestry.api.world.ITreeGenData;
import java.util.List;
+
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
+import forestry.api.world.ITreeGenData;
+
public class WorldGenZebrawood extends WorldGenTree {
public WorldGenZebrawood(ITreeGenData tree) {
@@ -30,7 +30,14 @@ public class WorldGenZebrawood extends WorldGenTree {
List branchCoords = generateBranches(world, height - 4, 0, 0, 0, 0.25f, 3, 2, 0.75f);
for (ChunkCoordinates branchEnd : branchCoords) {
generateAdjustedCylinder(
- world, branchEnd.posY, branchEnd.posX, branchEnd.posZ, 1.0f, 2, leaf, EnumReplaceMode.NONE);
+ world,
+ branchEnd.posY,
+ branchEnd.posX,
+ branchEnd.posZ,
+ 1.0f,
+ 2,
+ leaf,
+ EnumReplaceMode.NONE);
}
int leafSpawn = height + 1;
diff --git a/src/main/java/forestry/core/ClimateManager.java b/src/main/java/forestry/core/ClimateManager.java
index cb823f8da..04842ea1d 100644
--- a/src/main/java/forestry/core/ClimateManager.java
+++ b/src/main/java/forestry/core/ClimateManager.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
-import forestry.api.core.IClimateManager;
-import forestry.api.core.IClimateProvider;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
+import forestry.api.core.IClimateManager;
+import forestry.api.core.IClimateProvider;
+
public class ClimateManager implements IClimateManager {
@Override
diff --git a/src/main/java/forestry/core/CreativeTabForestry.java b/src/main/java/forestry/core/CreativeTabForestry.java
index 6759b7033..531880ee0 100755
--- a/src/main/java/forestry/core/CreativeTabForestry.java
+++ b/src/main/java/forestry/core/CreativeTabForestry.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.core.Tabs;
import forestry.plugins.PluginCore;
import forestry.plugins.PluginManager;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
public class CreativeTabForestry extends CreativeTabs {
diff --git a/src/main/java/forestry/core/DefaultClimateProvider.java b/src/main/java/forestry/core/DefaultClimateProvider.java
index 3df98d65f..9c034f707 100644
--- a/src/main/java/forestry/core/DefaultClimateProvider.java
+++ b/src/main/java/forestry/core/DefaultClimateProvider.java
@@ -1,13 +1,15 @@
package forestry.core;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.ForestryAPI;
import forestry.api.core.IClimateProvider;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
public class DefaultClimateProvider implements IClimateProvider {
+
private World world;
private int xCoord, yCoord, zCoord;
diff --git a/src/main/java/forestry/core/EventHandlerCore.java b/src/main/java/forestry/core/EventHandlerCore.java
index f1d50f027..fe037ba40 100755
--- a/src/main/java/forestry/core/EventHandlerCore.java
+++ b/src/main/java/forestry/core/EventHandlerCore.java
@@ -1,15 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
+import java.util.Collection;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraftforge.client.event.TextureStitchEvent;
+import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
+import net.minecraftforge.event.world.WorldEvent;
+
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
@@ -21,11 +26,6 @@ import forestry.api.genetics.ISpeciesRoot;
import forestry.core.errors.ErrorStateRegistry;
import forestry.core.render.TextureManager;
import forestry.plugins.PluginManager;
-import java.util.Collection;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.client.event.TextureStitchEvent;
-import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
-import net.minecraftforge.event.world.WorldEvent;
public class EventHandlerCore {
@@ -50,11 +50,10 @@ public class EventHandlerCore {
public void handlePlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {
EntityPlayer player = event.player;
if (player != null) {
- Collection speciesRoots =
- AlleleManager.alleleRegistry.getSpeciesRoot().values();
+ Collection speciesRoots = AlleleManager.alleleRegistry.getSpeciesRoot().values();
for (ISpeciesRoot speciesRoot : speciesRoots) {
- IBreedingTracker breedingTracker =
- speciesRoot.getBreedingTracker(player.getEntityWorld(), player.getGameProfile());
+ IBreedingTracker breedingTracker = speciesRoot
+ .getBreedingTracker(player.getEntityWorld(), player.getGameProfile());
breedingTracker.synchToPlayer(player);
}
}
diff --git a/src/main/java/forestry/core/IPickupHandler.java b/src/main/java/forestry/core/IPickupHandler.java
index ad1ed57d7..edd562722 100644
--- a/src/main/java/forestry/core/IPickupHandler.java
+++ b/src/main/java/forestry/core/IPickupHandler.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
diff --git a/src/main/java/forestry/core/IResupplyHandler.java b/src/main/java/forestry/core/IResupplyHandler.java
index 595fd191e..6732e2362 100644
--- a/src/main/java/forestry/core/IResupplyHandler.java
+++ b/src/main/java/forestry/core/IResupplyHandler.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
diff --git a/src/main/java/forestry/core/ISaveEventHandler.java b/src/main/java/forestry/core/ISaveEventHandler.java
index a41c064b0..8504be0da 100644
--- a/src/main/java/forestry/core/ISaveEventHandler.java
+++ b/src/main/java/forestry/core/ISaveEventHandler.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
diff --git a/src/main/java/forestry/core/PickupHandlerCore.java b/src/main/java/forestry/core/PickupHandlerCore.java
index 9ee7b4397..a80f63cae 100755
--- a/src/main/java/forestry/core/PickupHandlerCore.java
+++ b/src/main/java/forestry/core/PickupHandlerCore.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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/SaveEventHandlerCore.java b/src/main/java/forestry/core/SaveEventHandlerCore.java
index 5d1d445af..3bc1c4464 100755
--- a/src/main/java/forestry/core/SaveEventHandlerCore.java
+++ b/src/main/java/forestry/core/SaveEventHandlerCore.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
diff --git a/src/main/java/forestry/core/TickHandlerCoreClient.java b/src/main/java/forestry/core/TickHandlerCoreClient.java
index 9dfbbbb3b..cb53d41ff 100755
--- a/src/main/java/forestry/core/TickHandlerCoreClient.java
+++ b/src/main/java/forestry/core/TickHandlerCoreClient.java
@@ -1,22 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.RenderGlobal;
+import net.minecraft.entity.player.EntityPlayer;
+
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import forestry.core.utils.GeneticsUtil;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.RenderGlobal;
-import net.minecraft.entity.player.EntityPlayer;
public class TickHandlerCoreClient {
diff --git a/src/main/java/forestry/core/TickHandlerCoreServer.java b/src/main/java/forestry/core/TickHandlerCoreServer.java
index 708dd0028..1cc1c020e 100755
--- a/src/main/java/forestry/core/TickHandlerCoreServer.java
+++ b/src/main/java/forestry/core/TickHandlerCoreServer.java
@@ -1,16 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core;
+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 com.google.common.collect.LinkedListMultimap;
+
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
@@ -18,13 +26,6 @@ import forestry.core.config.Config;
import forestry.core.config.Constants;
import forestry.core.worldgen.WorldGenerator;
import forestry.plugins.PluginManager;
-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;
public class TickHandlerCoreServer {
@@ -93,6 +94,7 @@ public class TickHandlerCoreServer {
}
private static class ChunkCoords {
+
public final int dimension;
public final int xCoord;
public final int zCoord;
diff --git a/src/main/java/forestry/core/access/AccessHandler.java b/src/main/java/forestry/core/access/AccessHandler.java
index 8fd9e9e30..61208ac0e 100644
--- a/src/main/java/forestry/core/access/AccessHandler.java
+++ b/src/main/java/forestry/core/access/AccessHandler.java
@@ -1,16 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.access;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTUtil;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import forestry.core.config.Config;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
@@ -19,17 +29,9 @@ import forestry.core.network.packets.PacketAccessSwitchEntity;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.ILocatable;
import forestry.core.utils.PlayerUtil;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTUtil;
-import net.minecraft.world.World;
public final class AccessHandler implements IAccessHandler {
+
private final IRestrictedAccess accessListener;
private final List accessOwnerListeners = new ArrayList<>();
private final Object target;
@@ -57,8 +59,7 @@ public final class AccessHandler implements IAccessHandler {
@Override
public final boolean allowsRemoval(EntityPlayer player) {
- return !Config.enablePermissions
- || getAccess() == EnumAccess.SHARED
+ return !Config.enablePermissions || getAccess() == EnumAccess.SHARED
|| !isOwned()
|| isOwner(player)
|| Proxies.common.isOp(player);
diff --git a/src/main/java/forestry/core/access/EnumAccess.java b/src/main/java/forestry/core/access/EnumAccess.java
index cb4943738..fe26eb720 100644
--- a/src/main/java/forestry/core/access/EnumAccess.java
+++ b/src/main/java/forestry/core/access/EnumAccess.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.access;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.util.IIcon;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public enum EnumAccess {
+
SHARED("gui.rule.shared"),
VIEWABLE("gui.rule.restricted"),
PRIVATE("gui.rule.private");
diff --git a/src/main/java/forestry/core/access/FakeAccessHandler.java b/src/main/java/forestry/core/access/FakeAccessHandler.java
index 9be2d4608..c59e2c5af 100644
--- a/src/main/java/forestry/core/access/FakeAccessHandler.java
+++ b/src/main/java/forestry/core/access/FakeAccessHandler.java
@@ -1,23 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.access;
-import com.mojang.authlib.GameProfile;
-import forestry.core.network.DataInputStreamForestry;
-import forestry.core.network.DataOutputStreamForestry;
import java.io.IOException;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
+import com.mojang.authlib.GameProfile;
+
+import forestry.core.network.DataInputStreamForestry;
+import forestry.core.network.DataOutputStreamForestry;
+
public class FakeAccessHandler implements IAccessHandler {
+
private static FakeAccessHandler instance;
public static FakeAccessHandler getInstance() {
diff --git a/src/main/java/forestry/core/access/IAccessHandler.java b/src/main/java/forestry/core/access/IAccessHandler.java
index 1e8e594a7..df4674b0f 100644
--- a/src/main/java/forestry/core/access/IAccessHandler.java
+++ b/src/main/java/forestry/core/access/IAccessHandler.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.access;
+import net.minecraft.entity.player.EntityPlayer;
+
import forestry.api.core.INBTTagable;
import forestry.core.network.IStreamable;
-import net.minecraft.entity.player.EntityPlayer;
public interface IAccessHandler extends IOwnable, IStreamable, INBTTagable {
diff --git a/src/main/java/forestry/core/access/IAccessOwnerListener.java b/src/main/java/forestry/core/access/IAccessOwnerListener.java
index 8023ef84b..f5a995e17 100644
--- a/src/main/java/forestry/core/access/IAccessOwnerListener.java
+++ b/src/main/java/forestry/core/access/IAccessOwnerListener.java
@@ -1,17 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.access;
import com.mojang.authlib.GameProfile;
public interface IAccessOwnerListener {
+
void onOwnerSet(GameProfile gameProfile);
}
diff --git a/src/main/java/forestry/core/access/IOwnable.java b/src/main/java/forestry/core/access/IOwnable.java
index a7877e213..7e398b29b 100644
--- a/src/main/java/forestry/core/access/IOwnable.java
+++ b/src/main/java/forestry/core/access/IOwnable.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.access;
-import com.mojang.authlib.GameProfile;
import net.minecraft.entity.player.EntityPlayer;
+import com.mojang.authlib.GameProfile;
+
public interface IOwnable {
boolean isOwned();
diff --git a/src/main/java/forestry/core/access/IRestrictedAccess.java b/src/main/java/forestry/core/access/IRestrictedAccess.java
index 944d69e09..03f4b285e 100644
--- a/src/main/java/forestry/core/access/IRestrictedAccess.java
+++ b/src/main/java/forestry/core/access/IRestrictedAccess.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.access;
public interface IRestrictedAccess {
+
IAccessHandler getAccessHandler();
void onSwitchAccess(EnumAccess oldAccess, EnumAccess newAccess);
diff --git a/src/main/java/forestry/core/blocks/BlockBase.java b/src/main/java/forestry/core/blocks/BlockBase.java
index 94b4d54c3..819e8d595 100644
--- a/src/main/java/forestry/core/blocks/BlockBase.java
+++ b/src/main/java/forestry/core/blocks/BlockBase.java
@@ -1,29 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.core.access.IAccessHandler;
-import forestry.core.circuits.ISocketable;
-import forestry.core.fluids.FluidHelper;
-import forestry.core.proxy.Proxies;
-import forestry.core.tiles.MachineDefinition;
-import forestry.core.tiles.TileBase;
-import forestry.core.tiles.TileForestry;
-import forestry.core.tiles.TileUtil;
-import forestry.core.utils.InventoryUtil;
-import forestry.core.utils.PlayerUtil;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -44,7 +31,21 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.IFluidHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.core.access.IAccessHandler;
+import forestry.core.circuits.ISocketable;
+import forestry.core.fluids.FluidHelper;
+import forestry.core.proxy.Proxies;
+import forestry.core.tiles.MachineDefinition;
+import forestry.core.tiles.TileBase;
+import forestry.core.tiles.TileForestry;
+import forestry.core.tiles.TileUtil;
+import forestry.core.utils.InventoryUtil;
+import forestry.core.utils.PlayerUtil;
+
public class BlockBase extends BlockForestry {
+
private final List definitions = new ArrayList<>();
private final boolean hasTESR;
@@ -176,8 +177,8 @@ public class BlockBase extends BlockForestry {
}
@Override
- public boolean onBlockActivated(
- World world, int x, int y, int z, EntityPlayer player, int side, float par7, float par8, float par9) {
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float par7,
+ float par8, float par9) {
if (player.isSneaking()) {
return false;
}
@@ -190,8 +191,7 @@ public class BlockBase extends BlockForestry {
IAccessHandler access = tile.getAccessHandler();
ItemStack current = player.getCurrentEquippedItem();
- if (current != null
- && current.getItem() != Items.bucket
+ if (current != null && current.getItem() != Items.bucket
&& tile instanceof IFluidHandler
&& access.allowsAlteration(player)) {
if (FluidHelper.handleRightClick(
@@ -241,8 +241,8 @@ public class BlockBase extends BlockForestry {
((TileForestry) tile).onRemoval();
}
if (tile instanceof ISocketable) {
- InventoryUtil.dropSockets(
- (ISocketable) tile, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord);
+ InventoryUtil
+ .dropSockets((ISocketable) tile, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord);
}
}
super.breakBlock(world, x, y, z, block, meta);
diff --git a/src/main/java/forestry/core/blocks/BlockCore.java b/src/main/java/forestry/core/blocks/BlockCore.java
index 3a3eec5a1..86559f2e7 100644
--- a/src/main/java/forestry/core/blocks/BlockCore.java
+++ b/src/main/java/forestry/core/blocks/BlockCore.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
public class BlockCore extends BlockBase {
+
public BlockCore() {
super(true);
}
diff --git a/src/main/java/forestry/core/blocks/BlockCoreType.java b/src/main/java/forestry/core/blocks/BlockCoreType.java
index 2e1e60bb9..54f8e220e 100644
--- a/src/main/java/forestry/core/blocks/BlockCoreType.java
+++ b/src/main/java/forestry/core/blocks/BlockCoreType.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
+import javax.annotation.Nullable;
+
import forestry.core.config.Constants;
import forestry.core.proxy.Proxies;
import forestry.core.render.IBlockRenderer;
@@ -17,10 +17,11 @@ import forestry.core.tiles.TileAnalyzer;
import forestry.core.tiles.TileEscritoire;
import forestry.core.tiles.TileForestry;
import forestry.plugins.PluginApiculture;
-import javax.annotation.Nullable;
public enum BlockCoreType implements IMachinePropertiesTESR {
+
ANALYZER(TileAnalyzer.class, "Analyzer") {
+
@Nullable
@Override
public IBlockRenderer getRenderer() {
@@ -28,6 +29,7 @@ public enum BlockCoreType implements IMachinePropertiesTESR {
}
},
ESCRITOIRE(TileEscritoire.class, "Escritoire") {
+
@Nullable
@Override
public IBlockRenderer getRenderer() {
diff --git a/src/main/java/forestry/core/blocks/BlockForestry.java b/src/main/java/forestry/core/blocks/BlockForestry.java
index cc1f21f6e..35e98a508 100644
--- a/src/main/java/forestry/core/blocks/BlockForestry.java
+++ b/src/main/java/forestry/core/blocks/BlockForestry.java
@@ -1,21 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
-import com.mojang.authlib.GameProfile;
-import forestry.core.CreativeTabForestry;
-import forestry.core.access.IOwnable;
-import forestry.core.access.IRestrictedAccess;
-import forestry.core.tiles.TileForestry;
-import forestry.core.utils.Log;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@@ -24,8 +16,17 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
+
import org.apache.logging.log4j.Level;
+import com.mojang.authlib.GameProfile;
+
+import forestry.core.CreativeTabForestry;
+import forestry.core.access.IOwnable;
+import forestry.core.access.IRestrictedAccess;
+import forestry.core.tiles.TileForestry;
+import forestry.core.utils.Log;
+
public abstract class BlockForestry extends BlockContainer {
protected BlockForestry(Material material) {
diff --git a/src/main/java/forestry/core/blocks/BlockRegistry.java b/src/main/java/forestry/core/blocks/BlockRegistry.java
index a91e99a36..cb4bb038c 100644
--- a/src/main/java/forestry/core/blocks/BlockRegistry.java
+++ b/src/main/java/forestry/core/blocks/BlockRegistry.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
-import cpw.mods.fml.common.registry.GameRegistry;
-import forestry.core.utils.StringUtil;
-import forestry.plugins.PluginManager;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.registry.GameRegistry;
+import forestry.core.utils.StringUtil;
+import forestry.plugins.PluginManager;
+
public abstract class BlockRegistry {
- protected static T registerBlock(
- T block, Class extends ItemBlock> itemClass, String name, Object... itemCtorArgs) {
+
+ protected static T registerBlock(T block, Class extends ItemBlock> itemClass, String name,
+ Object... itemCtorArgs) {
if (PluginManager.getStage() != PluginManager.Stage.SETUP) {
throw new RuntimeException("Tried to register Block outside of Setup");
}
diff --git a/src/main/java/forestry/core/blocks/BlockRegistryCore.java b/src/main/java/forestry/core/blocks/BlockRegistryCore.java
index 5873dd146..491452aab 100644
--- a/src/main/java/forestry/core/blocks/BlockRegistryCore.java
+++ b/src/main/java/forestry/core/blocks/BlockRegistryCore.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
-import forestry.core.items.ItemBlockForestry;
-import forestry.core.items.ItemBlockTyped;
import net.minecraft.init.Blocks;
import net.minecraftforge.oredict.OreDictionary;
+import forestry.core.items.ItemBlockForestry;
+import forestry.core.items.ItemBlockTyped;
+
public class BlockRegistryCore extends BlockRegistry {
+
public final BlockCore core;
public final BlockSoil soil;
public final BlockResourceOre resources;
diff --git a/src/main/java/forestry/core/blocks/BlockResourceOre.java b/src/main/java/forestry/core/blocks/BlockResourceOre.java
index 7553fc356..2ebdc3529 100644
--- a/src/main/java/forestry/core/blocks/BlockResourceOre.java
+++ b/src/main/java/forestry/core/blocks/BlockResourceOre.java
@@ -1,22 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.core.CreativeTabForestry;
-import forestry.core.render.TextureManager;
-import forestry.plugins.PluginCore;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -27,8 +21,16 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.core.CreativeTabForestry;
+import forestry.core.render.TextureManager;
+import forestry.plugins.PluginCore;
+
public class BlockResourceOre extends Block {
+
public enum ResourceType {
+
APATITE,
COPPER,
TIN;
@@ -87,7 +89,7 @@ public class BlockResourceOre extends Block {
}
// / CREATIVE INVENTORY
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
for (ResourceType resourceType : ResourceType.values()) {
diff --git a/src/main/java/forestry/core/blocks/BlockResourceStorage.java b/src/main/java/forestry/core/blocks/BlockResourceStorage.java
index 92f96169b..5e49854f0 100644
--- a/src/main/java/forestry/core/blocks/BlockResourceStorage.java
+++ b/src/main/java/forestry/core/blocks/BlockResourceStorage.java
@@ -1,10 +1,7 @@
package forestry.core.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.core.CreativeTabForestry;
-import forestry.core.render.TextureManager;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -13,8 +10,15 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.core.CreativeTabForestry;
+import forestry.core.render.TextureManager;
+
public class BlockResourceStorage extends Block {
+
public enum ResourceType {
+
APATITE,
COPPER,
TIN,
@@ -33,7 +37,7 @@ public class BlockResourceStorage extends Block {
setCreativeTab(CreativeTabForestry.tabForestry);
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List itemList) {
for (ResourceType resourceType : ResourceType.values()) {
diff --git a/src/main/java/forestry/core/blocks/BlockSoil.java b/src/main/java/forestry/core/blocks/BlockSoil.java
index 1d9dacb10..f86fd6991 100644
--- a/src/main/java/forestry/core/blocks/BlockSoil.java
+++ b/src/main/java/forestry/core/blocks/BlockSoil.java
@@ -1,24 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.core.CreativeTabForestry;
-import forestry.core.config.Constants;
-import forestry.core.render.TextureManager;
-import forestry.plugins.PluginCore;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.IGrowable;
import net.minecraft.block.material.Material;
@@ -34,6 +27,13 @@ import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.core.CreativeTabForestry;
+import forestry.core.config.Constants;
+import forestry.core.render.TextureManager;
+import forestry.plugins.PluginCore;
+
/**
* Humus, bog earth, peat
*/
@@ -195,8 +195,8 @@ public class BlockSoil extends Block implements IItemTyped {
}
@Override
- public boolean canSustainPlant(
- IBlockAccess world, int x, int y, int z, ForgeDirection direction, IPlantable plant) {
+ public boolean canSustainPlant(IBlockAccess world, int x, int y, int z, ForgeDirection direction,
+ IPlantable plant) {
EnumPlantType plantType = plant.getPlantType(world, x, y, z);
if (plantType != EnumPlantType.Crop && plantType != EnumPlantType.Plains) {
return false;
@@ -229,7 +229,7 @@ public class BlockSoil extends Block implements IItemTyped {
}
// / CREATIVE INVENTORY
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
itemList.add(new ItemStack(this, 1, 0));
diff --git a/src/main/java/forestry/core/blocks/BlockStructure.java b/src/main/java/forestry/core/blocks/BlockStructure.java
index 9fca08181..5caa8ed1a 100644
--- a/src/main/java/forestry/core/blocks/BlockStructure.java
+++ b/src/main/java/forestry/core/blocks/BlockStructure.java
@@ -1,22 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
@@ -28,6 +19,15 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.StatCollector;
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) {
@@ -43,8 +43,8 @@ public abstract class BlockStructure extends BlockForestry {
private long previousMessageTick = 0;
@Override
- public boolean onBlockActivated(
- World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7,
+ float par8, float par9) {
if (player.isSneaking()) {
return false;
}
diff --git a/src/main/java/forestry/core/blocks/IItemTyped.java b/src/main/java/forestry/core/blocks/IItemTyped.java
index ddeb97f4d..1ae12cddd 100644
--- a/src/main/java/forestry/core/blocks/IItemTyped.java
+++ b/src/main/java/forestry/core/blocks/IItemTyped.java
@@ -1,5 +1,6 @@
package forestry.core.blocks;
public interface IItemTyped {
+
Enum getTypeFromMeta(int meta);
}
diff --git a/src/main/java/forestry/core/blocks/IMachineProperties.java b/src/main/java/forestry/core/blocks/IMachineProperties.java
index c9d63a001..dcce99495 100644
--- a/src/main/java/forestry/core/blocks/IMachineProperties.java
+++ b/src/main/java/forestry/core/blocks/IMachineProperties.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
import forestry.core.tiles.TileForestry;
public interface IMachineProperties {
+
int getMeta();
String getTeIdent();
diff --git a/src/main/java/forestry/core/blocks/IMachinePropertiesTESR.java b/src/main/java/forestry/core/blocks/IMachinePropertiesTESR.java
index d900902f0..1721cbb96 100644
--- a/src/main/java/forestry/core/blocks/IMachinePropertiesTESR.java
+++ b/src/main/java/forestry/core/blocks/IMachinePropertiesTESR.java
@@ -1,17 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.blocks;
import forestry.core.render.IBlockRenderer;
public interface IMachinePropertiesTESR extends IMachineProperties {
+
IBlockRenderer getRenderer();
}
diff --git a/src/main/java/forestry/core/circuits/Circuit.java b/src/main/java/forestry/core/circuits/Circuit.java
index efd58773d..f17766598 100755
--- a/src/main/java/forestry/core/circuits/Circuit.java
+++ b/src/main/java/forestry/core/circuits/Circuit.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.circuits;
+import java.util.List;
+
import forestry.api.circuits.ChipsetManager;
import forestry.api.circuits.ICircuit;
import forestry.core.utils.StringUtil;
-import java.util.List;
public abstract class Circuit implements ICircuit {
diff --git a/src/main/java/forestry/core/circuits/CircuitBoard.java b/src/main/java/forestry/core/circuits/CircuitBoard.java
index badbac572..103d7d27e 100755
--- a/src/main/java/forestry/core/circuits/CircuitBoard.java
+++ b/src/main/java/forestry/core/circuits/CircuitBoard.java
@@ -1,15 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.circuits;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+
import forestry.api.circuits.ChipsetManager;
import forestry.api.circuits.ICircuit;
import forestry.api.circuits.ICircuitBoard;
@@ -17,10 +21,6 @@ import forestry.api.circuits.ICircuitLayout;
import forestry.api.circuits.ICircuitSocketType;
import forestry.core.proxy.Proxies;
import forestry.core.utils.StringUtil;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
public class CircuitBoard implements ICircuitBoard {
diff --git a/src/main/java/forestry/core/circuits/CircuitId.java b/src/main/java/forestry/core/circuits/CircuitId.java
index 4cf188ba4..03fd39a1b 100755
--- a/src/main/java/forestry/core/circuits/CircuitId.java
+++ b/src/main/java/forestry/core/circuits/CircuitId.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.circuits;
public class CircuitId {
+
public static final int ELECTRIC_CHOKE_I = 1;
public static final int FIRE_DAMPENER_I = 2;
public static final int ELECTRIC_EFFICIENCY_I = 3;
diff --git a/src/main/java/forestry/core/circuits/CircuitLayout.java b/src/main/java/forestry/core/circuits/CircuitLayout.java
index 1ec698290..8ac40f3e2 100755
--- a/src/main/java/forestry/core/circuits/CircuitLayout.java
+++ b/src/main/java/forestry/core/circuits/CircuitLayout.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.circuits;
diff --git a/src/main/java/forestry/core/circuits/CircuitLibrary.java b/src/main/java/forestry/core/circuits/CircuitLibrary.java
index 5757a98a9..55eecbfa1 100755
--- a/src/main/java/forestry/core/circuits/CircuitLibrary.java
+++ b/src/main/java/forestry/core/circuits/CircuitLibrary.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 38c4dd0ea..6f5f743c9 100644
--- a/src/main/java/forestry/core/circuits/CircuitRecipe.java
+++ b/src/main/java/forestry/core/circuits/CircuitRecipe.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 f000cca9f..73042746d 100755
--- a/src/main/java/forestry/core/circuits/CircuitRegistry.java
+++ b/src/main/java/forestry/core/circuits/CircuitRegistry.java
@@ -1,15 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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;
@@ -17,11 +22,6 @@ import forestry.api.circuits.ICircuitLayout;
import forestry.api.circuits.ICircuitLibrary;
import forestry.api.circuits.ICircuitRegistry;
import forestry.plugins.PluginCore;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
public class CircuitRegistry implements ICircuitRegistry {
@@ -36,8 +36,8 @@ public class CircuitRegistry implements ICircuitRegistry {
@Override
public ICircuitLibrary getCircuitLibrary(World world, String playername) {
- CircuitLibrary library =
- (CircuitLibrary) world.loadItemData(CircuitLibrary.class, "CircuitLibrary_" + playername);
+ CircuitLibrary library = (CircuitLibrary) world
+ .loadItemData(CircuitLibrary.class, "CircuitLibrary_" + playername);
if (library == null) {
library = new CircuitLibrary(playername);
diff --git a/src/main/java/forestry/core/circuits/ContainerSolderingIron.java b/src/main/java/forestry/core/circuits/ContainerSolderingIron.java
index 9cd404017..0efc8a997 100755
--- a/src/main/java/forestry/core/circuits/ContainerSolderingIron.java
+++ b/src/main/java/forestry/core/circuits/ContainerSolderingIron.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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;
@@ -21,8 +22,6 @@ 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 {
@@ -71,8 +70,7 @@ public class ContainerSolderingIron extends ContainerItemInventory {
@@ -52,7 +52,8 @@ public class GuiSolderingIron extends GuiForestry recipes = new ArrayList<>();
@Override
diff --git a/src/main/java/forestry/core/commands/CommandHelpers.java b/src/main/java/forestry/core/commands/CommandHelpers.java
index 162d8f1c4..a192b0876 100644
--- a/src/main/java/forestry/core/commands/CommandHelpers.java
+++ b/src/main/java/forestry/core/commands/CommandHelpers.java
@@ -1,19 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
-import forestry.core.utils.StringUtil;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
@@ -25,6 +23,8 @@ import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
+import forestry.core.utils.StringUtil;
+
/**
* @author CovertJaguar
*/
@@ -62,19 +62,19 @@ public class CommandHelpers {
sender.addChatMessage(new ChatComponentTranslation(locTag, args));
}
- public static void sendLocalizedChatMessage(
- ICommandSender sender, ChatStyle chatStyle, String locTag, Object... args) {
+ public static void sendLocalizedChatMessage(ICommandSender sender, ChatStyle chatStyle, String locTag,
+ Object... args) {
ChatComponentTranslation chat = new ChatComponentTranslation(locTag, args);
chat.setChatStyle(chatStyle);
sender.addChatMessage(chat);
}
/**
- * Avoid using this function if at all possible. Commands are processed on the server,
- * which has no localization information.
+ * 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().
+ * StringUtil.localize() is NOT a valid alternative for sendLocalizedChatMessage(). Messages will not be localized
+ * properly if you use StringUtil.localize().
*/
public static void sendChatMessage(ICommandSender sender, String message) {
sender.addChatMessage(new ChatComponentText(message));
@@ -100,7 +100,10 @@ public class CommandHelpers {
ChatStyle header = new ChatStyle();
header.setColor(EnumChatFormatting.BLUE);
sendLocalizedChatMessage(
- sender, header, "for.chat.command." + commandString + ".format", command.getFullCommandString());
+ sender,
+ header,
+ "for.chat.command." + commandString + ".format",
+ command.getFullCommandString());
ChatStyle body = new ChatStyle();
body.setColor(EnumChatFormatting.GRAY);
@@ -166,8 +169,8 @@ public class CommandHelpers {
return CommandBase.getListOfStringsMatchingLastWord(strings, lastWords);
}
- public static List addStandardTabCompletionOptions(
- IForestryCommand command, ICommandSender sender, String[] incomplete) {
+ public static List addStandardTabCompletionOptions(IForestryCommand command, ICommandSender sender,
+ String[] incomplete) {
if (incomplete.length > 1) {
String commandName = incomplete[0];
for (SubCommand child : command.getChildren()) {
diff --git a/src/main/java/forestry/core/commands/CommandMode.java b/src/main/java/forestry/core/commands/CommandMode.java
index 98f6e1d0c..98c70385e 100644
--- a/src/main/java/forestry/core/commands/CommandMode.java
+++ b/src/main/java/forestry/core/commands/CommandMode.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
diff --git a/src/main/java/forestry/core/commands/CommandModeInfo.java b/src/main/java/forestry/core/commands/CommandModeInfo.java
index d3ef554d9..28ba0af90 100644
--- a/src/main/java/forestry/core/commands/CommandModeInfo.java
+++ b/src/main/java/forestry/core/commands/CommandModeInfo.java
@@ -1,23 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
import java.util.List;
+
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
+
import org.apache.commons.lang3.StringUtils;
public class CommandModeInfo extends SubCommand {
+
private final String[] modeStringArr;
private final String helpString;
private final ICommandModeHelper modeHelper;
@@ -63,8 +64,8 @@ public class CommandModeInfo extends SubCommand {
String modeName = modeHelper.getModeName(world);
String worldName = String.valueOf(world.getWorldInfo().getSaveVersion());
- CommandHelpers.sendLocalizedChatMessage(
- sender, "for.chat.command.forestry.mode.info.current", modeName, worldName);
+ CommandHelpers
+ .sendLocalizedChatMessage(sender, "for.chat.command.forestry.mode.info.current", modeName, worldName);
CommandHelpers.sendLocalizedChatMessage(sender, "for.chat.command.forestry.mode.info.available", helpString);
}
diff --git a/src/main/java/forestry/core/commands/CommandModeSet.java b/src/main/java/forestry/core/commands/CommandModeSet.java
index 5beaff5df..aabf703be 100644
--- a/src/main/java/forestry/core/commands/CommandModeSet.java
+++ b/src/main/java/forestry/core/commands/CommandModeSet.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
import java.util.List;
+
import net.minecraft.command.ICommandSender;
import net.minecraft.world.World;
public final class CommandModeSet extends SubCommand {
+
private final String[] modeStringArr;
private final ICommandModeHelper modeSetter;
diff --git a/src/main/java/forestry/core/commands/CommandPlugins.java b/src/main/java/forestry/core/commands/CommandPlugins.java
index 2e881583c..85d8ec5fb 100644
--- a/src/main/java/forestry/core/commands/CommandPlugins.java
+++ b/src/main/java/forestry/core/commands/CommandPlugins.java
@@ -1,23 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+
import forestry.core.utils.StringUtil;
import forestry.plugins.ForestryPlugin;
import forestry.plugins.Plugin;
import forestry.plugins.PluginManager;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
/**
* @author CovertJaguar
@@ -115,8 +114,8 @@ public class CommandPlugins extends SubCommand {
CommandHelpers.sendChatMessage(sender, EnumChatFormatting.BLUE + "URL: " + info.url());
}
if (!info.unlocalizedDescription().isEmpty()) {
- CommandHelpers.sendChatMessage(
- sender, StatCollector.translateToLocal(info.unlocalizedDescription()));
+ CommandHelpers
+ .sendChatMessage(sender, StatCollector.translateToLocal(info.unlocalizedDescription()));
}
}
}
diff --git a/src/main/java/forestry/core/commands/CommandSaveStats.java b/src/main/java/forestry/core/commands/CommandSaveStats.java
index 377d2fdfd..f180fcc02 100644
--- a/src/main/java/forestry/core/commands/CommandSaveStats.java
+++ b/src/main/java/forestry/core/commands/CommandSaveStats.java
@@ -1,22 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
-import forestry.api.genetics.AlleleManager;
-import forestry.api.genetics.IAlleleSpecies;
-import forestry.api.genetics.IBreedingTracker;
-import forestry.core.config.Constants;
-import forestry.core.config.Version;
-import forestry.core.proxy.Proxies;
-import forestry.core.utils.StringUtil;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
@@ -28,11 +19,20 @@ import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Locale;
+
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
+import forestry.api.genetics.AlleleManager;
+import forestry.api.genetics.IAlleleSpecies;
+import forestry.api.genetics.IBreedingTracker;
+import forestry.core.config.Constants;
+import forestry.core.config.Version;
+import forestry.core.proxy.Proxies;
+import forestry.core.utils.StringUtil;
+
public final class CommandSaveStats extends SubCommand {
private static final String discoveredSymbol;
@@ -41,8 +41,8 @@ public final class CommandSaveStats extends SubCommand {
static {
discoveredSymbol = StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.discovered.symbol");
- blacklistedSymbol =
- StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.blacklisted.symbol");
+ blacklistedSymbol = StatCollector
+ .translateToLocal("for.chat.command.forestry.stats.save.key.blacklisted.symbol");
notCountedSymbol = StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.notCounted.symbol");
}
@@ -80,11 +80,16 @@ public final class CommandSaveStats extends SubCommand {
Collection statistics = new ArrayList<>();
String date = DateFormat.getInstance().format(new Date());
- statistics.add(StatCollector.translateToLocalFormatted(
- saveHelper.getUnlocalizedSaveStatsString(), player.getDisplayName(), date));
+ statistics.add(
+ StatCollector.translateToLocalFormatted(
+ saveHelper.getUnlocalizedSaveStatsString(),
+ player.getDisplayName(),
+ date));
statistics.add("");
- statistics.add(StatCollector.translateToLocalFormatted(
- "for.chat.command.forestry.stats.save.mode", modeHelper.getModeName(world)));
+ statistics.add(
+ StatCollector.translateToLocalFormatted(
+ "for.chat.command.forestry.stats.save.mode",
+ modeHelper.getModeName(world)));
statistics.add("");
IBreedingTracker tracker = saveHelper.getBreedingTracker(world, player.getGameProfile());
@@ -100,12 +105,15 @@ public final class CommandSaveStats extends SubCommand {
statistics.add(speciesCountLine);
statistics.add(StringUtil.line(speciesCountLine.length()));
- statistics.add(discoveredSymbol + ": "
- + StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.discovered"));
- statistics.add(blacklistedSymbol + ": "
- + StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.blacklisted"));
- statistics.add(notCountedSymbol + ": "
- + StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.notCounted"));
+ statistics.add(
+ discoveredSymbol + ": "
+ + StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.discovered"));
+ statistics.add(
+ blacklistedSymbol + ": "
+ + StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.blacklisted"));
+ statistics.add(
+ notCountedSymbol + ": "
+ + StatCollector.translateToLocal("for.chat.command.forestry.stats.save.key.notCounted"));
statistics.add("");
String header = generateSpeciesListHeader();
@@ -121,8 +129,12 @@ public final class CommandSaveStats extends SubCommand {
File file = new File(
Proxies.common.getForestryRoot(),
- "config/" + Constants.MOD.toLowerCase(Locale.ENGLISH) + "/stats/" + player.getDisplayName() + '-'
- + saveHelper.getFileSuffix() + ".log");
+ "config/" + Constants.MOD.toLowerCase(Locale.ENGLISH)
+ + "/stats/"
+ + player.getDisplayName()
+ + '-'
+ + saveHelper.getFileSuffix()
+ + ".log");
try {
File folder = file.getParentFile();
if (folder != null && !folder.exists()) {
@@ -161,7 +173,9 @@ public final class CommandSaveStats extends SubCommand {
}
CommandHelpers.sendLocalizedChatMessage(
- sender, "for.chat.command.forestry.stats.save.saved", player.getDisplayName());
+ sender,
+ "for.chat.command.forestry.stats.save.saved",
+ player.getDisplayName());
}
private static String generateSpeciesListHeader() {
@@ -187,18 +201,23 @@ public final class CommandSaveStats extends SubCommand {
}
return speciesListEntry(
- discovered, blacklisted, notCounted, species.getUID(), species.getName(), species.getAuthority());
+ discovered,
+ blacklisted,
+ notCounted,
+ species.getUID(),
+ species.getName(),
+ species.getAuthority());
}
- private static String speciesListEntry(
- String discovered,
- String blacklisted,
- String notCounted,
- String UID,
- String speciesName,
- String authority) {
+ private static String speciesListEntry(String discovered, String blacklisted, String notCounted, String UID,
+ String speciesName, String authority) {
return String.format(
"[ %-2s ] [ %-2s ] [ %-2s ]\t%-40s %-20s %-20s",
- discovered, blacklisted, notCounted, UID, speciesName, authority);
+ discovered,
+ blacklisted,
+ notCounted,
+ UID,
+ speciesName,
+ authority);
}
}
diff --git a/src/main/java/forestry/core/commands/CommandVersion.java b/src/main/java/forestry/core/commands/CommandVersion.java
index 6089ac2e3..58bc1c297 100644
--- a/src/main/java/forestry/core/commands/CommandVersion.java
+++ b/src/main/java/forestry/core/commands/CommandVersion.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
-import forestry.core.config.Version;
-import forestry.core.proxy.Proxies;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
+import forestry.core.config.Version;
+import forestry.core.proxy.Proxies;
+
/**
* @author CovertJaguar
*/
diff --git a/src/main/java/forestry/core/commands/ICommandModeHelper.java b/src/main/java/forestry/core/commands/ICommandModeHelper.java
index 0728ebc43..3eb1f8ce5 100644
--- a/src/main/java/forestry/core/commands/ICommandModeHelper.java
+++ b/src/main/java/forestry/core/commands/ICommandModeHelper.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
import net.minecraft.world.World;
public interface ICommandModeHelper {
+
String[] getModeNames();
String getModeNameMatching(String desired);
diff --git a/src/main/java/forestry/core/commands/IForestryCommand.java b/src/main/java/forestry/core/commands/IForestryCommand.java
index f6f46625b..445a47bbc 100644
--- a/src/main/java/forestry/core/commands/IForestryCommand.java
+++ b/src/main/java/forestry/core/commands/IForestryCommand.java
@@ -1,17 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
import java.util.List;
import java.util.SortedSet;
+
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
diff --git a/src/main/java/forestry/core/commands/IStatsSaveHelper.java b/src/main/java/forestry/core/commands/IStatsSaveHelper.java
index e8699a616..bc0686604 100644
--- a/src/main/java/forestry/core/commands/IStatsSaveHelper.java
+++ b/src/main/java/forestry/core/commands/IStatsSaveHelper.java
@@ -1,20 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
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 java.util.Collection;
-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 e6adc32aa..44d8c6308 100644
--- a/src/main/java/forestry/core/commands/RootCommand.java
+++ b/src/main/java/forestry/core/commands/RootCommand.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
@@ -15,6 +13,7 @@ import java.util.Comparator;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
+
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
@@ -59,8 +58,8 @@ public class RootCommand extends CommandBase implements IForestryCommand {
}
/**
- * Used only for CommandBase.
- * It gets obfuscated, so the name needs to be different from the one in IForestryCommand.
+ * Used only for CommandBase. It gets obfuscated, so the name needs to be different from the one in
+ * IForestryCommand.
*/
@Override
public int getRequiredPermissionLevel() {
diff --git a/src/main/java/forestry/core/commands/SpeciesNotFoundException.java b/src/main/java/forestry/core/commands/SpeciesNotFoundException.java
index c309b2b5c..0e4500b00 100644
--- a/src/main/java/forestry/core/commands/SpeciesNotFoundException.java
+++ b/src/main/java/forestry/core/commands/SpeciesNotFoundException.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
diff --git a/src/main/java/forestry/core/commands/SubCommand.java b/src/main/java/forestry/core/commands/SubCommand.java
index a88452feb..491cc9dbf 100644
--- a/src/main/java/forestry/core/commands/SubCommand.java
+++ b/src/main/java/forestry/core/commands/SubCommand.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
@@ -15,7 +13,9 @@ import java.util.Comparator;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
+
import javax.annotation.Nonnull;
+
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
@@ -25,8 +25,10 @@ import net.minecraft.command.ICommandSender;
public abstract class SubCommand implements IForestryCommand {
public enum PermLevel {
+
EVERYONE(0),
ADMIN(2);
+
public final int permLevel;
PermLevel(int permLevel) {
diff --git a/src/main/java/forestry/core/commands/TemplateNotFoundException.java b/src/main/java/forestry/core/commands/TemplateNotFoundException.java
index c18e2f49c..325e28335 100644
--- a/src/main/java/forestry/core/commands/TemplateNotFoundException.java
+++ b/src/main/java/forestry/core/commands/TemplateNotFoundException.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.commands;
-import forestry.api.genetics.IAlleleSpecies;
import net.minecraft.command.CommandException;
+import forestry.api.genetics.IAlleleSpecies;
+
public class TemplateNotFoundException extends CommandException {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/forestry/core/config/Config.java b/src/main/java/forestry/core/config/Config.java
index 44ba82a61..13502504a 100755
--- a/src/main/java/forestry/core/config/Config.java
+++ b/src/main/java/forestry/core/config/Config.java
@@ -1,21 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
-import com.google.common.collect.LinkedListMultimap;
-import forestry.Forestry;
-import forestry.core.fluids.Fluids;
-import forestry.core.utils.Log;
-import forestry.core.utils.StringUtil;
-import forestry.mail.gui.GuiMailboxInfo;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
@@ -25,9 +17,18 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
+
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.config.Property;
+import com.google.common.collect.LinkedListMultimap;
+
+import forestry.Forestry;
+import forestry.core.fluids.Fluids;
+import forestry.core.utils.Log;
+import forestry.core.utils.StringUtil;
+import forestry.mail.gui.GuiMailboxInfo;
+
public class Config {
public static final String CATEGORY_COMMON = "common";
@@ -145,16 +146,16 @@ public class Config {
configCommon = new LocalizedConfiguration(configFileCommon, "1.2.0");
- gameMode = configCommon.getStringLocalized(
- "difficulty", "game.mode", "EASY", new String[] {"OP, EASY, NORMAL, HARD"});
+ gameMode = configCommon
+ .getStringLocalized("difficulty", "game.mode", "EASY", new String[] { "OP, EASY, NORMAL, HARD" });
boolean recreate = configCommon.getBooleanLocalized("difficulty", "recreate.definitions", true);
if (recreate) {
Log.info("Recreating all gamemode definitions from the defaults. This may be caused by an upgrade");
String recreateDefinitionsComment = StringUtil.localize("config.difficulty.recreate.definitions.comment");
- Property property =
- configCommon.get("difficulty", "recreate.definitions", true, recreateDefinitionsComment);
+ Property property = configCommon
+ .get("difficulty", "recreate.definitions", true, recreateDefinitionsComment);
property.set(false);
// Make sure the default mode files are there.
@@ -186,10 +187,10 @@ public class Config {
Log.info("Enabled retrogen.");
}
- generateBeehivesAmount = configCommon.getFloatLocalized(
- "world.generate.beehives", "amount", generateBeehivesAmount, 0.0f, 10.0f);
- generateBeehivesDebug =
- configCommon.getBooleanLocalized("world.generate.beehives", "debug", generateBeehivesDebug);
+ generateBeehivesAmount = configCommon
+ .getFloatLocalized("world.generate.beehives", "amount", generateBeehivesAmount, 0.0f, 10.0f);
+ generateBeehivesDebug = configCommon
+ .getBooleanLocalized("world.generate.beehives", "debug", generateBeehivesDebug);
generateApatiteOre = configCommon.getBooleanLocalized("world.generate.ore", "apatite", generateApatiteOre);
generateCopperOre = configCommon.getBooleanLocalized("world.generate.ore", "copper", generateCopperOre);
@@ -200,10 +201,10 @@ public class Config {
craftingBronzeEnabled = configCommon.getBooleanLocalized("crafting", "bronze", craftingBronzeEnabled);
craftingStampsEnabled = configCommon.getBooleanLocalized("crafting.stamps", "enabled", true);
- String[] allStamps = new String[] {"1n", "2n", "5n", "10n", "20n", "50n", "100n"};
- String[] defaultCollectors = new String[] {"20n", "50n", "100n"};
- String[] stamps =
- configCommon.getStringListLocalized("crafting.stamps", "disabled", defaultCollectors, allStamps);
+ String[] allStamps = new String[] { "1n", "2n", "5n", "10n", "20n", "50n", "100n" };
+ String[] defaultCollectors = new String[] { "20n", "50n", "100n" };
+ String[] stamps = configCommon
+ .getStringListLocalized("crafting.stamps", "disabled", defaultCollectors, allStamps);
try {
collectorStamps.addAll(Arrays.asList(stamps));
} catch (Exception ex) {
@@ -213,33 +214,52 @@ public class Config {
collectorStamps.addAll(Arrays.asList(defaultCollectors));
}
- clearInvalidChromosomes =
- configCommon.getBooleanLocalized("genetics", "clear.invalid.chromosomes", clearInvalidChromosomes);
- pollinateVanillaTrees =
- configCommon.getBooleanLocalized("genetics", "pollinate.vanilla.trees", pollinateVanillaTrees);
+ clearInvalidChromosomes = configCommon
+ .getBooleanLocalized("genetics", "clear.invalid.chromosomes", clearInvalidChromosomes);
+ pollinateVanillaTrees = configCommon
+ .getBooleanLocalized("genetics", "pollinate.vanilla.trees", pollinateVanillaTrees);
researchMutationBoostMultiplier = configCommon.getFloatLocalized(
- "genetics.research.boost", "multiplier", researchMutationBoostMultiplier, 1.0f, 1000.f);
+ "genetics.research.boost",
+ "multiplier",
+ researchMutationBoostMultiplier,
+ 1.0f,
+ 1000.f);
maxResearchMutationBoostPercent = configCommon.getFloatLocalized(
- "genetics.research.boost", "max.percent", maxResearchMutationBoostPercent, 0.0f, 100.0f);
+ "genetics.research.boost",
+ "max.percent",
+ maxResearchMutationBoostPercent,
+ 0.0f,
+ 100.0f);
dungeonLootRare = configCommon.getBooleanLocalized("difficulty", "loot.rare", dungeonLootRare);
- enableBackpackResupply =
- configCommon.getBooleanLocalized("performance", "backpacks.resupply", enableBackpackResupply);
+ enableBackpackResupply = configCommon
+ .getBooleanLocalized("performance", "backpacks.resupply", enableBackpackResupply);
- enableCraftingTimeout =
- configCommon.getBooleanLocalized("optimization", "enable.crafting.timeout", enableCraftingTimeout);
- craftingTimeout = configCommon.getIntLocalized(
- "optimization",
- "crafting.timeout",
- craftingTimeout,
- 50,
- 2000); // min 50ms, default 200ms, max 2000 ms. Integer.MAX_VALUE is ~ 2100 ms because of multiplication
+ enableCraftingTimeout = configCommon
+ .getBooleanLocalized("optimization", "enable.crafting.timeout", enableCraftingTimeout);
+ craftingTimeout = configCommon.getIntLocalized("optimization", "crafting.timeout", craftingTimeout, 50, 2000); // min
+ // 50ms,
+ // default
+ // 200ms,
+ // max
+ // 2000
+ // ms.
+ // Integer.MAX_VALUE
+ // is
+ // ~
+ // 2100
+ // ms
+ // because
+ // of
+ // multiplication
// by 1,000,000
- cacheWorktableRecipes =
- configCommon.getBooleanLocalized("optimization", "cache.worktable.recipes", cacheWorktableRecipes);
+ cacheWorktableRecipes = configCommon
+ .getBooleanLocalized("optimization", "cache.worktable.recipes", cacheWorktableRecipes);
promoteWorktableRecipesToFrontOfGlobalRecipemap = configCommon.getBooleanLocalized(
- "optimization", "promote.worktable.recipes", promoteWorktableRecipesToFrontOfGlobalRecipemap);
+ "optimization",
+ "promote.worktable.recipes",
+ promoteWorktableRecipesToFrontOfGlobalRecipemap);
// move legacy mail property
configCommon.moveProperty("tweaks.gui", "mail.alert", "tweaks.gui.mail.alert");
@@ -247,9 +267,15 @@ public class Config {
mailAlertEnabled = configCommon.getBooleanLocalized("tweaks.gui.mail.alert", "enabled", mailAlertEnabled);
mailAlertXPosition = configCommon.getEnumLocalized(
- "tweaks.gui.mail.alert", "xPosition", mailAlertXPosition, GuiMailboxInfo.XPosition.values());
+ "tweaks.gui.mail.alert",
+ "xPosition",
+ mailAlertXPosition,
+ GuiMailboxInfo.XPosition.values());
mailAlertYPosition = configCommon.getEnumLocalized(
- "tweaks.gui.mail.alert", "yPosition", mailAlertYPosition, GuiMailboxInfo.YPosition.values());
+ "tweaks.gui.mail.alert",
+ "yPosition",
+ mailAlertYPosition,
+ GuiMailboxInfo.YPosition.values());
guiTabSpeed = configCommon.getIntLocalized("tweaks.gui.tabs", "speed", guiTabSpeed, 1, 50);
enableHints = configCommon.getBooleanLocalized("tweaks.gui.tabs", "hints", enableHints);
@@ -260,14 +286,14 @@ public class Config {
farmSize = configCommon.getIntLocalized("tweaks.farms", "size", farmSize, 1, 3);
squareFarms = configCommon.getBooleanLocalized("tweaks.farms", "square", squareFarms);
enableExUtilEnderLily = configCommon.getBooleanLocalized("tweaks.farms", "enderlily", enableExUtilEnderLily);
- enableMagicalCropsSupport =
- configCommon.getBooleanLocalized("tweaks.farms", "magicalcrops", enableMagicalCropsSupport);
+ enableMagicalCropsSupport = configCommon
+ .getBooleanLocalized("tweaks.farms", "magicalcrops", enableMagicalCropsSupport);
- String[] availableStructures =
- new String[] {"alveary3x3", "farm3x3", "farm3x4", "farm3x5", "farm4x4", "farm5x5"};
+ String[] availableStructures = new String[] { "alveary3x3", "farm3x3", "farm3x4", "farm3x5", "farm4x4",
+ "farm5x5" };
String[] disabledStructureArray = disabledStructures.toArray(new String[disabledStructures.size()]);
- disabledStructureArray = configCommon.getStringListLocalized(
- "structures", "disabled", disabledStructureArray, availableStructures);
+ disabledStructureArray = configCommon
+ .getStringListLocalized("structures", "disabled", disabledStructureArray, availableStructures);
disabledStructures.addAll(Arrays.asList(disabledStructureArray));
for (String str : disabledStructures) {
@@ -293,10 +319,10 @@ public class Config {
}
boolean enabledFluidBlock = !Config.disabledBlocks.contains(fluid.getTag());
- String enableFluidBlockComment =
- StringUtil.localizeAndFormatRaw("for.config.fluid.blocks.enable.format", fluidName);
- enabledFluidBlock = configFluid.getBoolean(
- "enableFluidBlock", fluid.getTag(), enabledFluidBlock, enableFluidBlockComment);
+ String enableFluidBlockComment = StringUtil
+ .localizeAndFormatRaw("for.config.fluid.blocks.enable.format", fluidName);
+ enabledFluidBlock = configFluid
+ .getBoolean("enableFluidBlock", fluid.getTag(), enabledFluidBlock, enableFluidBlockComment);
if (!enabledFluidBlock) {
Config.disabledBlocks.add(fluid.getTag());
}
diff --git a/src/main/java/forestry/core/config/Constants.java b/src/main/java/forestry/core/config/Constants.java
index 77081be8b..61625d7e3 100644
--- a/src/main/java/forestry/core/config/Constants.java
+++ b/src/main/java/forestry/core/config/Constants.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
import forestry.api.core.IForestryConstants;
public class Constants implements IForestryConstants {
+
// System
public static final String MOD = "Forestry";
public static final String ID = "forestry";
@@ -26,7 +25,7 @@ public class Constants implements IForestryConstants {
public static final int BUCKET_VOLUME = 1000;
public static final int FLUID_PER_HONEY_DROP = 100;
- public static final int[] FACINGS = {0, 1, 2, 3, 4, 5};
+ public static final int[] FACINGS = { 0, 1, 2, 3, 4, 5 };
public static final int[] SLOTS_NONE = new int[0];
public static final String[] EMPTY_STRINGS = new String[0];
diff --git a/src/main/java/forestry/core/config/ForestryGuiConfig.java b/src/main/java/forestry/core/config/ForestryGuiConfig.java
index 1446c5e13..7e49d7e6d 100644
--- a/src/main/java/forestry/core/config/ForestryGuiConfig.java
+++ b/src/main/java/forestry/core/config/ForestryGuiConfig.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
-import cpw.mods.fml.client.config.GuiConfig;
-import cpw.mods.fml.client.config.IConfigElement;
import java.util.ArrayList;
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 cpw.mods.fml.client.config.GuiConfig;
+import cpw.mods.fml.client.config.IConfigElement;
+
public class ForestryGuiConfig extends GuiConfig {
public ForestryGuiConfig(GuiScreen parent) {
@@ -28,8 +28,8 @@ public class ForestryGuiConfig extends GuiConfig {
private static List getConfigCategories() {
List configElements = new ArrayList<>();
- List commonCategoryNames =
- Arrays.asList("crafting", "difficulty", "genetics", "performance", "structures", "tweaks", "world");
+ List commonCategoryNames = Arrays
+ .asList("crafting", "difficulty", "genetics", "performance", "structures", "tweaks", "world");
for (String categoryName : commonCategoryNames) {
ConfigCategory category = Config.configCommon.getCategory(categoryName);
configElements.add(new ConfigElement(category));
diff --git a/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java b/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java
index 316c124f8..08be3604c 100644
--- a/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java
+++ b/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java
@@ -1,21 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
-import cpw.mods.fml.client.IModGuiFactory;
import java.util.Set;
+
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
+import cpw.mods.fml.client.IModGuiFactory;
+
public class ForestryGuiConfigFactory implements IModGuiFactory {
+
@Override
public void initialize(Minecraft minecraftInstance) {}
diff --git a/src/main/java/forestry/core/config/GameMode.java b/src/main/java/forestry/core/config/GameMode.java
index 21385ff7e..4f92d9a4d 100644
--- a/src/main/java/forestry/core/config/GameMode.java
+++ b/src/main/java/forestry/core/config/GameMode.java
@@ -1,28 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+
import forestry.Forestry;
import forestry.api.core.IGameMode;
import forestry.core.blocks.BlockSoil;
import forestry.core.utils.Log;
import forestry.plugins.PluginCore;
import forestry.plugins.PluginFluids;
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
public class GameMode implements IGameMode {
+
private static final String GAMEMODE_KEY = "gamemode";
private String identifier = "EASY";
private final String category;
diff --git a/src/main/java/forestry/core/config/LocalizedConfiguration.java b/src/main/java/forestry/core/config/LocalizedConfiguration.java
index 74f759935..fc285ea38 100644
--- a/src/main/java/forestry/core/config/LocalizedConfiguration.java
+++ b/src/main/java/forestry/core/config/LocalizedConfiguration.java
@@ -1,17 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
import java.io.File;
import java.util.Arrays;
+
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
@@ -64,8 +63,11 @@ public class LocalizedConfiguration extends Configuration {
Property prop = this.get(category, name, defaultValue);
prop.setValidValues(validValues);
prop.setLanguageKey(langKey);
- prop.comment =
- comment + " [default: " + defaultValue + "] [valid: " + Arrays.toString(prop.getValidValues()) + "]";
+ prop.comment = comment + " [default: "
+ + defaultValue
+ + "] [valid: "
+ + Arrays.toString(prop.getValidValues())
+ + "]";
return prop.getString();
}
@@ -87,8 +89,11 @@ public class LocalizedConfiguration extends Configuration {
prop.setValidValues(validValues);
prop.setLanguageKey(langKey);
- prop.comment =
- comment + " [default: " + defaultValue + "] [valid: " + Arrays.toString(prop.getValidValues()) + "]";
+ prop.comment = comment + " [default: "
+ + defaultValue
+ + "] [valid: "
+ + Arrays.toString(prop.getValidValues())
+ + "]";
String stringValue = prop.getString();
T enumValue = defaultValue;
@@ -122,8 +127,11 @@ public class LocalizedConfiguration extends Configuration {
Property prop = this.get(category, name, defaultValue);
prop.setLanguageKey(langKey);
prop.setValidValues(validValues);
- prop.comment = comment + " [default: " + Arrays.toString(defaultValue) + "] [valid: "
- + Arrays.toString(prop.getValidValues()) + "]";
+ prop.comment = comment + " [default: "
+ + Arrays.toString(defaultValue)
+ + "] [valid: "
+ + Arrays.toString(prop.getValidValues())
+ + "]";
return prop.getStringList();
}
diff --git a/src/main/java/forestry/core/config/SessionVars.java b/src/main/java/forestry/core/config/SessionVars.java
index 13054d72a..ab1a7d374 100755
--- a/src/main/java/forestry/core/config/SessionVars.java
+++ b/src/main/java/forestry/core/config/SessionVars.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
diff --git a/src/main/java/forestry/core/config/Version.java b/src/main/java/forestry/core/config/Version.java
index ba7ec45e4..155589a98 100755
--- a/src/main/java/forestry/core/config/Version.java
+++ b/src/main/java/forestry/core/config/Version.java
@@ -1,29 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.config;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.versioning.DefaultArtifactVersion;
-import forestry.Forestry;
-import forestry.core.proxy.Proxies;
-import forestry.core.utils.Log;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
+
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.versioning.DefaultArtifactVersion;
+import forestry.Forestry;
+import forestry.core.proxy.Proxies;
+import forestry.core.utils.Log;
+
/**
* With permission from pahimar.
*
@@ -39,8 +39,8 @@ public class Version {
public static final String VERSION = "@VERSION@";
public static final String BUILD_NUMBER = "@BUILD_NUMBER@";
- public static final String[] FAILED_CHANGELOG =
- new String[] {String.format("Unable to retrieve changelog for %s", Constants.MOD)};
+ public static final String[] FAILED_CHANGELOG = new String[] {
+ String.format("Unable to retrieve changelog for %s", Constants.MOD) };
private static final String REMOTE_VERSION_FILE = "http://bit.ly/forestryver";
private static final String REMOTE_CHANGELOG_ROOT = "https://dl.dropbox.com/u/44760587/forestry/changelog/";
public static EnumUpdateState currentVersion = EnumUpdateState.CURRENT;
@@ -63,8 +63,7 @@ public class Version {
File versionFile = new File(Forestry.instance.getConfigFolder(), Config.CATEGORY_COMMON + ".cfg");
Configuration config = new Configuration(versionFile);
Property property = config.get("version", "seen", VERSION);
- property.comment =
- "indicates the last version the user has been informed about and will suppress further notices on it.";
+ property.comment = "indicates the last version the user has been informed about and will suppress further notices on it.";
String seenVersion = property.getString();
if (recommendedVersion == null || recommendedVersion.equals(seenVersion)) {
@@ -112,25 +111,32 @@ public class Version {
return;
}
- int result = FMLCommonHandler.instance()
- .findContainerFor(Forestry.instance)
- .getProcessedVersion()
+ int result = FMLCommonHandler.instance().findContainerFor(Forestry.instance).getProcessedVersion()
.compareTo(new DefaultArtifactVersion(recommendedVersion));
if (result >= 0) {
- Log.finer("Using the latest version [" + VERSION + " (build:" + BUILD_NUMBER + ")] for Minecraft "
- + mcVersion);
+ Log.finer(
+ "Using the latest version [" + VERSION
+ + " (build:"
+ + BUILD_NUMBER
+ + ")] for Minecraft "
+ + mcVersion);
currentVersion = EnumUpdateState.CURRENT;
return;
}
cachedChangelog = grabChangelog(recommendedVersion);
- Log.warning("Using outdated version [" + VERSION + " (build:" + BUILD_NUMBER + ")] for Minecraft "
- + mcVersion + ". Consider updating.");
+ Log.warning(
+ "Using outdated version [" + VERSION
+ + " (build:"
+ + BUILD_NUMBER
+ + ")] for Minecraft "
+ + mcVersion
+ + ". Consider updating.");
currentVersion = EnumUpdateState.OUTDATED;
} catch (Exception e) {
- // e.printStackTrace();
+ // e.printStackTrace();
Log.warning("Unable to read from remote version authority.");
currentVersion = EnumUpdateState.CONNECTION_ERROR;
}
@@ -178,10 +184,10 @@ public class Version {
return changelog.toArray(new String[changelog.size()]);
} catch (Exception ex) {
- // ex.printStackTrace();
+ // ex.printStackTrace();
Log.warning("Unable to read changelog from remote site.");
}
- return new String[] {String.format("Unable to retrieve changelog for %s %s", Constants.MOD, version)};
+ return new String[] { String.format("Unable to retrieve changelog for %s %s", Constants.MOD, version) };
}
}
diff --git a/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java b/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java
index 07c3ddc0c..91de52e33 100644
--- a/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java
+++ b/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.entities;
@@ -71,16 +69,14 @@ public class EntityFXColoredDropParticle extends EntityFX {
this.motionZ *= 0.699999988079071D;
}
- Material material = this.worldObj
- .getBlock(
- MathHelper.floor_double(this.posX),
- MathHelper.floor_double(this.posY),
- MathHelper.floor_double(this.posZ))
- .getMaterial();
+ Material material = this.worldObj.getBlock(
+ MathHelper.floor_double(this.posX),
+ MathHelper.floor_double(this.posY),
+ MathHelper.floor_double(this.posZ)).getMaterial();
if (material.isLiquid() || material.isSolid()) {
- double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1)
- - BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(
+ double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - BlockLiquid.getLiquidHeightPercent(
+ this.worldObj.getBlockMetadata(
MathHelper.floor_double(this.posX),
MathHelper.floor_double(this.posY),
MathHelper.floor_double(this.posZ))));
diff --git a/src/main/java/forestry/core/entities/EntityFXHoneydust.java b/src/main/java/forestry/core/entities/EntityFXHoneydust.java
index 44ad33be5..8e55c2f2b 100644
--- a/src/main/java/forestry/core/entities/EntityFXHoneydust.java
+++ b/src/main/java/forestry/core/entities/EntityFXHoneydust.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.entities;
diff --git a/src/main/java/forestry/core/entities/EntityFXIgnition.java b/src/main/java/forestry/core/entities/EntityFXIgnition.java
index d2668681d..5bd8c59ce 100644
--- a/src/main/java/forestry/core/entities/EntityFXIgnition.java
+++ b/src/main/java/forestry/core/entities/EntityFXIgnition.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.entities;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
@SideOnly(Side.CLIENT)
public class EntityFXIgnition extends EntityFX {
+
private final float ignitionParticleScale;
public EntityFXIgnition(World world, double x, double y, double z) {
@@ -48,14 +48,8 @@ public class EntityFXIgnition extends EntityFX {
return 1.0F;
}
- public void renderParticle(
- Tessellator p_70539_1_,
- float p_70539_2_,
- float p_70539_3_,
- float p_70539_4_,
- float p_70539_5_,
- float p_70539_6_,
- float p_70539_7_) {
+ public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_,
+ float p_70539_5_, float p_70539_6_, float p_70539_7_) {
float f6 = ((float) this.particleAge + p_70539_2_) / (float) this.particleMaxAge;
this.particleScale = this.ignitionParticleScale * (1.0F - f6 * f6);
super.renderParticle(p_70539_1_, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_);
@@ -76,8 +70,8 @@ public class EntityFXIgnition extends EntityFX {
float f = (float) this.particleAge / (float) this.particleMaxAge;
if (this.rand.nextFloat() > (f * 2)) {
- this.worldObj.spawnParticle(
- "smoke", this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ);
+ this.worldObj
+ .spawnParticle("smoke", this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ);
}
this.motionY -= 0.03D;
diff --git a/src/main/java/forestry/core/entities/EntityFXSnow.java b/src/main/java/forestry/core/entities/EntityFXSnow.java
index c1b7b086a..30d4a0433 100644
--- a/src/main/java/forestry/core/entities/EntityFXSnow.java
+++ b/src/main/java/forestry/core/entities/EntityFXSnow.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.entities;
@@ -38,14 +36,8 @@ public class EntityFXSnow extends EntityFX {
}
@Override
- public void renderParticle(
- Tessellator tess,
- float timeStep,
- float rotationX,
- float rotationXZ,
- float rotationZ,
- float rotationYZ,
- float rotationXY) {
+ public void renderParticle(Tessellator tess, float timeStep, float rotationX, float rotationXZ, float rotationZ,
+ float rotationYZ, float rotationXY) {
double x = (this.prevPosX + (this.posX - this.prevPosX) * timeStep - interpPosX);
double y = (this.prevPosY + (this.posY - this.prevPosY) * timeStep - interpPosY);
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * timeStep - interpPosZ);
@@ -84,21 +76,9 @@ public class EntityFXSnow extends EntityFX {
}
}
- private static void renderParticle(
- Tessellator tess,
- double x,
- double y,
- double z,
- float rotationX,
- float rotationXZ,
- float rotationZ,
- float rotationYZ,
- float rotationXY,
- float minU,
- float maxU,
- float minV,
- float maxV,
- float scale) {
+ private static void renderParticle(Tessellator tess, double x, double y, double z, float rotationX,
+ float rotationXZ, float rotationZ, float rotationYZ, float rotationXY, float minU, float maxU, float minV,
+ float maxV, float scale) {
tess.addVertexWithUV(
(x - rotationX * scale - rotationYZ * scale),
(y - rotationXZ * scale),
diff --git a/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java b/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java
index a74f94ce9..43a0c89b6 100644
--- a/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java
+++ b/src/main/java/forestry/core/entities/EntityMinecartContainerForestry.java
@@ -1,18 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.entities;
-import forestry.core.inventory.IInventoryAdapter;
-import forestry.core.tiles.IFilterSlotDelegate;
-import forestry.core.utils.InventoryUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ISidedInventory;
@@ -20,8 +15,13 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
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
* dimensions) it preserves its contents.
diff --git a/src/main/java/forestry/core/entities/EntityMinecartForestry.java b/src/main/java/forestry/core/entities/EntityMinecartForestry.java
index 523711d32..5d8d8431b 100644
--- a/src/main/java/forestry/core/entities/EntityMinecartForestry.java
+++ b/src/main/java/forestry/core/entities/EntityMinecartForestry.java
@@ -1,24 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.entities;
-import com.mojang.authlib.GameProfile;
-import forestry.core.access.AccessHandler;
-import forestry.core.access.EnumAccess;
-import forestry.core.access.IAccessHandler;
-import forestry.core.access.IRestrictedAccess;
-import forestry.core.gui.GuiHandler;
-import forestry.core.gui.IGuiHandlerEntity;
-import forestry.core.gui.IHintSource;
-import forestry.core.tiles.ITitled;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.player.EntityPlayer;
@@ -30,8 +19,20 @@ import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.minecart.MinecartInteractEvent;
+import com.mojang.authlib.GameProfile;
+
+import forestry.core.access.AccessHandler;
+import forestry.core.access.EnumAccess;
+import forestry.core.access.IAccessHandler;
+import forestry.core.access.IRestrictedAccess;
+import forestry.core.gui.GuiHandler;
+import forestry.core.gui.IGuiHandlerEntity;
+import forestry.core.gui.IHintSource;
+import forestry.core.tiles.ITitled;
+
public abstract class EntityMinecartForestry extends EntityMinecart
implements ITitled, IRestrictedAccess, IHintSource, IGuiHandlerEntity {
+
private final AccessHandler accessHandler = new AccessHandler(this);
@SuppressWarnings("unused")
diff --git a/src/main/java/forestry/core/entities/EntitySelector.java b/src/main/java/forestry/core/entities/EntitySelector.java
index f529995bc..a170086a1 100644
--- a/src/main/java/forestry/core/entities/EntitySelector.java
+++ b/src/main/java/forestry/core/entities/EntitySelector.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.entities;
@@ -14,6 +12,7 @@ import net.minecraft.command.IEntitySelector;
import net.minecraft.entity.Entity;
public abstract class EntitySelector implements IEntitySelector {
+
private final Class entityClass;
protected EntitySelector(Class entityClass) {
diff --git a/src/main/java/forestry/core/errors/EnumErrorCode.java b/src/main/java/forestry/core/errors/EnumErrorCode.java
index 6c129842a..b4bf0c682 100644
--- a/src/main/java/forestry/core/errors/EnumErrorCode.java
+++ b/src/main/java/forestry/core/errors/EnumErrorCode.java
@@ -5,15 +5,17 @@
******************************************************************************/
package forestry.core.errors;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.util.IIcon;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.ForestryAPI;
import forestry.api.core.IErrorState;
import forestry.core.config.Constants;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
public enum EnumErrorCode implements IErrorState {
+
@Deprecated
UNKNOWN("unknown"), // Congratulations, you found a glitch.
@Deprecated
@@ -26,14 +28,12 @@ public enum EnumErrorCode implements IErrorState {
// Bees
TOO_HOT("tooHot"), // The bees are melting in the heat here and unable to work. Use the habitat locator to find a
// cooler climate.
- TOO_COLD("tooCold"), // The bees are huddled together to survive the freezing cold here. Use the habitat locator to
+ TOO_COLD("tooCold"), // The bees are huddled together to survive the freezing cold here. Use the habitat locator to
// find a warmer climate.
- TOO_HUMID(
- "tooHumid"), // The damp climate here has made the bees' wings too damp to fly. Use the habitat locator to
+ TOO_HUMID("tooHumid"), // The damp climate here has made the bees' wings too damp to fly. Use the habitat locator to
// find a dryer climate.
- TOO_ARID(
- "tooArid",
- "invalidBiome"), // The dry climate here has made the bees parched and unable do work. Use the habitat
+ TOO_ARID("tooArid", "invalidBiome"), // The dry climate here has made the bees parched and unable do work. Use the
+ // habitat
// locator to find a wetter climate.
IS_RAINING("isRaining"), // Only tolerant fliers can work in the rain.
NOT_GLOOMY("notGloomy"), // The bees can only work in darkness.
@@ -48,9 +48,8 @@ public enum EnumErrorCode implements IErrorState {
// Machines
NO_RESOURCE("noResource"), // More resources need to be supplied for operation.
- NO_RESOURCE_INVENTORY(
- "noResourceInventory",
- "noResource"), // Resources need to be added to the machine's inventory to craft this recipe.
+ NO_RESOURCE_INVENTORY("noResourceInventory", "noResource"), // Resources need to be added to the machine's inventory
+ // to craft this recipe.
NO_RESOURCE_LIQUID("noResourceLiquid", "noLiquid"), // More liquid resources need to be supplied for operation.
NO_RECIPE("noRecipe"), // No matching recipe was found for the supplied resources.
NO_SPACE_INVENTORY("noSpace"), // Empty this machine's inventory.
@@ -98,8 +97,8 @@ public enum EnumErrorCode implements IErrorState {
NO_FERTILIZER("noFertilizer"), // Farms require fertilizer for function. Compost is insufficient.
NO_FARMLAND("noFarmland"), // Smooth sandstone, bricks or stone bricks create a platform the farm will build on.
NO_LIQUID_FARM("noLiquid") // Depending on rainfall, temperature and humidity farms need to be supplied with varying
-// amounts of water.
-;
+ // amounts of water.
+ ;
private final String name;
private final String iconName;
diff --git a/src/main/java/forestry/core/errors/ErrorLogic.java b/src/main/java/forestry/core/errors/ErrorLogic.java
index 3106eef93..a08600b3a 100644
--- a/src/main/java/forestry/core/errors/ErrorLogic.java
+++ b/src/main/java/forestry/core/errors/ErrorLogic.java
@@ -1,26 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.errors;
-import com.google.common.collect.ImmutableSet;
-import forestry.api.core.ForestryAPI;
-import forestry.api.core.IErrorLogic;
-import forestry.api.core.IErrorState;
import java.io.DataInputStream;
import java.io.DataOutputStream;
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;
+
public class ErrorLogic implements IErrorLogic {
+
private final Set errorStates = new HashSet<>();
@Override
diff --git a/src/main/java/forestry/core/errors/ErrorStateRegistry.java b/src/main/java/forestry/core/errors/ErrorStateRegistry.java
index 6fe5726f6..87e8ef3b6 100644
--- a/src/main/java/forestry/core/errors/ErrorStateRegistry.java
+++ b/src/main/java/forestry/core/errors/ErrorStateRegistry.java
@@ -1,27 +1,28 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.errors;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.IErrorLogic;
import forestry.api.core.IErrorState;
import forestry.api.core.IErrorStateRegistry;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import net.minecraft.client.renderer.texture.IIconRegister;
/**
*
@@ -31,8 +32,7 @@ public class ErrorStateRegistry implements IErrorStateRegistry {
private static final BiMap states = HashBiMap.create();
private static final Map stateNames = new HashMap<>();
- private static final Set stateView =
- Collections.unmodifiableSet(states.inverse().keySet());
+ private static final Set stateView = Collections.unmodifiableSet(states.inverse().keySet());
@Override
public void registerErrorState(IErrorState state) {
diff --git a/src/main/java/forestry/core/errors/FakeErrorLogic.java b/src/main/java/forestry/core/errors/FakeErrorLogic.java
index eabaa5923..cd18d2132 100644
--- a/src/main/java/forestry/core/errors/FakeErrorLogic.java
+++ b/src/main/java/forestry/core/errors/FakeErrorLogic.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.errors;
-import com.google.common.collect.ImmutableSet;
-import forestry.api.core.IErrorLogic;
-import forestry.api.core.IErrorState;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
+import com.google.common.collect.ImmutableSet;
+
+import forestry.api.core.IErrorLogic;
+import forestry.api.core.IErrorState;
+
public class FakeErrorLogic implements IErrorLogic {
public static final FakeErrorLogic instance = new FakeErrorLogic();
diff --git a/src/main/java/forestry/core/errors/FakeErrorSource.java b/src/main/java/forestry/core/errors/FakeErrorSource.java
index 95f56b2c1..ef23ae1c3 100644
--- a/src/main/java/forestry/core/errors/FakeErrorSource.java
+++ b/src/main/java/forestry/core/errors/FakeErrorSource.java
@@ -1,20 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.errors;
import com.google.common.collect.ImmutableSet;
+
import forestry.api.core.IErrorSource;
import forestry.api.core.IErrorState;
public class FakeErrorSource implements IErrorSource {
+
public static final FakeErrorSource instance = new FakeErrorSource();
private FakeErrorSource() {}
diff --git a/src/main/java/forestry/core/fluids/BlockForestryFluid.java b/src/main/java/forestry/core/fluids/BlockForestryFluid.java
index 8d2028629..ed4e83086 100644
--- a/src/main/java/forestry/core/fluids/BlockForestryFluid.java
+++ b/src/main/java/forestry/core/fluids/BlockForestryFluid.java
@@ -1,25 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
-import cpw.mods.fml.client.FMLClientHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.core.config.Constants;
-import forestry.core.entities.EntityFXColoredDropParticle;
-import forestry.core.render.TextureManager;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
@@ -37,6 +30,13 @@ import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.core.config.Constants;
+import forestry.core.entities.EntityFXColoredDropParticle;
+import forestry.core.render.TextureManager;
+
public class BlockForestryFluid extends BlockFluidClassic {
private final boolean flammable;
@@ -102,8 +102,9 @@ public class BlockForestryFluid extends BlockFluidClassic {
@SideOnly(Side.CLIENT)
private boolean flowTextureExists() {
try {
- ResourceLocation resourceLocation =
- new ResourceLocation(Constants.ID, "textures/blocks/liquid/" + fluidName + "_flow.png");
+ ResourceLocation resourceLocation = new ResourceLocation(
+ Constants.ID,
+ "textures/blocks/liquid/" + fluidName + "_flow.png");
IResourceManager resourceManager = Minecraft.getMinecraft().getResourceManager();
return resourceManager.getResource(resourceLocation) != null;
} catch (java.lang.Exception e) {
@@ -114,15 +115,20 @@ public class BlockForestryFluid extends BlockFluidClassic {
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
- if (rand.nextInt(10) == 0
- && World.doesBlockHaveSolidTopSurface(world, x, y - 1, z)
+ if (rand.nextInt(10) == 0 && World.doesBlockHaveSolidTopSurface(world, x, y - 1, z)
&& !world.getBlock(x, y - 2, z).getMaterial().blocksMovement()) {
double px = (double) ((float) x + rand.nextFloat());
double py = (double) y - 1.05D;
double pz = (double) ((float) z + rand.nextFloat());
EntityFX fx = new EntityFXColoredDropParticle(
- world, px, py, pz, color.getRed(), color.getGreen(), color.getBlue());
+ world,
+ px,
+ py,
+ pz,
+ color.getRed(),
+ color.getGreen(),
+ color.getBlue());
FMLClientHandler.instance().getClient().effectRenderer.addEffect(fx);
}
}
@@ -234,8 +240,7 @@ public class BlockForestryFluid extends BlockFluidClassic {
}
private static boolean isNeighborFlammable(World world, int x, int y, int z) {
- return isFlammable(world, x - 1, y, z)
- || isFlammable(world, x + 1, y, z)
+ return isFlammable(world, x - 1, y, z) || isFlammable(world, x + 1, y, z)
|| isFlammable(world, x, y, z - 1)
|| isFlammable(world, x, y, z + 1)
|| isFlammable(world, x, y - 1, z)
diff --git a/src/main/java/forestry/core/fluids/FakeTankManager.java b/src/main/java/forestry/core/fluids/FakeTankManager.java
index 51b769aaf..8ee2a0367 100644
--- a/src/main/java/forestry/core/fluids/FakeTankManager.java
+++ b/src/main/java/forestry/core/fluids/FakeTankManager.java
@@ -1,17 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
-import forestry.core.fluids.tanks.FakeTank;
import java.util.List;
+
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
@@ -21,7 +19,10 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidTank;
+import forestry.core.fluids.tanks.FakeTank;
+
public class FakeTankManager implements ITankManager {
+
public static final FakeTankManager instance = new FakeTankManager();
private FakeTankManager() {}
diff --git a/src/main/java/forestry/core/fluids/FakeTankUpdateHandler.java b/src/main/java/forestry/core/fluids/FakeTankUpdateHandler.java
index cc196d5fa..ff9d308fd 100644
--- a/src/main/java/forestry/core/fluids/FakeTankUpdateHandler.java
+++ b/src/main/java/forestry/core/fluids/FakeTankUpdateHandler.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
diff --git a/src/main/java/forestry/core/fluids/FluidHelper.java b/src/main/java/forestry/core/fluids/FluidHelper.java
index 99b16aa91..0432ce37d 100644
--- a/src/main/java/forestry/core/fluids/FluidHelper.java
+++ b/src/main/java/forestry/core/fluids/FluidHelper.java
@@ -1,21 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
-import forestry.core.config.Constants;
-import forestry.core.utils.InventoryUtil;
-import forestry.core.utils.ItemStackUtil;
-import forestry.plugins.PluginFluids;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
@@ -28,6 +23,11 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem;
import net.minecraftforge.fluids.IFluidHandler;
+import forestry.core.config.Constants;
+import forestry.core.utils.InventoryUtil;
+import forestry.core.utils.ItemStackUtil;
+import forestry.plugins.PluginFluids;
+
/**
* @author CovertJaguar
*/
@@ -35,8 +35,8 @@ public final class FluidHelper {
private FluidHelper() {}
- public static boolean handleRightClick(
- IFluidHandler tank, ForgeDirection side, EntityPlayer player, boolean fill, boolean drain) {
+ public static boolean handleRightClick(IFluidHandler tank, ForgeDirection side, EntityPlayer player, boolean fill,
+ boolean drain) {
if (player == null) {
return false;
}
@@ -87,11 +87,13 @@ public final class FluidHelper {
return false;
}
player.inventory.setInventorySlotContents(
- player.inventory.currentItem, InventoryUtil.depleteItem(current));
+ player.inventory.currentItem,
+ InventoryUtil.depleteItem(current));
player.inventory.markDirty();
} else {
player.inventory.setInventorySlotContents(
- player.inventory.currentItem, InventoryUtil.depleteItem(current));
+ player.inventory.currentItem,
+ InventoryUtil.depleteItem(current));
player.inventory.setInventorySlotContents(player.inventory.currentItem, filled);
player.inventory.markDirty();
}
@@ -120,18 +122,13 @@ public final class FluidHelper {
NO_SPACE
}
- public static FillStatus fillContainers(
- IFluidHandler fluidHandler, IInventory inv, int inputSlot, int outputSlot, Fluid fluidToFill) {
+ public static FillStatus fillContainers(IFluidHandler fluidHandler, IInventory inv, int inputSlot, int outputSlot,
+ Fluid fluidToFill) {
return fillContainers(fluidHandler, inv, inputSlot, outputSlot, fluidToFill, true);
}
- public static FillStatus fillContainers(
- IFluidHandler fluidHandler,
- IInventory inv,
- int inputSlot,
- int outputSlot,
- Fluid fluidToFill,
- boolean doFill) {
+ public static FillStatus fillContainers(IFluidHandler fluidHandler, IInventory inv, int inputSlot, int outputSlot,
+ Fluid fluidToFill, boolean doFill) {
if (fluidToFill == null) {
return FillStatus.INVALID_INPUT;
}
@@ -152,8 +149,8 @@ public final class FluidHelper {
fillAmount = Math.min(Constants.BUCKET_VOLUME, containerCapacity);
}
- FluidStack canDrain =
- fluidHandler.drain(ForgeDirection.UNKNOWN, new FluidStack(fluidToFill, fillAmount), false);
+ FluidStack canDrain = fluidHandler
+ .drain(ForgeDirection.UNKNOWN, new FluidStack(fluidToFill, fillAmount), false);
if (canDrain == null || canDrain.amount == 0) {
return FillStatus.NO_FLUID;
}
@@ -229,8 +226,7 @@ public final class FluidHelper {
// consume forestry containers if there is only one slot
if (outputSlot == inputSlot && drainedItem != null) {
Item item = drainedItem.getItem();
- if (PluginFluids.items.canEmpty == item
- || PluginFluids.items.waxCapsuleEmpty == item
+ if (PluginFluids.items.canEmpty == item || PluginFluids.items.waxCapsuleEmpty == item
|| PluginFluids.items.refractoryEmpty == item) {
drainedItem = null;
}
@@ -258,8 +254,8 @@ public final class FluidHelper {
return true;
}
- private static boolean hasRoomForDrainedContainer(
- ItemStack input, ItemStack output, ItemStack drainedItem, int inputSlot, int outputSlot) {
+ private static boolean hasRoomForDrainedContainer(ItemStack input, ItemStack output, ItemStack drainedItem,
+ int inputSlot, int outputSlot) {
if (output == null || drainedItem == null) {
return true;
}
@@ -424,8 +420,8 @@ public final class FluidHelper {
if (fluid == null) {
return FluidContainerRegistry.getContainerCapacity(container);
} else {
- return FluidContainerRegistry.getContainerCapacity(
- new FluidStack(fluid, Constants.BUCKET_VOLUME), container);
+ return FluidContainerRegistry
+ .getContainerCapacity(new FluidStack(fluid, Constants.BUCKET_VOLUME), container);
}
}
}
diff --git a/src/main/java/forestry/core/fluids/Fluids.java b/src/main/java/forestry/core/fluids/Fluids.java
index 51b74f656..83e223b90 100644
--- a/src/main/java/forestry/core/fluids/Fluids.java
+++ b/src/main/java/forestry/core/fluids/Fluids.java
@@ -1,18 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
-import forestry.core.config.Constants;
-import forestry.core.items.EnumContainerType;
-import forestry.core.items.ItemLiquidContainer;
import java.awt.Color;
import java.util.Collections;
import java.util.EnumSet;
@@ -20,17 +15,26 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+
import javax.annotation.Nonnull;
+
import net.minecraft.block.Block;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
+
import org.apache.commons.lang3.text.WordUtils;
+import forestry.core.config.Constants;
+import forestry.core.items.EnumContainerType;
+import forestry.core.items.ItemLiquidContainer;
+
public enum Fluids {
+
ETHANOL(new Color(255, 111, 0), 790, 1000) {
+
@Override
public String getTag() {
return "bioethanol";
@@ -51,6 +55,7 @@ public enum Fluids {
}
},
BIOMASS(new Color(100, 132, 41), 400, 6560) {
+
@Override
public Block makeBlock() {
return new BlockForestryFluid(this, 100, true);
@@ -66,6 +71,7 @@ public enum Fluids {
}
},
GLASS(new Color(164, 164, 164), 2400, 10000) {
+
@Override
public int getTemperature() {
return 1200;
@@ -82,6 +88,7 @@ public enum Fluids {
}
},
HONEY(new Color(255, 196, 35), 1420, 73600) {
+
@Override
public String getTag() {
return "for.honey";
@@ -109,12 +116,14 @@ public enum Fluids {
}
},
LEGACY_HONEY(new Color(255, 196, 35)) {
+
@Override
public String getTag() {
return "honey";
}
},
ICE(new Color(175, 242, 255), 920, 1000) {
+
@Override
public int getTemperature() {
return 265;
@@ -135,6 +144,7 @@ public enum Fluids {
}
},
JUICE(new Color(168, 201, 114)) {
+
@Override
public Block makeBlock() {
return new BlockForestryFluid(this);
@@ -157,6 +167,7 @@ public enum Fluids {
}
},
MILK(new Color(255, 255, 255), 1030, 3000) {
+
@Override
public Block makeBlock() {
return new BlockForestryFluid(this);
@@ -168,6 +179,7 @@ public enum Fluids {
}
},
SEEDOIL("SeedOil", new Color(255, 255, 168), 885, 5000) {
+
@Override
public Block makeBlock() {
return new BlockForestryFluid(this, 2, true);
@@ -183,6 +195,7 @@ public enum Fluids {
}
},
SHORT_MEAD("ShortMead", new Color(239, 154, 56), 1000, 1200) {
+
@Override
public String getTag() {
return "short.mead";
@@ -203,6 +216,7 @@ public enum Fluids {
}
},
MEAD("Mead", new Color(202, 102, 0), 1000, 1200) {
+
@Override
public String getTag() {
return "mead";
@@ -224,12 +238,14 @@ public enum Fluids {
},
// Vanilla
WATER(new Color(0x2432ec)) {
+
@Override
public EnumSet getContainerTypes() {
return EnumSet.of(EnumContainerType.CAN, EnumContainerType.CAPSULE, EnumContainerType.REFRACTORY);
}
},
LAVA(new Color(0xfd461f)) {
+
@Override
public EnumSet getContainerTypes() {
return EnumSet.of(EnumContainerType.CAN, EnumContainerType.REFRACTORY);
@@ -237,12 +253,14 @@ public enum Fluids {
},
// BuildCraft
FUEL(new Color(0xffff00)) {
+
@Override
public EnumSet getContainerTypes() {
return EnumSet.of(EnumContainerType.CAN, EnumContainerType.CAPSULE, EnumContainerType.REFRACTORY);
}
},
OIL(new Color(0x404040)) {
+
@Override
public EnumSet getContainerTypes() {
return EnumSet.of(EnumContainerType.CAN, EnumContainerType.CAPSULE, EnumContainerType.REFRACTORY);
@@ -252,9 +270,8 @@ public enum Fluids {
CREOSOTE(new Color(0x635c03)),
STEAM(new Color(0x91938F));
- public static final Fluids[] forestryFluids = {
- ETHANOL, BIOMASS, GLASS, HONEY, LEGACY_HONEY, ICE, JUICE, MILK, SEEDOIL, SHORT_MEAD, MEAD
- };
+ public static final Fluids[] forestryFluids = { ETHANOL, BIOMASS, GLASS, HONEY, LEGACY_HONEY, ICE, JUICE, MILK,
+ SEEDOIL, SHORT_MEAD, MEAD };
private static final Map tagToFluid = new HashMap<>();
diff --git a/src/main/java/forestry/core/fluids/ITankManager.java b/src/main/java/forestry/core/fluids/ITankManager.java
index 220ae2376..e2540bc4c 100644
--- a/src/main/java/forestry/core/fluids/ITankManager.java
+++ b/src/main/java/forestry/core/fluids/ITankManager.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
import java.util.List;
+
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
@@ -19,6 +18,7 @@ import net.minecraftforge.fluids.IFluidHandler;
import net.minecraftforge.fluids.IFluidTank;
public interface ITankManager extends IFluidHandler {
+
void containerAdded(Container container, ICrafting player);
void updateGuiData(Container container, List crafters);
diff --git a/src/main/java/forestry/core/fluids/ITankUpdateHandler.java b/src/main/java/forestry/core/fluids/ITankUpdateHandler.java
index 4abcc3cc0..33561e50c 100644
--- a/src/main/java/forestry/core/fluids/ITankUpdateHandler.java
+++ b/src/main/java/forestry/core/fluids/ITankUpdateHandler.java
@@ -1,17 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
import forestry.core.fluids.tanks.StandardTank;
public interface ITankUpdateHandler {
+
void updateTankLevels(StandardTank tank);
}
diff --git a/src/main/java/forestry/core/fluids/LiquidRegistryHelper.java b/src/main/java/forestry/core/fluids/LiquidRegistryHelper.java
index 90f0e9e21..04523ac8c 100644
--- a/src/main/java/forestry/core/fluids/LiquidRegistryHelper.java
+++ b/src/main/java/forestry/core/fluids/LiquidRegistryHelper.java
@@ -1,21 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
-import forestry.core.config.Constants;
-import forestry.core.items.EnumContainerType;
-import forestry.core.items.ItemLiquidContainer;
-import forestry.core.utils.Log;
-import forestry.plugins.PluginFluids;
import java.util.EnumMap;
+
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBucket;
@@ -24,10 +18,16 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
import net.minecraftforge.fluids.FluidStack;
+import forestry.core.config.Constants;
+import forestry.core.items.EnumContainerType;
+import forestry.core.items.ItemLiquidContainer;
+import forestry.core.utils.Log;
+import forestry.plugins.PluginFluids;
+
public class LiquidRegistryHelper {
- private static final EnumMap emptyContainers =
- new EnumMap<>(EnumContainerType.class);
+ private static final EnumMap emptyContainers = new EnumMap<>(
+ EnumContainerType.class);
static {
emptyContainers.put(EnumContainerType.CAN, PluginFluids.items.canEmpty);
diff --git a/src/main/java/forestry/core/fluids/PipetteContents.java b/src/main/java/forestry/core/fluids/PipetteContents.java
index d747ea7d8..e658ed526 100644
--- a/src/main/java/forestry/core/fluids/PipetteContents.java
+++ b/src/main/java/forestry/core/fluids/PipetteContents.java
@@ -1,21 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
-import forestry.api.core.INBTTagable;
import java.util.List;
+
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
+import forestry.api.core.INBTTagable;
+
public class PipetteContents implements INBTTagable {
+
private FluidStack contents;
public PipetteContents(NBTTagCompound nbttagcompound) {
diff --git a/src/main/java/forestry/core/fluids/TankManager.java b/src/main/java/forestry/core/fluids/TankManager.java
index 65e8905ac..d8431b9af 100644
--- a/src/main/java/forestry/core/fluids/TankManager.java
+++ b/src/main/java/forestry/core/fluids/TankManager.java
@@ -1,17 +1,36 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.ICrafting;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidTank;
+
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
+
import forestry.api.core.INBTTagable;
import forestry.core.fluids.tanks.FakeTank;
import forestry.core.fluids.tanks.StandardTank;
@@ -26,23 +45,6 @@ import forestry.core.tiles.ILiquidTankTile;
import forestry.core.tiles.IRenderableTile;
import forestry.core.utils.NBTUtil;
import forestry.core.utils.NBTUtil.NBTList;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import javax.annotation.Nonnull;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-import net.minecraftforge.fluids.IFluidTank;
/**
* @author CovertJaguar
diff --git a/src/main/java/forestry/core/fluids/tanks/FakeTank.java b/src/main/java/forestry/core/fluids/tanks/FakeTank.java
index 6afc442ae..9f844a455 100644
--- a/src/main/java/forestry/core/fluids/tanks/FakeTank.java
+++ b/src/main/java/forestry/core/fluids/tanks/FakeTank.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids.tanks;
@@ -19,8 +17,8 @@ import net.minecraftforge.fluids.FluidTankInfo;
public final class FakeTank extends StandardTank {
public static final FakeTank INSTANCE = new FakeTank();
- public static final FakeTank[] ARRAY = new FakeTank[] {INSTANCE};
- public static final FluidTankInfo[] INFO = new FluidTankInfo[] {INSTANCE.getInfo()};
+ public static final FakeTank[] ARRAY = new FakeTank[] { INSTANCE };
+ public static final FluidTankInfo[] INFO = new FluidTankInfo[] { INSTANCE.getInfo() };
private FakeTank() {
super(1);
diff --git a/src/main/java/forestry/core/fluids/tanks/FilteredTank.java b/src/main/java/forestry/core/fluids/tanks/FilteredTank.java
index dd163a31f..28142b54b 100644
--- a/src/main/java/forestry/core/fluids/tanks/FilteredTank.java
+++ b/src/main/java/forestry/core/fluids/tanks/FilteredTank.java
@@ -1,22 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids.tanks;
-import forestry.core.gui.tooltips.ToolTipLine;
-import forestry.core.proxy.Proxies;
-import forestry.core.utils.StringUtil;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
+
import net.minecraft.item.EnumRarity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
@@ -24,6 +20,10 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
+import forestry.core.gui.tooltips.ToolTipLine;
+import forestry.core.proxy.Proxies;
+import forestry.core.utils.StringUtil;
+
/**
* @author CovertJaguar
*/
@@ -87,8 +87,10 @@ public class FilteredTank extends StandardTank {
rarity = EnumRarity.common;
}
FluidStack filterFluidStack = FluidRegistry.getFluidStack(fluidFilter.getName(), 0);
- ToolTipLine name =
- new ToolTipLine(fluidFilter.getLocalizedName(filterFluidStack), rarity.rarityColor, 2);
+ ToolTipLine name = new ToolTipLine(
+ fluidFilter.getLocalizedName(filterFluidStack),
+ rarity.rarityColor,
+ 2);
toolTip.add(name);
}
} else {
diff --git a/src/main/java/forestry/core/fluids/tanks/StandardTank.java b/src/main/java/forestry/core/fluids/tanks/StandardTank.java
index 49267ecbb..60fac6038 100644
--- a/src/main/java/forestry/core/fluids/tanks/StandardTank.java
+++ b/src/main/java/forestry/core/fluids/tanks/StandardTank.java
@@ -1,15 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.fluids.tanks;
+import java.io.IOException;
+import java.util.Locale;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.item.EnumRarity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTank;
+
import forestry.core.fluids.FakeTankUpdateHandler;
import forestry.core.fluids.FluidHelper;
import forestry.core.fluids.ITankUpdateHandler;
@@ -19,19 +28,12 @@ import forestry.core.gui.tooltips.ToolTipLine;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.IStreamable;
-import java.io.IOException;
-import java.util.Locale;
-import javax.annotation.Nonnull;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTank;
/**
* @author CovertJaguar
*/
public class StandardTank extends FluidTank implements IStreamable {
+
// defines how the tank responds to IFluidHandler requests
public enum TankMode {
DEFAULT,
@@ -213,6 +215,7 @@ public class StandardTank extends FluidTank implements IStreamable {
}
protected final ToolTip toolTip = new ToolTip() {
+
@Override
public void refresh() {
refreshTooltip();
diff --git a/src/main/java/forestry/core/genetics/Branch.java b/src/main/java/forestry/core/genetics/Branch.java
index 57f186012..562f530f9 100755
--- a/src/main/java/forestry/core/genetics/Branch.java
+++ b/src/main/java/forestry/core/genetics/Branch.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
diff --git a/src/main/java/forestry/core/genetics/BreedingTracker.java b/src/main/java/forestry/core/genetics/BreedingTracker.java
index c9500a7fe..b21aada2b 100755
--- a/src/main/java/forestry/core/genetics/BreedingTracker.java
+++ b/src/main/java/forestry/core/genetics/BreedingTracker.java
@@ -1,16 +1,32 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
+import java.lang.ref.WeakReference;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.annotation.Nullable;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraft.world.WorldSavedData;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.common.util.FakePlayer;
+
import com.mojang.authlib.GameProfile;
+
import forestry.api.core.ForestryEvent;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAlleleSpecies;
@@ -20,20 +36,6 @@ import forestry.api.genetics.IMutation;
import forestry.api.genetics.ISpeciesRoot;
import forestry.core.network.packets.PacketGenomeTrackerSync;
import forestry.core.proxy.Proxies;
-import java.lang.ref.WeakReference;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import javax.annotation.Nullable;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraft.world.WorldSavedData;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.common.util.FakePlayer;
public abstract class BreedingTracker extends WorldSavedData implements IBreedingTracker {
@@ -110,9 +112,7 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
}
}
- private void syncToPlayer(
- Collection discoveredSpecies,
- Collection discoveredMutations,
+ private void syncToPlayer(Collection discoveredSpecies, Collection discoveredMutations,
Collection researchedMutations) {
World world = this.world != null ? this.world.get() : null;
if (world != null && username != null && username.getName() != null) {
@@ -158,11 +158,8 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
writeToNBT(nbttagcompound, discoveredSpecies, discoveredMutations, researchedMutations);
}
- private void writeToNBT(
- NBTTagCompound nbtTagCompound,
- Collection discoveredSpecies,
- Collection discoveredMutations,
- Collection researchedMutations) {
+ private void writeToNBT(NBTTagCompound nbtTagCompound, Collection discoveredSpecies,
+ Collection discoveredMutations, Collection researchedMutations) {
if (modeName != null && !modeName.isEmpty()) {
nbtTagCompound.setString(MODE_NAME_KEY, modeName);
}
@@ -174,8 +171,8 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
writeValuesToNBT(nbtTagCompound, researchedMutations, RESEARCHED_COUNT_KEY, RESEARCHED_KEY);
}
- private static void readValuesFromNBT(
- NBTTagCompound nbttagcompound, Set values, String countKey, String key) {
+ private static void readValuesFromNBT(NBTTagCompound nbttagcompound, Set values, String countKey,
+ String key) {
if (nbttagcompound.hasKey(countKey)) {
final int count = nbttagcompound.getInteger(countKey);
for (int i = 0; i < count; i++) {
@@ -187,8 +184,8 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
}
}
- private static void writeValuesToNBT(
- NBTTagCompound nbttagcompound, Collection values, String countKey, String key) {
+ private static void writeValuesToNBT(NBTTagCompound nbttagcompound, Collection values, String countKey,
+ String key) {
final int count = values.size();
nbttagcompound.setInteger(countKey, count);
Iterator iterator = values.iterator();
diff --git a/src/main/java/forestry/core/genetics/Chromosome.java b/src/main/java/forestry/core/genetics/Chromosome.java
index d9ad9e25e..e9c9d5901 100755
--- a/src/main/java/forestry/core/genetics/Chromosome.java
+++ b/src/main/java/forestry/core/genetics/Chromosome.java
@@ -1,21 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
+import java.util.Random;
+
+import net.minecraft.nbt.NBTTagCompound;
+
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IChromosome;
import forestry.core.utils.Log;
-import java.util.Random;
-import net.minecraft.nbt.NBTTagCompound;
public class Chromosome implements IChromosome {
diff --git a/src/main/java/forestry/core/genetics/Classification.java b/src/main/java/forestry/core/genetics/Classification.java
index 14a5d0538..8cbb71ea9 100755
--- a/src/main/java/forestry/core/genetics/Classification.java
+++ b/src/main/java/forestry/core/genetics/Classification.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
+import java.util.ArrayList;
+import java.util.Locale;
+
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IClassification;
import forestry.core.utils.StringUtil;
-import java.util.ArrayList;
-import java.util.Locale;
public class Classification implements IClassification {
diff --git a/src/main/java/forestry/core/genetics/EffectData.java b/src/main/java/forestry/core/genetics/EffectData.java
index a30084588..0de6801a3 100755
--- a/src/main/java/forestry/core/genetics/EffectData.java
+++ b/src/main/java/forestry/core/genetics/EffectData.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
-import forestry.api.genetics.IEffectData;
import net.minecraft.nbt.NBTTagCompound;
+import forestry.api.genetics.IEffectData;
+
public class EffectData implements IEffectData {
private final int[] intData;
diff --git a/src/main/java/forestry/core/genetics/GenericRatings.java b/src/main/java/forestry/core/genetics/GenericRatings.java
index 1e9d7bd0e..763bbbccc 100755
--- a/src/main/java/forestry/core/genetics/GenericRatings.java
+++ b/src/main/java/forestry/core/genetics/GenericRatings.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
-import forestry.core.utils.StringUtil;
import net.minecraft.util.StatCollector;
+import forestry.core.utils.StringUtil;
+
public class GenericRatings {
public static String rateMetabolism(int metabolism) {
diff --git a/src/main/java/forestry/core/genetics/Genome.java b/src/main/java/forestry/core/genetics/Genome.java
index 0db34997a..3620b8376 100755
--- a/src/main/java/forestry/core/genetics/Genome.java
+++ b/src/main/java/forestry/core/genetics/Genome.java
@@ -1,16 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+
import com.google.common.base.Objects;
+
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleSpecies;
@@ -20,12 +27,6 @@ import forestry.api.genetics.IGenome;
import forestry.api.genetics.ISpeciesRoot;
import forestry.api.lepidopterology.EnumButterflyChromosome;
import forestry.core.config.Config;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
public abstract class Genome implements IGenome {
@@ -54,7 +55,8 @@ public abstract class Genome implements IGenome {
if (chromosomes == null || chromosomes.length != getDefaultTemplate().length) {
String message = String.format(
"Tried to create a genome for '%s' from an invalid chromosome template.\n%s",
- getSpeciesRoot().getUID(), chromosomesToString(chromosomes));
+ getSpeciesRoot().getUID(),
+ chromosomesToString(chromosomes));
throw new IllegalArgumentException(message);
}
@@ -70,7 +72,9 @@ public abstract class Genome implements IGenome {
String message = String.format(
"Tried to create a genome for '%s' from an invalid chromosome template. "
+ "Missing chromosome '%s'.\n%s",
- getSpeciesRoot().getUID(), chromosomeType.getName(), chromosomesToString(chromosomes));
+ getSpeciesRoot().getUID(),
+ chromosomeType.getName(),
+ chromosomesToString(chromosomes));
throw new IllegalArgumentException(message);
}
@@ -79,7 +83,9 @@ public abstract class Genome implements IGenome {
String message = String.format(
"Tried to create a genome for '%s' from an invalid chromosome template. "
+ "Missing primary allele for '%s'.\n%s",
- getSpeciesRoot().getUID(), chromosomeType.getName(), chromosomesToString(chromosomes));
+ getSpeciesRoot().getUID(),
+ chromosomeType.getName(),
+ chromosomesToString(chromosomes));
throw new IllegalArgumentException(message);
}
@@ -88,7 +94,9 @@ public abstract class Genome implements IGenome {
String message = String.format(
"Tried to create a genome for '%s' from an invalid chromosome template. "
+ "Missing secondary allele for '%s'.\n%s",
- getSpeciesRoot().getUID(), chromosomeType.getName(), chromosomesToString(chromosomes));
+ getSpeciesRoot().getUID(),
+ chromosomeType.getName(),
+ chromosomesToString(chromosomes));
throw new IllegalArgumentException(message);
}
@@ -97,7 +105,9 @@ public abstract class Genome implements IGenome {
String message = String.format(
"Tried to create a genome for '%s' from an invalid chromosome template. "
+ "Incorrect type for primary allele '%s'.\n%s.",
- getSpeciesRoot().getUID(), chromosomeType.getName(), chromosomesToString(chromosomes));
+ getSpeciesRoot().getUID(),
+ chromosomeType.getName(),
+ chromosomesToString(chromosomes));
throw new IllegalArgumentException(message);
}
@@ -105,7 +115,9 @@ public abstract class Genome implements IGenome {
String message = String.format(
"Tried to create a genome for '%s' from an invalid chromosome template. "
+ "Incorrect type for secondary allele '%s'.\n%s.",
- getSpeciesRoot().getUID(), chromosomeType.getName(), chromosomesToString(chromosomes));
+ getSpeciesRoot().getUID(),
+ chromosomeType.getName(),
+ chromosomesToString(chromosomes));
throw new IllegalArgumentException(message);
}
}
@@ -124,11 +136,7 @@ public abstract class Genome implements IGenome {
continue;
}
IChromosome chromosome = chromosomes[i];
- stringBuilder
- .append(chromosomeType.getName())
- .append(": ")
- .append(chromosome)
- .append("\n");
+ stringBuilder.append(chromosomeType.getName()).append(": ").append(chromosome).append("\n");
}
return stringBuilder.toString();
@@ -141,8 +149,8 @@ public abstract class Genome implements IGenome {
// NBT RETRIEVAL
/**
- * Quickly gets the species without loading the whole genome.
- * We need this because the client uses the species for rendering.
+ * Quickly gets the species without loading the whole genome. We need this because the client uses the species for
+ * rendering.
*/
protected static IAlleleSpecies getSpeciesDirectly(ItemStack itemStack) {
NBTTagCompound nbtTagCompound = itemStack.getTagCompound();
@@ -171,8 +179,8 @@ public abstract class Genome implements IGenome {
return (IAlleleSpecies) activeAllele;
}
- private static IChromosome getChromosome(
- ItemStack itemStack, IChromosomeType chromosomeType, ISpeciesRoot speciesRoot) {
+ private static IChromosome getChromosome(ItemStack itemStack, IChromosomeType chromosomeType,
+ ISpeciesRoot speciesRoot) {
NBTTagCompound nbtTagCompound = itemStack.getTagCompound();
if (nbtTagCompound == null) {
return null;
@@ -206,24 +214,24 @@ public abstract class Genome implements IGenome {
if (Config.clearInvalidChromosomes) {
IAllele template = speciesRoot.getDefaultTemplate()[chromosomeOrdinal];
- Class extends IAllele> chromosomeClass =
- speciesRoot.getKaryotype()[chromosomeOrdinal].getAlleleClass();
+ Class extends IAllele> chromosomeClass = speciesRoot.getKaryotype()[chromosomeOrdinal]
+ .getAlleleClass();
if (chromosome.overrideInvalidAlleles(template, chromosomeClass)) {
chromosome.writeToNBT(chromosomeNBT);
}
}
if (chromosome.hasInvalidAlleles(speciesRoot.getKaryotype()[chromosomeOrdinal].getAlleleClass())) {
- throw new RuntimeException("Found Chromosome with invalid Alleles.\nNBTTagCompound: "
- + chromosomesNBT + "\nSee config option \"genetics.clear.invalid.chromosomes\".\nMissing: "
- + chromosomeNBT);
+ throw new RuntimeException(
+ "Found Chromosome with invalid Alleles.\nNBTTagCompound: " + chromosomesNBT
+ + "\nSee config option \"genetics.clear.invalid.chromosomes\".\nMissing: "
+ + chromosomeNBT);
}
}
}
// handle old saves that have missing chromosomes
- IChromosome speciesChromosome =
- chromosomes[speciesRoot.getKaryotypeKey().ordinal()];
+ IChromosome speciesChromosome = chromosomes[speciesRoot.getKaryotypeKey().ordinal()];
if (speciesChromosome != null) {
IAlleleSpecies species = (IAlleleSpecies) speciesChromosome.getActiveAllele();
IAllele[] template = speciesRoot.getTemplate(species.getUID());
@@ -238,8 +246,8 @@ public abstract class Genome implements IGenome {
return chromosomes;
}
- protected static IAllele getActiveAllele(
- ItemStack itemStack, IChromosomeType chromosomeType, ISpeciesRoot speciesRoot) {
+ protected static IAllele getActiveAllele(ItemStack itemStack, IChromosomeType chromosomeType,
+ ISpeciesRoot speciesRoot) {
IChromosome chromosome = getChromosome(itemStack, chromosomeType, speciesRoot);
if (chromosome == null) {
return null;
@@ -301,16 +309,10 @@ public abstract class Genome implements IGenome {
return false;
}
- if (!chromosome
- .getPrimaryAllele()
- .getUID()
- .equals(otherChromosome.getPrimaryAllele().getUID())) {
+ if (!chromosome.getPrimaryAllele().getUID().equals(otherChromosome.getPrimaryAllele().getUID())) {
return false;
}
- if (!chromosome
- .getSecondaryAllele()
- .getUID()
- .equals(otherChromosome.getSecondaryAllele().getUID())) {
+ if (!chromosome.getSecondaryAllele().getUID().equals(otherChromosome.getSecondaryAllele().getUID())) {
return false;
}
}
diff --git a/src/main/java/forestry/core/genetics/IBranchDefinition.java b/src/main/java/forestry/core/genetics/IBranchDefinition.java
index 9c8fcdd80..50b2efb21 100644
--- a/src/main/java/forestry/core/genetics/IBranchDefinition.java
+++ b/src/main/java/forestry/core/genetics/IBranchDefinition.java
@@ -4,6 +4,7 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IClassification;
public interface IBranchDefinition {
+
IAllele[] getTemplate();
IClassification getBranch();
diff --git a/src/main/java/forestry/core/genetics/Individual.java b/src/main/java/forestry/core/genetics/Individual.java
index 6012eee3b..0028fd0ff 100755
--- a/src/main/java/forestry/core/genetics/Individual.java
+++ b/src/main/java/forestry/core/genetics/Individual.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
+import net.minecraft.nbt.NBTTagCompound;
+
import forestry.api.genetics.IChromosomeType;
import forestry.api.genetics.IIndividual;
-import net.minecraft.nbt.NBTTagCompound;
public abstract class Individual implements IIndividual {
@@ -77,9 +76,7 @@ public abstract class Individual implements IIndividual {
@Override
public boolean isPureBred(IChromosomeType chromosomeType) {
- return getGenome()
- .getActiveAllele(chromosomeType)
- .getUID()
+ return getGenome().getActiveAllele(chromosomeType).getUID()
.equals(getGenome().getInactiveAllele(chromosomeType).getUID());
}
}
diff --git a/src/main/java/forestry/core/genetics/IndividualLiving.java b/src/main/java/forestry/core/genetics/IndividualLiving.java
index 5b580c290..3bbdd6ad0 100755
--- a/src/main/java/forestry/core/genetics/IndividualLiving.java
+++ b/src/main/java/forestry/core/genetics/IndividualLiving.java
@@ -1,20 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
-import forestry.api.genetics.IGenome;
-import forestry.api.genetics.IIndividualLiving;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
+import forestry.api.genetics.IGenome;
+import forestry.api.genetics.IIndividualLiving;
+
public abstract class IndividualLiving extends Individual implements IIndividualLiving {
private int health;
diff --git a/src/main/java/forestry/core/genetics/ItemGE.java b/src/main/java/forestry/core/genetics/ItemGE.java
index 9de985d61..c793f20cc 100755
--- a/src/main/java/forestry/core/genetics/ItemGE.java
+++ b/src/main/java/forestry/core/genetics/ItemGE.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.genetics.IAlleleSpecies;
@@ -17,14 +23,9 @@ import forestry.api.genetics.IIndividual;
import forestry.core.items.ItemForestry;
import forestry.core.proxy.Proxies;
import forestry.core.utils.StringUtil;
-import java.util.List;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
public abstract class ItemGE extends ItemForestry {
+
protected ItemGE(CreativeTabs creativeTab) {
super(creativeTab);
hasSubtypes = true;
@@ -59,7 +60,7 @@ public abstract class ItemGE extends ItemForestry {
return species != null && species.hasEffect();
}
- @SuppressWarnings({"rawtypes", "unchecked"})
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
if (!itemstack.hasTagCompound()) {
diff --git a/src/main/java/forestry/core/genetics/ItemResearchNote.java b/src/main/java/forestry/core/genetics/ItemResearchNote.java
index 7cbac7b77..846e624eb 100755
--- a/src/main/java/forestry/core/genetics/ItemResearchNote.java
+++ b/src/main/java/forestry/core/genetics/ItemResearchNote.java
@@ -1,31 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
-import com.mojang.authlib.GameProfile;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.genetics.AlleleManager;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IAlleleSpecies;
-import forestry.api.genetics.IBreedingTracker;
-import forestry.api.genetics.IMutation;
-import forestry.api.genetics.ISpeciesRoot;
-import forestry.core.genetics.mutations.EnumMutateChance;
-import forestry.core.items.ItemForestry;
-import forestry.core.proxy.Proxies;
-import forestry.core.utils.StringUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
+
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
@@ -38,9 +24,25 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
+import com.mojang.authlib.GameProfile;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.genetics.AlleleManager;
+import forestry.api.genetics.IAllele;
+import forestry.api.genetics.IAlleleSpecies;
+import forestry.api.genetics.IBreedingTracker;
+import forestry.api.genetics.IMutation;
+import forestry.api.genetics.ISpeciesRoot;
+import forestry.core.genetics.mutations.EnumMutateChance;
+import forestry.core.items.ItemForestry;
+import forestry.core.proxy.Proxies;
+import forestry.core.utils.StringUtil;
+
public class ItemResearchNote extends ItemForestry {
public enum EnumNoteType {
+
NONE,
MUTATION,
SPECIES;
@@ -92,29 +94,26 @@ public class ItemResearchNote extends ItemForestry {
String species1 = encoded.getAllele0().getName();
String species2 = encoded.getAllele1().getName();
- String mutationChanceKey = EnumMutateChance.rateChance(encoded.getBaseChance())
- .toString()
+ String mutationChanceKey = EnumMutateChance.rateChance(encoded.getBaseChance()).toString()
.toLowerCase(Locale.ENGLISH);
String mutationChance = StringUtil.localize("researchNote.chance." + mutationChanceKey);
- String speciesResult =
- encoded.getTemplate()[root.getKaryotypeKey().ordinal()].getName();
+ String speciesResult = encoded.getTemplate()[root.getKaryotypeKey().ordinal()].getName();
tooltips.add(StringUtil.localize("researchNote.discovery.0"));
- tooltips.add(StringUtil.localize("researchNote.discovery.1")
- .replace("%SPEC1", species1)
- .replace("%SPEC2", species2));
+ tooltips.add(
+ StringUtil.localize("researchNote.discovery.1").replace("%SPEC1", species1)
+ .replace("%SPEC2", species2));
tooltips.add(StringUtil.localizeAndFormat("researchNote.discovery.2", mutationChance));
tooltips.add(StringUtil.localizeAndFormat("researchNote.discovery.3", speciesResult));
- if (encoded.getSpecialConditions() != null
- && encoded.getSpecialConditions().size() > 0) {
+ if (encoded.getSpecialConditions() != null && encoded.getSpecialConditions().size() > 0) {
for (String line : encoded.getSpecialConditions()) {
tooltips.add(EnumChatFormatting.GOLD + line);
}
}
} else if (this == SPECIES) {
- IAlleleSpecies allele0 =
- (IAlleleSpecies) AlleleManager.alleleRegistry.getAllele(compound.getString("AL0"));
+ IAlleleSpecies allele0 = (IAlleleSpecies) AlleleManager.alleleRegistry
+ .getAllele(compound.getString("AL0"));
if (allele0 == null) {
return tooltips;
}
@@ -124,8 +123,11 @@ public class ItemResearchNote extends ItemForestry {
}
tooltips.add("researchNote.discovered.0");
- tooltips.add(StringUtil.localizeAndFormat(
- "researchNote.discovered.1", allele0.getName(), allele0.getBinomial()));
+ tooltips.add(
+ StringUtil.localizeAndFormat(
+ "researchNote.discovered.1",
+ allele0.getName(),
+ allele0.getBinomial()));
}
return tooltips;
@@ -155,8 +157,7 @@ public class ItemResearchNote extends ItemForestry {
IAlleleSpecies species0 = encoded.getAllele0();
IAlleleSpecies species1 = encoded.getAllele1();
- IAlleleSpecies speciesResult = (IAlleleSpecies)
- encoded.getTemplate()[root.getKaryotypeKey().ordinal()];
+ IAlleleSpecies speciesResult = (IAlleleSpecies) encoded.getTemplate()[root.getKaryotypeKey().ordinal()];
tracker.registerSpecies(species0);
tracker.registerSpecies(species1);
@@ -165,11 +166,12 @@ public class ItemResearchNote extends ItemForestry {
tracker.researchMutation(encoded);
player.addChatMessage(new ChatComponentTranslation("for.chat.memorizednote"));
- player.addChatMessage(new ChatComponentTranslation(
- "for.chat.memorizednote2",
- EnumChatFormatting.GRAY + species0.getName(),
- EnumChatFormatting.GRAY + species1.getName(),
- EnumChatFormatting.GREEN + speciesResult.getName()));
+ player.addChatMessage(
+ new ChatComponentTranslation(
+ "for.chat.memorizednote2",
+ EnumChatFormatting.GRAY + species0.getName(),
+ EnumChatFormatting.GRAY + species1.getName(),
+ EnumChatFormatting.GREEN + speciesResult.getName()));
return true;
}
@@ -253,9 +255,9 @@ public class ItemResearchNote extends ItemForestry {
public void addTooltip(List list) {
ArrayList tooltips = type.getTooltip(inner);
if (tooltips.size() <= 0) {
- list.add(EnumChatFormatting.ITALIC
- + EnumChatFormatting.RED.toString()
- + StringUtil.localize("researchNote.error.0"));
+ list.add(
+ EnumChatFormatting.ITALIC + EnumChatFormatting.RED.toString()
+ + StringUtil.localize("researchNote.error.0"));
list.add(StringUtil.localize("researchNote.error.1"));
return;
}
@@ -285,7 +287,7 @@ public class ItemResearchNote extends ItemForestry {
return StringUtil.localizeAndFormatRaw(getUnlocalizedName(itemstack) + ".name", researcherName);
}
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
ResearchNote note = new ResearchNote(itemstack.getTagCompound());
diff --git a/src/main/java/forestry/core/genetics/SpeciesRoot.java b/src/main/java/forestry/core/genetics/SpeciesRoot.java
index ea0a0d395..14815fe1d 100644
--- a/src/main/java/forestry/core/genetics/SpeciesRoot.java
+++ b/src/main/java/forestry/core/genetics/SpeciesRoot.java
@@ -1,21 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics;
-import forestry.api.genetics.IAllele;
-import forestry.api.genetics.IAlleleSpecies;
-import forestry.api.genetics.IChromosome;
-import forestry.api.genetics.IChromosomeType;
-import forestry.api.genetics.IMutation;
-import forestry.api.genetics.ISpeciesRoot;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -25,9 +17,17 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
+
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
+import forestry.api.genetics.IAllele;
+import forestry.api.genetics.IAlleleSpecies;
+import forestry.api.genetics.IChromosome;
+import forestry.api.genetics.IChromosomeType;
+import forestry.api.genetics.IMutation;
+import forestry.api.genetics.ISpeciesRoot;
+
public abstract class SpeciesRoot implements ISpeciesRoot {
/* RESEARCH */
@@ -93,8 +93,8 @@ public abstract class SpeciesRoot implements ISpeciesRoot {
}
@Override
- public List getCombinations(
- IAlleleSpecies parentSpecies0, IAlleleSpecies parentSpecies1, boolean shuffle) {
+ public List getCombinations(IAlleleSpecies parentSpecies0, IAlleleSpecies parentSpecies1,
+ boolean shuffle) {
List combinations = new ArrayList<>();
String parentSpecies1UID = parentSpecies1.getUID();
diff --git a/src/main/java/forestry/core/genetics/alleles/Allele.java b/src/main/java/forestry/core/genetics/alleles/Allele.java
index 6f8da66c3..5b6c8db78 100644
--- a/src/main/java/forestry/core/genetics/alleles/Allele.java
+++ b/src/main/java/forestry/core/genetics/alleles/Allele.java
@@ -1,18 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
-import forestry.api.genetics.IAllele;
import net.minecraft.util.StatCollector;
+import forestry.api.genetics.IAllele;
+
public abstract class Allele implements IAllele {
private final String uid;
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleArea.java b/src/main/java/forestry/core/genetics/alleles/AlleleArea.java
index a7a95baff..384ad2b51 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleArea.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleArea.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleBoolean.java b/src/main/java/forestry/core/genetics/alleles/AlleleBoolean.java
index 13d5dcaf9..b47a516d1 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleBoolean.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleBoolean.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java b/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java
index 7a91079b9..dcb9bab0d 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleCategorized.java
@@ -1,18 +1,18 @@
package forestry.core.genetics.alleles;
import net.minecraft.util.StatCollector;
+
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.
+ * 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
- * forestry.allele.fast
+ * This class helps localization by allowing specific names like forestry.allele.speed.fast and can fall back on generic
+ * names like forestry.allele.fast
*/
public abstract class AlleleCategorized extends Allele {
+
protected AlleleCategorized(String modId, String category, String valueName, boolean isDominant) {
super(getUid(modId, category, valueName), getUnlocalizedName(modId, category, valueName), isDominant);
}
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java b/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java
index 1717f8cad..6afddef91 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleFactory.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
@@ -24,12 +22,7 @@ import forestry.apiculture.genetics.alleles.AlleleFlowers;
public class AlleleFactory implements IAlleleFactory {
@Override
- public IAlleleFloat createFloat(
- String modId,
- String category,
- String valueName,
- float value,
- boolean isDominant,
+ public IAlleleFloat createFloat(String modId, String category, String valueName, float value, boolean isDominant,
IChromosomeType... types) {
IAlleleFloat alleleFloat = new AlleleFloat(modId, category, valueName, value, isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleFloat, types);
@@ -37,45 +30,37 @@ public class AlleleFactory implements IAlleleFactory {
}
@Override
- public IAlleleArea createArea(
- String modId,
- String category,
- String valueName,
- int xDimValue,
- int yDimValue,
- int zDimValue,
- boolean isDominant,
- IChromosomeType... types) {
- IAlleleArea alleleArea =
- new AlleleArea(modId, category, valueName, new int[] {xDimValue, yDimValue, zDimValue}, isDominant);
+ public IAlleleArea createArea(String modId, String category, String valueName, int xDimValue, int yDimValue,
+ int zDimValue, boolean isDominant, IChromosomeType... types) {
+ IAlleleArea alleleArea = new AlleleArea(
+ modId,
+ category,
+ valueName,
+ new int[] { xDimValue, yDimValue, zDimValue },
+ isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleArea, types);
return alleleArea;
}
@Override
- public IAlleleInteger createInteger(
- String modId, String category, String valueName, int value, boolean isDominant, IChromosomeType... types) {
+ public IAlleleInteger createInteger(String modId, String category, String valueName, int value, boolean isDominant,
+ IChromosomeType... types) {
IAlleleInteger alleleInteger = new AlleleInteger(modId, category, valueName, value, isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleInteger, types);
return alleleInteger;
}
@Override
- public IAlleleBoolean createBoolean(
- String modId, String category, boolean value, boolean isDominant, IChromosomeType... types) {
+ public IAlleleBoolean createBoolean(String modId, String category, boolean value, boolean isDominant,
+ IChromosomeType... types) {
IAlleleBoolean alleleBoolean = new AlleleBoolean(modId, category, value, isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleBoolean, types);
return alleleBoolean;
}
@Override
- public IAlleleFlowers createFlowers(
- String modId,
- String category,
- String valueName,
- IFlowerProvider value,
- boolean isDominant,
- IChromosomeType... types) {
+ public IAlleleFlowers createFlowers(String modId, String category, String valueName, IFlowerProvider value,
+ boolean isDominant, IChromosomeType... types) {
IAlleleFlowers alleleFlowers = new AlleleFlowers(modId, category, valueName, value, isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleFlowers, types);
return alleleFlowers;
@@ -89,16 +74,16 @@ public class AlleleFactory implements IAlleleFactory {
}
@Override
- public IAlleleArea createArea(
- String modId, String category, String name, int xDim, int yDim, int zDim, boolean isDominant) {
- IAlleleArea alleleArea = new AlleleArea(modId, category, name, new int[] {xDim, yDim, zDim}, isDominant);
+ public IAlleleArea createArea(String modId, String category, String name, int xDim, int yDim, int zDim,
+ boolean isDominant) {
+ IAlleleArea alleleArea = new AlleleArea(modId, category, name, new int[] { xDim, yDim, zDim }, isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleArea);
return alleleArea;
}
@Override
- public IAlleleInteger createInteger(
- String modId, String category, String valueName, int value, boolean isDominant) {
+ public IAlleleInteger createInteger(String modId, String category, String valueName, int value,
+ boolean isDominant) {
IAlleleInteger alleleInteger = new AlleleInteger(modId, category, valueName, value, isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleInteger);
return alleleInteger;
@@ -112,8 +97,8 @@ public class AlleleFactory implements IAlleleFactory {
}
@Override
- public IAlleleFlowers createFlowers(
- String modId, String category, String name, IFlowerProvider flowerProvider, boolean isDominant) {
+ public IAlleleFlowers createFlowers(String modId, String category, String name, IFlowerProvider flowerProvider,
+ boolean isDominant) {
IAlleleFlowers alleleFlowers = new AlleleFlowers(modId, category, name, flowerProvider, isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleFlowers);
return alleleFlowers;
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleFloat.java b/src/main/java/forestry/core/genetics/alleles/AlleleFloat.java
index 26bad5777..f61f3b9c4 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleFloat.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleFloat.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java b/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java
index 63e18ce1e..85a115701 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleHelper.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.genetics.AlleleManager;
@@ -24,10 +27,6 @@ import forestry.apiculture.flowers.FlowerProvider;
import forestry.core.config.Constants;
import forestry.core.utils.vect.IVect;
import forestry.plugins.PluginManager;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
public class AlleleHelper implements IAlleleHelper {
@@ -46,7 +45,8 @@ public class AlleleHelper implements IAlleleHelper {
createAlleles(EnumAllele.Territory.class, EnumBeeChromosome.TERRITORY, EnumTreeChromosome.TERRITORY);
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.territoryDefault", get(EnumAllele.Territory.AVERAGE));
+ "forestry.territoryDefault",
+ get(EnumAllele.Territory.AVERAGE));
}
if (PluginManager.Module.APICULTURE.isEnabled() || PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) {
@@ -63,8 +63,8 @@ public class AlleleHelper implements IAlleleHelper {
EnumBeeChromosome.FLOWER_PROVIDER,
EnumButterflyChromosome.FLOWER_PROVIDER);
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.speedNorm", get(EnumAllele.Speed.NORMAL));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.speedNorm", get(EnumAllele.Speed.NORMAL));
}
if (PluginManager.Module.ARBORICULTURE.isEnabled()) {
@@ -75,30 +75,33 @@ public class AlleleHelper implements IAlleleHelper {
createAlleles(EnumAllele.Maturation.class, EnumTreeChromosome.MATURATION);
createAlleles(EnumAllele.Sappiness.class, EnumTreeChromosome.SAPPINESS);
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.heightMax10", get(EnumAllele.Height.AVERAGE));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.saplingsDefault", get(EnumAllele.Saplings.AVERAGE));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.saplingsDouble", get(EnumAllele.Saplings.HIGH));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.saplingsTriple", get(EnumAllele.Saplings.HIGHER));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.yieldDefault", get(EnumAllele.Yield.AVERAGE));
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.heightMax10", get(EnumAllele.Height.AVERAGE));
+ "forestry.maturitySlowest",
+ get(EnumAllele.Maturation.SLOWEST));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.maturitySlower", get(EnumAllele.Maturation.SLOWER));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.maturitySlow", get(EnumAllele.Maturation.SLOW));
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.saplingsDefault", get(EnumAllele.Saplings.AVERAGE));
+ "forestry.maturityAverage",
+ get(EnumAllele.Maturation.AVERAGE));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.maturityFast", get(EnumAllele.Maturation.FAST));
+ AlleleManager.alleleRegistry
+ .registerDeprecatedAlleleReplacement("forestry.maturityFaster", get(EnumAllele.Maturation.FASTER));
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.saplingsDouble", get(EnumAllele.Saplings.HIGH));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.saplingsTriple", get(EnumAllele.Saplings.HIGHER));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.yieldDefault", get(EnumAllele.Yield.AVERAGE));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.maturitySlowest", get(EnumAllele.Maturation.SLOWEST));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.maturitySlower", get(EnumAllele.Maturation.SLOWER));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.maturitySlow", get(EnumAllele.Maturation.SLOW));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.maturityAverage", get(EnumAllele.Maturation.AVERAGE));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.maturityFast", get(EnumAllele.Maturation.FAST));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.maturityFaster", get(EnumAllele.Maturation.FASTER));
- AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
- "forestry.maturityFastest", get(EnumAllele.Maturation.FASTEST));
+ "forestry.maturityFastest",
+ get(EnumAllele.Maturation.FASTEST));
}
if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) {
@@ -158,11 +161,11 @@ public class AlleleHelper implements IAlleleHelper {
}
// uncomment this once all addon mods are using the allele registration with IChromosomeType
- // Collection validTypes = AlleleManager.alleleRegistry.getChromosomeTypes(allele);
- // if (validTypes.size() > 0 && !validTypes.contains(chromosomeType)) {
- // throw new IllegalArgumentException("Allele can't applied to this Chromosome type. Expected: " + validTypes
+ // Collection validTypes = AlleleManager.alleleRegistry.getChromosomeTypes(allele);
+ // if (validTypes.size() > 0 && !validTypes.contains(chromosomeType)) {
+ // throw new IllegalArgumentException("Allele can't applied to this Chromosome type. Expected: " + validTypes
// + " Got: " + chromosomeType);
- // }
+ // }
alleles[chromosomeType.ordinal()] = allele;
}
@@ -192,8 +195,8 @@ public class AlleleHelper implements IAlleleHelper {
alleleMaps.put(enumClass, map);
}
- private static , V> IAllele createAllele(
- String category, K enumValue, IChromosomeType... types) {
+ private static , V> IAllele createAllele(String category, K enumValue,
+ IChromosomeType... types) {
V value = enumValue.getValue();
boolean isDominant = enumValue.isDominant();
String name = enumValue.toString().toLowerCase(Locale.ENGLISH);
@@ -205,18 +208,22 @@ public class AlleleHelper implements IAlleleHelper {
return AlleleManager.alleleFactory.createInteger(modId, category, name, (Integer) value, isDominant, types);
} else if (IVect.class.isAssignableFrom(valueClass)) {
IVect area = (IVect) value;
- return AlleleManager.alleleFactory.createArea(
- modId, category, name, area.getX(), area.getY(), area.getZ(), isDominant, types);
+ return AlleleManager.alleleFactory
+ .createArea(modId, category, name, area.getX(), area.getY(), area.getZ(), isDominant, types);
} else if (Boolean.class.isAssignableFrom(valueClass)) {
return AlleleManager.alleleFactory.createBoolean(modId, category, (Boolean) value, isDominant, types);
} else if (EnumTolerance.class.isAssignableFrom(valueClass)) {
- IAlleleTolerance alleleTolerance =
- new AlleleTolerance(modId, category, name, (EnumTolerance) value, isDominant);
+ IAlleleTolerance alleleTolerance = new AlleleTolerance(
+ modId,
+ category,
+ name,
+ (EnumTolerance) value,
+ isDominant);
AlleleManager.alleleRegistry.registerAllele(alleleTolerance, types);
return alleleTolerance;
} else if (FlowerProvider.class.isAssignableFrom(valueClass)) {
- return AlleleManager.alleleFactory.createFlowers(
- modId, category, name, (FlowerProvider) value, isDominant, types);
+ return AlleleManager.alleleFactory
+ .createFlowers(modId, category, name, (FlowerProvider) value, isDominant, types);
}
throw new RuntimeException("could not create allele for category: " + category + " and value " + valueClass);
}
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleInteger.java b/src/main/java/forestry/core/genetics/alleles/AlleleInteger.java
index ca9989cdd..940631c3b 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleInteger.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleInteger.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
diff --git a/src/main/java/forestry/core/genetics/alleles/AllelePlantType.java b/src/main/java/forestry/core/genetics/alleles/AllelePlantType.java
index a41f0acc3..860aac686 100644
--- a/src/main/java/forestry/core/genetics/alleles/AllelePlantType.java
+++ b/src/main/java/forestry/core/genetics/alleles/AllelePlantType.java
@@ -1,24 +1,24 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
-import forestry.api.arboriculture.EnumTreeChromosome;
-import forestry.api.genetics.AlleleManager;
-import forestry.api.genetics.IAllelePlantType;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import java.util.Locale;
+
import net.minecraftforge.common.EnumPlantType;
+import forestry.api.arboriculture.EnumTreeChromosome;
+import forestry.api.genetics.AlleleManager;
+import forestry.api.genetics.IAllelePlantType;
+
public class AllelePlantType extends AlleleCategorized implements IAllelePlantType {
public static IAllelePlantType plantTypeNone;
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java b/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java
index 3c99c7a3b..dab0459e7 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleRegistry.java
@@ -1,17 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+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;
@@ -26,13 +34,6 @@ import forestry.api.genetics.ISpeciesRoot;
import forestry.core.genetics.Classification;
import forestry.core.genetics.ItemResearchNote.EnumNoteType;
import forestry.plugins.PluginCore;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import net.minecraft.item.ItemStack;
public class AlleleRegistry implements IAlleleRegistry {
@@ -162,8 +163,11 @@ public class AlleleRegistry implements IAlleleRegistry {
public void registerAllele(IAllele allele, IChromosomeType... chromosomeTypes) {
for (IChromosomeType chromosomeType : chromosomeTypes) {
if (!chromosomeType.getAlleleClass().isAssignableFrom(allele.getClass())) {
- throw new IllegalArgumentException("Allele class (" + allele.getClass()
- + ") does not match chromosome type (" + chromosomeType.getAlleleClass() + ").");
+ throw new IllegalArgumentException(
+ "Allele class (" + allele.getClass()
+ + ") does not match chromosome type ("
+ + chromosomeType.getAlleleClass()
+ + ").");
}
allelesByType.put(chromosomeType, allele);
typesByAllele.put(allele, chromosomeType);
@@ -206,9 +210,11 @@ public class AlleleRegistry implements IAlleleRegistry {
public void registerClassification(IClassification branch) {
if (classificationMap.containsKey(branch.getUID())) {
- throw new RuntimeException(String.format(
- "Could not add new classification '%s', because the key is already taken by %s.",
- branch.getUID(), classificationMap.get(branch.getUID())));
+ throw new RuntimeException(
+ String.format(
+ "Could not add new classification '%s', because the key is already taken by %s.",
+ branch.getUID(),
+ classificationMap.get(branch.getUID())));
}
classificationMap.put(branch.getUID(), branch);
@@ -228,8 +234,8 @@ public class AlleleRegistry implements IAlleleRegistry {
}
@Override
- public IClassification createAndRegisterClassification(
- EnumClassLevel level, String uid, String scientific, IClassification... members) {
+ public IClassification createAndRegisterClassification(EnumClassLevel level, String uid, String scientific,
+ IClassification... members) {
IClassification classification = new Classification(level, uid, scientific);
for (IClassification member : members) {
classification.addMemberGroup(member);
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java b/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java
index 73e01c50e..bb6066c33 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java
@@ -1,16 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
+import java.util.Collection;
+import java.util.Map;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
import com.mojang.authlib.GameProfile;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.EnumHumidity;
@@ -25,14 +32,9 @@ import forestry.apiculture.items.ItemRegistryApiculture;
import forestry.core.utils.GeneticsUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginApiculture;
-import java.util.Collection;
-import java.util.Map;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
public abstract class AlleleSpecies extends Allele implements IAlleleSpeciesCustom {
+
private final String binomial;
private final String authority;
private final String description;
@@ -44,14 +46,8 @@ public abstract class AlleleSpecies extends Allele implements IAlleleSpeciesCust
private EnumTemperature climate = EnumTemperature.NORMAL;
private EnumHumidity humidity = EnumHumidity.NORMAL;
- protected AlleleSpecies(
- String uid,
- String unlocalizedName,
- String authority,
- String unlocalizedDescription,
- boolean isDominant,
- IClassification branch,
- String binomial) {
+ protected AlleleSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription,
+ boolean isDominant, IClassification branch, String binomial) {
super(uid, unlocalizedName, isDominant);
this.branch = branch;
@@ -87,8 +83,7 @@ public abstract class AlleleSpecies extends Allele implements IAlleleSpeciesCust
return 1.0f;
}
- for (Map.Entry entry :
- getRoot().getResearchCatalysts().entrySet()) {
+ for (Map.Entry entry : getRoot().getResearchCatalysts().entrySet()) {
if (ItemStackUtil.isIdenticalItem(entry.getKey(), itemstack)) {
return entry.getValue();
}
@@ -109,13 +104,13 @@ public abstract class AlleleSpecies extends Allele implements IAlleleSpeciesCust
Collection extends IMutation> combinations = getRoot().getCombinations(this);
if (combinations.size() > 0) {
IMutation[] candidates = combinations.toArray(new IMutation[combinations.size()]);
- research = AlleleManager.alleleRegistry.getMutationNoteStack(
- researcher, candidates[world.rand.nextInt(candidates.length)]);
+ research = AlleleManager.alleleRegistry
+ .getMutationNoteStack(researcher, candidates[world.rand.nextInt(candidates.length)]);
}
}
if (research != null) {
- return new ItemStack[] {research};
+ return new ItemStack[] { research };
} else {
return ItemStackUtil.EMPTY_STACK_ARRAY;
}
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleTolerance.java b/src/main/java/forestry/core/genetics/alleles/AlleleTolerance.java
index 089c4372b..b823fa441 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleTolerance.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleTolerance.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
diff --git a/src/main/java/forestry/core/genetics/alleles/EnumAllele.java b/src/main/java/forestry/core/genetics/alleles/EnumAllele.java
index 8186bb19f..c02d86fad 100644
--- a/src/main/java/forestry/core/genetics/alleles/EnumAllele.java
+++ b/src/main/java/forestry/core/genetics/alleles/EnumAllele.java
@@ -1,14 +1,17 @@
package forestry.core.genetics.alleles;
+import java.util.Locale;
+
import forestry.api.apiculture.FlowerManager;
import forestry.api.genetics.EnumTolerance;
import forestry.apiculture.flowers.FlowerProvider;
import forestry.core.utils.vect.IVect;
import forestry.core.utils.vect.Vect;
-import java.util.Locale;
public class EnumAllele {
+
public enum Fertility implements IAlleleValue {
+
LOW(1, true),
NORMAL(2, true),
HIGH(3),
@@ -38,6 +41,7 @@ public class EnumAllele {
}
public enum Fireproof implements IAlleleValue {
+
TRUE(true),
FALSE(false);
@@ -65,6 +69,7 @@ public class EnumAllele {
}
public enum Flowering implements IAlleleValue {
+
SLOWEST(5, true),
SLOWER(10),
SLOW(15),
@@ -98,6 +103,7 @@ public class EnumAllele {
}
public enum Flowers implements IAlleleValue {
+
VANILLA(FlowerManager.FlowerTypeVanilla, true),
NETHER(FlowerManager.FlowerTypeNether),
CACTI(FlowerManager.FlowerTypeCacti),
@@ -133,6 +139,7 @@ public class EnumAllele {
}
public enum Height implements IAlleleValue {
+
SMALLEST(0.25f),
SMALLER(0.5f),
SMALL(0.75f),
@@ -166,6 +173,7 @@ public class EnumAllele {
}
public enum Lifespan implements IAlleleValue {
+
SHORTEST(10),
SHORTER(20, true),
SHORT(30, true),
@@ -200,6 +208,7 @@ public class EnumAllele {
}
public enum Maturation implements IAlleleValue {
+
SLOWEST(10, true),
SLOWER(7),
SLOW(5, true),
@@ -232,6 +241,7 @@ public class EnumAllele {
}
public enum Saplings implements IAlleleValue {
+
LOWEST(0.01f, true),
LOWER(0.025f, true),
LOW(0.035f, true),
@@ -264,6 +274,7 @@ public class EnumAllele {
}
public enum Sappiness implements IAlleleValue {
+
LOWEST(0.1f, true),
LOWER(0.2f, true),
LOW(0.3f, true),
@@ -296,6 +307,7 @@ public class EnumAllele {
}
public enum Size implements IAlleleValue {
+
SMALLEST(0.3f),
SMALLER(0.4f),
SMALL(0.5f),
@@ -328,6 +340,7 @@ public class EnumAllele {
}
public enum Speed implements IAlleleValue {
+
SLOWEST(0.3f, true),
SLOWER(0.6f, true),
SLOW(0.8f, true),
@@ -360,6 +373,7 @@ public class EnumAllele {
}
public enum Territory implements IAlleleValue {
+
AVERAGE(9, 6, 9),
LARGE(11, 8, 11),
LARGER(13, 12, 13),
@@ -389,6 +403,7 @@ public class EnumAllele {
}
public enum Tolerance implements IAlleleValue {
+
NONE,
BOTH_1(true),
BOTH_2,
@@ -435,6 +450,7 @@ public class EnumAllele {
}
public enum Yield implements IAlleleValue {
+
LOWEST(0.025f, true),
LOWER(0.05f, true),
LOW(0.1f, true),
diff --git a/src/main/java/forestry/core/genetics/alleles/IAlleleHelper.java b/src/main/java/forestry/core/genetics/alleles/IAlleleHelper.java
index 4f149a2ff..6322e7bbb 100644
--- a/src/main/java/forestry/core/genetics/alleles/IAlleleHelper.java
+++ b/src/main/java/forestry/core/genetics/alleles/IAlleleHelper.java
@@ -1,12 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.alleles;
diff --git a/src/main/java/forestry/core/genetics/alleles/IAlleleValue.java b/src/main/java/forestry/core/genetics/alleles/IAlleleValue.java
index b7596f17f..a79d5d836 100644
--- a/src/main/java/forestry/core/genetics/alleles/IAlleleValue.java
+++ b/src/main/java/forestry/core/genetics/alleles/IAlleleValue.java
@@ -1,6 +1,7 @@
package forestry.core.genetics.alleles;
public interface IAlleleValue {
+
boolean isDominant();
V getValue();
diff --git a/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java b/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java
index c23df6a89..5bb83f0ed 100644
--- a/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java
+++ b/src/main/java/forestry/core/genetics/mutations/EnumMutateChance.java
@@ -1,16 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
public enum EnumMutateChance {
+
NONE(0xffffff),
LOWEST(0xffba77),
LOW(0xfffd77),
diff --git a/src/main/java/forestry/core/genetics/mutations/Mutation.java b/src/main/java/forestry/core/genetics/mutations/Mutation.java
index 2a218a7d6..68a9628cb 100644
--- a/src/main/java/forestry/core/genetics/mutations/Mutation.java
+++ b/src/main/java/forestry/core/genetics/mutations/Mutation.java
@@ -1,15 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraftforge.common.BiomeDictionary;
+
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.IClimateProvider;
@@ -18,12 +24,6 @@ import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import forestry.api.genetics.IMutationCustom;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
-import net.minecraftforge.common.BiomeDictionary;
public abstract class Mutation implements IMutationCustom {
@@ -122,16 +122,8 @@ public abstract class Mutation implements IMutationCustom {
return this;
}
- protected float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ protected float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
float mutationChance = chance;
for (IMutationCondition mutationCondition : mutationConditions) {
mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate);
diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java
index 7a5599ba0..f9c3b06fc 100644
--- a/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java
+++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionBiome.java
@@ -1,26 +1,26 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraftforge.common.BiomeDictionary;
+
import forestry.api.core.IClimateProvider;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import forestry.core.utils.StringUtil;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary;
public class MutationConditionBiome implements IMutationCondition {
@@ -31,16 +31,8 @@ public class MutationConditionBiome implements IMutationCondition {
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
BiomeGenBase biome = climate.getBiome();
for (BiomeDictionary.Type type : validBiomeTypes) {
if (BiomeDictionary.isBiomeOfType(biome, type)) {
diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java
index 8f4e6362b..f3606413a 100644
--- a/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java
+++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionDaytime.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import net.minecraft.world.World;
+
import forestry.api.core.IClimateProvider;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import forestry.core.utils.StringUtil;
-import net.minecraft.world.World;
public class MutationConditionDaytime implements IMutationCondition {
@@ -26,16 +25,8 @@ public class MutationConditionDaytime implements IMutationCondition {
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
if (world.isDaytime() == daytime) {
return 1;
}
diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java
index c9bcf969e..16f8f4127 100644
--- a/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java
+++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionHumidity.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import net.minecraft.world.World;
+
import forestry.api.core.EnumHumidity;
import forestry.api.core.IClimateProvider;
import forestry.api.genetics.AlleleManager;
@@ -17,9 +17,9 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import forestry.core.utils.StringUtil;
-import net.minecraft.world.World;
public class MutationConditionHumidity implements IMutationCondition {
+
private final EnumHumidity minHumidity;
private final EnumHumidity maxHumidity;
@@ -29,16 +29,8 @@ public class MutationConditionHumidity implements IMutationCondition {
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
EnumHumidity biomeHumidity = climate.getHumidity();
if (biomeHumidity.ordinal() < minHumidity.ordinal() || biomeHumidity.ordinal() > maxHumidity.ordinal()) {
@@ -53,8 +45,7 @@ public class MutationConditionHumidity implements IMutationCondition {
if (minHumidity != maxHumidity) {
String maxHumidityString = AlleleManager.climateHelper.toDisplay(maxHumidity);
- return StringUtil.localize("mutation.condition.humidity.range")
- .replace("%LOW", minHumidityString)
+ return StringUtil.localize("mutation.condition.humidity.range").replace("%LOW", minHumidityString)
.replace("%HIGH", maxHumidityString);
} else {
return StringUtil.localizeAndFormat("mutation.condition.humidity.single", minHumidityString);
diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResource.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResource.java
index 72cc73045..17b0c8707 100644
--- a/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResource.java
+++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResource.java
@@ -1,15 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.IClimateProvider;
import forestry.api.genetics.IAllele;
@@ -18,10 +21,6 @@ import forestry.api.genetics.IMutationCondition;
import forestry.core.utils.BlockUtil;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.StringUtil;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
// import forestry.core.utils.ItemStackUtil;
@@ -34,32 +33,15 @@ public class MutationConditionRequiresResource implements IMutationCondition {
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
/*
- Block block;
- TileEntity tile;
- int meta;
- int i = 1;
- do {
- block = world.getBlock(x, y - i, z);
- meta = world.getBlockMetadata(x, y - i, z);
- tile = world.getTileEntity(x, y - i, z);
- i++;
- } while (tile instanceof IBeeHousing);
-
- return ItemStackUtil.equals(block, meta, blockRequired) ? 1 : 0;
- */
- ItemStack stk = BlockUtil.getItemStackFromBlockBelow(
- world, x, y, z, (TileEntity tile) -> (tile instanceof IBeeHousing));
+ * Block block; TileEntity tile; int meta; int i = 1; do { block = world.getBlock(x, y - i, z); meta =
+ * world.getBlockMetadata(x, y - i, z); tile = world.getTileEntity(x, y - i, z); i++; } while (tile instanceof
+ * IBeeHousing); return ItemStackUtil.equals(block, meta, blockRequired) ? 1 : 0;
+ */
+ ItemStack stk = BlockUtil
+ .getItemStackFromBlockBelow(world, x, y, z, (TileEntity tile) -> (tile instanceof IBeeHousing));
return InventoryUtil.isItemEqual(blockRequired, stk, true, true) ? 1 : 0;
}
diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResourceOreDict.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResourceOreDict.java
index 57bb31fb2..69dae88f4 100644
--- a/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResourceOreDict.java
+++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionRequiresResourceOreDict.java
@@ -1,15 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.oredict.OreDictionary;
+
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.IClimateProvider;
import forestry.api.genetics.IAllele;
@@ -17,11 +22,6 @@ import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import forestry.core.utils.BlockUtil;
import forestry.core.utils.StringUtil;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraftforge.oredict.OreDictionary;
public class MutationConditionRequiresResourceOreDict implements IMutationCondition {
@@ -40,30 +40,15 @@ public class MutationConditionRequiresResourceOreDict implements IMutationCondit
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
/*
- Block block;
- int meta;
- TileEntity tile;
- int i = 1;
- do {
- block = world.getBlock(x, y - i, z);
- meta = world.getBlockMetadata(x, y - i, z);
- tile = world.getTileEntity(x, y-i, z);
- i++;
- } while (tile instanceof IBeeHousing);
- */
- ItemStack stk = BlockUtil.getItemStackFromBlockBelow(
- world, x, y, z, (TileEntity tile) -> (tile instanceof IBeeHousing));
+ * Block block; int meta; TileEntity tile; int i = 1; do { block = world.getBlock(x, y - i, z); meta =
+ * world.getBlockMetadata(x, y - i, z); tile = world.getTileEntity(x, y-i, z); i++; } while (tile instanceof
+ * IBeeHousing);
+ */
+ ItemStack stk = BlockUtil
+ .getItemStackFromBlockBelow(world, x, y, z, (TileEntity tile) -> (tile instanceof IBeeHousing));
int[] oreIds = OreDictionary.getOreIDs(stk);
for (int oreId : oreIds) if (oreId == this.oreDictId) return 1f;
return 0f;
diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionTemperature.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionTemperature.java
index 581386efb..3632d7416 100644
--- a/src/main/java/forestry/core/genetics/mutations/MutationConditionTemperature.java
+++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionTemperature.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import net.minecraft.world.World;
+
import forestry.api.core.EnumTemperature;
import forestry.api.core.IClimateProvider;
import forestry.api.genetics.AlleleManager;
@@ -17,7 +17,6 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import forestry.core.utils.StringUtil;
-import net.minecraft.world.World;
public class MutationConditionTemperature implements IMutationCondition {
@@ -30,16 +29,8 @@ public class MutationConditionTemperature implements IMutationCondition {
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
EnumTemperature biomeTemperature = climate.getTemperature();
if (biomeTemperature.ordinal() < minTemperature.ordinal()
@@ -55,8 +46,7 @@ public class MutationConditionTemperature implements IMutationCondition {
if (minTemperature != maxTemperature) {
String maxString = AlleleManager.climateHelper.toDisplay(maxTemperature);
- return StringUtil.localize("mutation.condition.temperature.range")
- .replace("%LOW", minString)
+ return StringUtil.localize("mutation.condition.temperature.range").replace("%LOW", minString)
.replace("%HIGH", maxString);
} else {
return StringUtil.localizeAndFormat("mutation.condition.temperature.single", minString);
diff --git a/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java b/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java
index 3658302d0..08c41b7d8 100644
--- a/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java
+++ b/src/main/java/forestry/core/genetics/mutations/MutationConditionTimeLimited.java
@@ -1,23 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the GNU Lesser Public License v3
- * which accompanies this distribution, and is available at
- * http://www.gnu.org/licenses/lgpl-3.0.txt
+ * Copyright (c) 2011-2014 SirSengir. All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the GNU Lesser Public License v3 which accompanies this distribution, and is available
+ * at http://www.gnu.org/licenses/lgpl-3.0.txt
*
- * Various Contributors including, but not limited to:
- * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
+ * Various Contributors including, but not limited to: SirSengir (original work), CovertJaguar, Player, Binnie,
+ * MysteriousAges
******************************************************************************/
package forestry.core.genetics.mutations;
+import java.util.Calendar;
+
+import net.minecraft.world.World;
+
import forestry.api.core.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.StringUtil;
-import java.util.Calendar;
-import net.minecraft.world.World;
public class MutationConditionTimeLimited implements IMutationCondition {
@@ -30,16 +30,8 @@ public class MutationConditionTimeLimited implements IMutationCondition {
}
@Override
- public float getChance(
- World world,
- int x,
- int y,
- int z,
- IAllele allele0,
- IAllele allele1,
- IGenome genome0,
- IGenome genome1,
- IClimateProvider climate) {
+ public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
+ IGenome genome1, IClimateProvider climate) {
DayMonth now = new DayMonth();
// If we are equal to start day, return 1.
@@ -65,8 +57,7 @@ public class MutationConditionTimeLimited implements IMutationCondition {
@Override
public String getDescription() {
- return StringUtil.localize("mutation.condition.date")
- .replace("%START", start.toString())
+ return StringUtil.localize("mutation.condition.date").replace("%START", start.toString())
.replace("%END", end.toString());
}
}
diff --git a/src/main/java/forestry/core/gui/ContainerAlyzer.java b/src/main/java/forestry/core/gui/ContainerAlyzer.java
index 5c724e39b..a47c6b018 100644
--- a/src/main/java/forestry/core/gui/ContainerAlyzer.java
+++ b/src/main/java/forestry/core/gui/ContainerAlyzer.java
@@ -1,8 +1,9 @@
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