Begin code cleanup for generics, types, warnings, nulls, and spelling

This commit is contained in:
mezz committed 2016-02-25 19:11:29 -08:00
1 parent c9b2f7bd3e
commit 406392e7f7
98 files changed
+472 -314

No files matched your search

@@ -20,11 +20,11 @@ public class AlleleManager {
/**
* Translates plain leaf blocks into genetic data. Used by bees and butterflies to convert and pollinate foreign leaf blocks.
*/
public static HashMap<ItemStack, IIndividual> ersatzSpecimen = new HashMap<ItemStack, IIndividual>();
public static HashMap<ItemStack, IIndividual> ersatzSpecimen = new HashMap<>();
/**
* Translates plain saplings into genetic data. Used by the treealyzer and the farm to convert foreign saplings.
*/
public static HashMap<ItemStack, IIndividual> ersatzSaplings = new HashMap<ItemStack, IIndividual>();
public static HashMap<ItemStack, IIndividual> ersatzSaplings = new HashMap<>();
/**
* Queryable instance of an {@link IClimateHelper} for easier implementation.
*/
@@ -20,7 +20,7 @@ public interface IAlleleHandler {
* @param allele
* Allele which was registered.
*/
public void onRegisterAllele(IAllele allele);
void onRegisterAllele(IAllele allele);
/**
* Called when a classification is registered with {@link IAlleleRegistry}.
@@ -28,7 +28,7 @@ public interface IAlleleHandler {
* @param classification
* Classification which was registered.
*/
public void onRegisterClassification(IClassification classification);
void onRegisterClassification(IClassification classification);
/**
* Called when a fruit family is registered with {@link IAlleleRegistry}.
@@ -36,6 +36,5 @@ public interface IAlleleHandler {
* @param family
* Fruit family which was registered.
*/
public void onRegisterFruitFamily(IFruitFamily family);
void onRegisterFruitFamily(IFruitFamily family);
}
@@ -11,6 +11,6 @@ import net.minecraftforge.common.EnumPlantType;
public interface IAllelePlantType extends IAllele {
public EnumSet<EnumPlantType> getPlantTypes();
EnumSet<EnumPlantType> getPlantTypes();
}
@@ -12,19 +12,19 @@ package forestry.api.genetics;
*/
public interface IClassification {
public enum EnumClassLevel {
enum EnumClassLevel {
DOMAIN(0x777fff, true), KINGDOM(0x77c3ff), PHYLUM(0x77ffb6, true), DIVISION(0x77ffb6, true), CLASS(0x7bff77), ORDER(0xbeff77), FAMILY(0xfffd77),
SUBFAMILY(0xfffd77), TRIBE(0xfffd77), GENUS(0xffba77);
private int colour;
private boolean isDroppable;
private final int colour;
private final boolean isDroppable;
private EnumClassLevel(int colour) {
EnumClassLevel(int colour) {
this(colour, false);
}
private EnumClassLevel(int colour, boolean isDroppable) {
EnumClassLevel(int colour, boolean isDroppable) {
this.colour = colour;
this.isDroppable = isDroppable;
}
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.genetics;
import javax.annotation.Nonnull;
import java.util.List;
import forestry.api.core.INBTTagable;
@@ -34,6 +35,7 @@ public interface IIndividual extends INBTTagable {
boolean isSecret();
@Nonnull
IGenome getGenome();
/**