mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-27 23:46:05 +00:00
Fix #272 Fruit Name Issue
This commit is contained in:
1 parent
a0f239bd92
commit
12f4f55799
11 files changed
+938
-603
No files matched your search
@@ -1,507 +1,48 @@
|
||||
package binnie.extratrees.genetics;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleFruit;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpecies;
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.arboriculture.FruitProviderNone;
|
||||
import forestry.arboriculture.genetics.alleles.AlleleTreeSpecies;
|
||||
import forestry.core.genetics.alleles.AlleleCategorized;
|
||||
|
||||
import binnie.core.Constants;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.config.ConfigurationMain;
|
||||
import binnie.extratrees.items.Food;
|
||||
import binnie.extratrees.modules.ModuleCore;
|
||||
import binnie.extratrees.modules.ModuleWood;
|
||||
import binnie.extratrees.wood.FruitPod;
|
||||
public class AlleleETFruit extends AlleleCategorized implements IAlleleFruit {
|
||||
private final IFruitProvider provider;
|
||||
|
||||
public class AlleleETFruit extends AlleleCategorized implements IAlleleFruit, IFruitProvider {
|
||||
public static final AlleleETFruit Blackthorn = new AlleleETFruit("Blackthorn", 10, 7180062, 14561129, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit CherryPlum = new AlleleETFruit("CherryPlum", 10, 7180062, 15211595, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Peach = new AlleleETFruit("Peach", 10, 7180062, 16424995, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Nectarine = new AlleleETFruit("Nectarine", 10, 7180062, 16405795, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Apricot = new AlleleETFruit("Apricot", 10, 7180062, 16437027, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Almond = new AlleleETFruit("Almond", 10, 7180062, 9364342, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit WildCherry = new AlleleETFruit("WildCherry", 10, 7180062, 16711680, FruitSprite.TINY);
|
||||
public static final AlleleETFruit SourCherry = new AlleleETFruit("SourCherry", 10, 7180062, 10225963, FruitSprite.TINY);
|
||||
public static final AlleleETFruit BlackCherry = new AlleleETFruit("BlackCherry", 10, 7180062, 4852249, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Orange = new AlleleETFruit("Orange", 10, 3665987, 16749578, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Manderin = new AlleleETFruit("Manderin", 10, 3665987, 16749578, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Tangerine = new AlleleETFruit("Tangerine", 10, 3665987, 16749578, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Satsuma = new AlleleETFruit("Satsuma", 10, 3665987, 16749578, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit KeyLime = new AlleleETFruit("KeyLime", 10, 3665987, 10223428, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Lime = new AlleleETFruit("Lime", 10, 3665987, 10223428, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit FingerLime = new AlleleETFruit("FingerLime", 10, 3665987, 11156280, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Pomelo = new AlleleETFruit("Pomelo", 10, 3665987, 6083402, FruitSprite.LARGER);
|
||||
public static final AlleleETFruit Grapefruit = new AlleleETFruit("Grapefruit", 10, 3665987, 16749578, FruitSprite.LARGE);
|
||||
public static final AlleleETFruit Kumquat = new AlleleETFruit("Kumquat", 10, 3665987, 16749578, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Citron = new AlleleETFruit("Citron", 10, 3665987, 16772192, FruitSprite.LARGE);
|
||||
public static final AlleleETFruit BuddhaHand = new AlleleETFruit("BuddhaHand", 10, 3665987, 16772192, FruitSprite.LARGE);
|
||||
public static final AlleleETFruit Apple = new AlleleETFruit("Apple", 10, 7915859, 16193046, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Crabapple = new AlleleETFruit("Crabapple", 10, 7915859, 16760140, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Banana = new AlleleETFruit("Banana", FruitPod.BANANA);
|
||||
public static final AlleleETFruit RedBanana = new AlleleETFruit("Red Banana", FruitPod.RED_BANANA);
|
||||
public static final AlleleETFruit Plantain = new AlleleETFruit("Platain", FruitPod.PLANTAIN);
|
||||
public static final AlleleETFruit Hazelnut = new AlleleETFruit("Hazelnut", 7, 8223006, 14463606, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Butternut = new AlleleETFruit("Butternut", 7, 11712336, 16102498, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Beechnut = new AlleleETFruit("Beechnut", 8, 14401148, 6241845, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Pecan = new AlleleETFruit("Pecan", 8, 10660940, 15781769, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit BrazilNut = new AlleleETFruit("BrazilNut", 10, 5875561, 9852208, FruitSprite.LARGE);
|
||||
public static final AlleleETFruit Fig = new AlleleETFruit("Fig", 9, 14201186, 7094086, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Acorn = new AlleleETFruit("Acorn", 6, 7516710, 11364893, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Elderberry = new AlleleETFruit("Elderberry", 9, 7444317, 5331779, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Olive = new AlleleETFruit("Olive", 9, 8887861, 6444842, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit GingkoNut = new AlleleETFruit("GingkoNut", 7, 9213787, 15063725, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Coffee = new AlleleETFruit("Coffee", 8, 7433501, 16273254, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Pear = new AlleleETFruit("Pear", 10, 10456913, 10474833, FruitSprite.PEAR);
|
||||
public static final AlleleETFruit OsangeOsange = new AlleleETFruit("OsangeOsange", 10, 9934674, 10665767, FruitSprite.LARGER);
|
||||
public static final AlleleETFruit Clove = new AlleleETFruit("Clove", 9, 6847532, 11224133, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Coconut = new AlleleETFruit("Coconut", FruitPod.COCONUT);
|
||||
public static final AlleleETFruit Cashew = new AlleleETFruit("Cashew", 8, 12879132, 15289111, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Avacado = new AlleleETFruit("Avacado", 10, 10272370, 2170640, FruitSprite.PEAR);
|
||||
public static final AlleleETFruit Nutmeg = new AlleleETFruit("Nutmeg", 9, 14861101, 11305813, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Allspice = new AlleleETFruit("Allspice", 9, 15180922, 7423542, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Chilli = new AlleleETFruit("Chilli", 10, 7430757, 15145010, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit StarAnise = new AlleleETFruit("StarAnise", 8, 8733742, 13917189, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Mango = new AlleleETFruit("Mango", 10, 6654997, 15902262, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Starfruit = new AlleleETFruit("Starfruit", 10, 9814541, 15061550, FruitSprite.AVERAGE);
|
||||
public static final AlleleETFruit Candlenut = new AlleleETFruit("Candlenut", 8, 8235123, 14600882, FruitSprite.SMALL);
|
||||
public static final AlleleETFruit Papayimar = new AlleleETFruit("Papayimar", FruitPod.PAPAYIMAR);
|
||||
public static final AlleleETFruit Blackcurrant = new AlleleETFruit("Blackcurrant", 8, 9407571, 4935251, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Redcurrant = new AlleleETFruit("Redcurrant", 8, 13008910, 15080974, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Blackberry = new AlleleETFruit("Blackberry", 8, 9399665, 4801393, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Raspberry = new AlleleETFruit("Raspberry", 8, 15520197, 14510449, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Blueberry = new AlleleETFruit("Blueberry", 8, 10203799, 6329278, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Cranberry = new AlleleETFruit("Cranberry", 8, 12232496, 14555696, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Juniper = new AlleleETFruit("Juniper", 8, 10194034, 6316914, FruitSprite.TINY);
|
||||
public static final AlleleETFruit Gooseberry = new AlleleETFruit("Gooseberry", 8, 12164944, 12177232, FruitSprite.TINY);
|
||||
public static final AlleleETFruit GoldenRaspberry = new AlleleETFruit("GoldenRaspberry", 8, 12496955, 15970363, FruitSprite.TINY);
|
||||
@Nullable
|
||||
private static LinkedList<AlleleETFruit> list;
|
||||
@Nullable
|
||||
private IFruitFamily family;
|
||||
private boolean isRipening;
|
||||
private int diffR, diffG, diffB;
|
||||
@Nullable
|
||||
private FruitPod pod;
|
||||
private int ripeningPeriod;
|
||||
private int colourUnripe;
|
||||
private int colour;
|
||||
@Nullable
|
||||
private FruitSprite sprite;
|
||||
private Map<ItemStack, Float> products;
|
||||
|
||||
private AlleleETFruit(String name, int time, int unripe, int colour, FruitSprite sprite) {
|
||||
super(Constants.EXTRA_TREES_MOD_ID, "fruit", name, true);
|
||||
this.isRipening = false;
|
||||
this.diffB = 0;
|
||||
this.pod = null;
|
||||
this.ripeningPeriod = 0;
|
||||
this.products = new HashMap<>();
|
||||
this.colour = colour;
|
||||
this.sprite = sprite;
|
||||
this.setRipening(time, unripe);
|
||||
}
|
||||
|
||||
private AlleleETFruit(String name, FruitPod pod) {
|
||||
super(Constants.EXTRA_TREES_MOD_ID, "fruit", name, true);
|
||||
this.isRipening = false;
|
||||
this.diffB = 0;
|
||||
this.sprite = null;
|
||||
this.products = new HashMap<>();
|
||||
this.pod = pod;
|
||||
this.ripeningPeriod = 2;
|
||||
}
|
||||
|
||||
public static List<AlleleETFruit> values() {
|
||||
if (list == null) {
|
||||
list = new LinkedList<>();
|
||||
for (Field f : AlleleETFruit.class.getFields()) {
|
||||
if (f.getType() == AlleleETFruit.class) {
|
||||
try {
|
||||
list.add((AlleleETFruit) f.get(AlleleETFruit.Acorn));
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
for (final AlleleETFruit fruit : AlleleETFruit.values()) {
|
||||
AlleleManager.alleleRegistry.registerAllele(fruit, EnumTreeChromosome.FRUITS);
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
final IFruitFamily familyPrune = AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes");
|
||||
final IFruitFamily familyPome = AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes");
|
||||
final IFruitFamily familyJungle = AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle");
|
||||
final IFruitFamily familyNuts = AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts");
|
||||
final IFruitFamily familyBerry = ETFruitFamily.Berry;
|
||||
final IFruitFamily familyCitrus = ETFruitFamily.Citrus;
|
||||
AlleleManager.alleleRegistry.registerFruitFamily(familyBerry);
|
||||
AlleleManager.alleleRegistry.registerFruitFamily(familyCitrus);
|
||||
AlleleETFruit.Apple.addProduct(new ItemStack(Items.APPLE), 1.0f);
|
||||
AlleleETFruit.Apple.setFamily(familyPome);
|
||||
AlleleETFruit.Crabapple.addProduct(Food.CRABAPPLE.get(1), 1.0f);
|
||||
AlleleETFruit.Crabapple.setFamily(familyPome);
|
||||
AlleleETFruit.Orange.addProduct(Food.ORANGE.get(1), 1.0f);
|
||||
AlleleETFruit.Orange.setFamily(familyCitrus);
|
||||
AlleleETFruit.Manderin.addProduct(Food.MANDERIN.get(1), 1.0f);
|
||||
AlleleETFruit.Manderin.setFamily(familyCitrus);
|
||||
AlleleETFruit.Tangerine.addProduct(Food.TANGERINE.get(1), 1.0f);
|
||||
AlleleETFruit.Tangerine.setFamily(familyCitrus);
|
||||
AlleleETFruit.Satsuma.addProduct(Food.SATSUMA.get(1), 1.0f);
|
||||
AlleleETFruit.Satsuma.setFamily(familyCitrus);
|
||||
AlleleETFruit.KeyLime.addProduct(Food.KEY_LIME.get(1), 1.0f);
|
||||
AlleleETFruit.KeyLime.setFamily(familyCitrus);
|
||||
AlleleETFruit.Lime.addProduct(Food.LIME.get(1), 1.0f);
|
||||
AlleleETFruit.Lime.setFamily(familyCitrus);
|
||||
AlleleETFruit.FingerLime.addProduct(Food.FINGER_LIME.get(1), 1.0f);
|
||||
AlleleETFruit.FingerLime.setFamily(familyCitrus);
|
||||
AlleleETFruit.Pomelo.addProduct(Food.POMELO.get(1), 1.0f);
|
||||
AlleleETFruit.Pomelo.setFamily(familyCitrus);
|
||||
AlleleETFruit.Grapefruit.addProduct(Food.GRAPEFRUIT.get(1), 1.0f);
|
||||
AlleleETFruit.Grapefruit.setFamily(familyCitrus);
|
||||
AlleleETFruit.Kumquat.addProduct(Food.KUMQUAT.get(1), 1.0f);
|
||||
AlleleETFruit.Kumquat.setFamily(familyCitrus);
|
||||
AlleleETFruit.Citron.addProduct(Food.CITRON.get(1), 1.0f);
|
||||
AlleleETFruit.Citron.setFamily(familyCitrus);
|
||||
AlleleETFruit.BuddhaHand.addProduct(Food.BUDDHA_HAND.get(1), 1.0f);
|
||||
AlleleETFruit.BuddhaHand.setFamily(familyCitrus);
|
||||
AlleleETFruit.Blackthorn.addProduct(Food.Blackthorn.get(1), 1.0f);
|
||||
AlleleETFruit.Blackthorn.setFamily(familyPrune);
|
||||
AlleleETFruit.CherryPlum.addProduct(Food.CHERRY_PLUM.get(1), 1.0f);
|
||||
AlleleETFruit.CherryPlum.setFamily(familyPrune);
|
||||
AlleleETFruit.Peach.addProduct(Food.PEACH.get(1), 1.0f);
|
||||
AlleleETFruit.Peach.setFamily(familyPrune);
|
||||
AlleleETFruit.Nectarine.addProduct(Food.NECTARINE.get(1), 1.0f);
|
||||
AlleleETFruit.Nectarine.setFamily(familyPrune);
|
||||
AlleleETFruit.Apricot.addProduct(Food.APRICOT.get(1), 1.0f);
|
||||
AlleleETFruit.Apricot.setFamily(familyPrune);
|
||||
AlleleETFruit.Almond.addProduct(Food.ALMOND.get(1), 1.0f);
|
||||
AlleleETFruit.Almond.setFamily(familyPrune);
|
||||
AlleleETFruit.WildCherry.addProduct(Food.WILD_CHERRY.get(1), 1.0f);
|
||||
AlleleETFruit.WildCherry.setFamily(familyPrune);
|
||||
AlleleETFruit.SourCherry.addProduct(Food.SOUR_CHERRY.get(1), 1.0f);
|
||||
AlleleETFruit.SourCherry.setFamily(familyPrune);
|
||||
AlleleETFruit.BlackCherry.addProduct(Food.BLACK_CHERRY.get(1), 1.0f);
|
||||
AlleleETFruit.BlackCherry.setFamily(familyPrune);
|
||||
AlleleETFruit.Hazelnut.addProduct(Food.HAZELNUT.get(1), 1.0f);
|
||||
AlleleETFruit.Hazelnut.setFamily(familyNuts);
|
||||
AlleleETFruit.Butternut.addProduct(Food.BUTTERNUT.get(1), 1.0f);
|
||||
AlleleETFruit.Butternut.setFamily(familyNuts);
|
||||
AlleleETFruit.Beechnut.addProduct(Food.BEECHNUT.get(1), 1.0f);
|
||||
AlleleETFruit.Beechnut.setFamily(familyNuts);
|
||||
AlleleETFruit.Pecan.addProduct(Food.PECAN.get(1), 1.0f);
|
||||
AlleleETFruit.Pecan.setFamily(familyNuts);
|
||||
AlleleETFruit.Banana.addProduct(Food.BANANA.get(2), 1.0f);
|
||||
AlleleETFruit.Banana.setFamily(familyJungle);
|
||||
AlleleETFruit.RedBanana.addProduct(Food.RED_BANANA.get(2), 1.0f);
|
||||
AlleleETFruit.RedBanana.setFamily(familyJungle);
|
||||
AlleleETFruit.Plantain.addProduct(Food.PLANTAIN.get(2), 1.0f);
|
||||
AlleleETFruit.Plantain.setFamily(familyJungle);
|
||||
AlleleETFruit.BrazilNut.addProduct(Food.BRAZIL_NUT.get(4), 1.0f);
|
||||
AlleleETFruit.BrazilNut.setFamily(familyNuts);
|
||||
AlleleETFruit.Fig.addProduct(Food.FIG.get(1), 1.0f);
|
||||
AlleleETFruit.Fig.setFamily(familyPrune);
|
||||
AlleleETFruit.Acorn.addProduct(Food.ACORN.get(1), 1.0f);
|
||||
AlleleETFruit.Acorn.setFamily(familyNuts);
|
||||
AlleleETFruit.Elderberry.addProduct(Food.ELDERBERRY.get(1), 1.0f);
|
||||
AlleleETFruit.Elderberry.setFamily(familyPrune);
|
||||
AlleleETFruit.Olive.addProduct(Food.OLIVE.get(1), 1.0f);
|
||||
AlleleETFruit.Olive.setFamily(familyPrune);
|
||||
AlleleETFruit.GingkoNut.addProduct(Food.GINGKO_NUT.get(1), 1.0f);
|
||||
AlleleETFruit.GingkoNut.setFamily(familyNuts);
|
||||
AlleleETFruit.Coffee.addProduct(Food.COFFEE.get(1), 1.0f);
|
||||
AlleleETFruit.Coffee.setFamily(familyJungle);
|
||||
AlleleETFruit.Pear.addProduct(Food.PEAR.get(1), 1.0f);
|
||||
AlleleETFruit.Pear.setFamily(familyPome);
|
||||
AlleleETFruit.OsangeOsange.addProduct(Food.OSANGE_ORANGE.get(1), 1.0f);
|
||||
AlleleETFruit.OsangeOsange.setFamily(familyPome);
|
||||
AlleleETFruit.Clove.addProduct(Food.CLOVE.get(1), 1.0f);
|
||||
AlleleETFruit.Clove.setFamily(familyNuts);
|
||||
AlleleETFruit.Blackcurrant.addProduct(Food.BLACKCURRANT.get(2), 1.0f);
|
||||
AlleleETFruit.Blackcurrant.setFamily(familyBerry);
|
||||
AlleleETFruit.Redcurrant.addProduct(Food.REDCURRANT.get(2), 1.0f);
|
||||
AlleleETFruit.Redcurrant.setFamily(familyBerry);
|
||||
AlleleETFruit.Blackberry.addProduct(Food.BLACKBERRY.get(2), 1.0f);
|
||||
AlleleETFruit.Blackberry.setFamily(familyBerry);
|
||||
AlleleETFruit.Raspberry.addProduct(Food.RASPBERRY.get(2), 1.0f);
|
||||
AlleleETFruit.Raspberry.setFamily(familyBerry);
|
||||
AlleleETFruit.Blueberry.addProduct(Food.BLUEBERRY.get(2), 1.0f);
|
||||
AlleleETFruit.Blueberry.setFamily(familyBerry);
|
||||
AlleleETFruit.Cranberry.addProduct(Food.CRANBERRY.get(2), 1.0f);
|
||||
AlleleETFruit.Cranberry.setFamily(familyBerry);
|
||||
AlleleETFruit.Juniper.addProduct(Food.JUNIPER.get(2), 1.0f);
|
||||
AlleleETFruit.Juniper.setFamily(familyBerry);
|
||||
AlleleETFruit.Gooseberry.addProduct(Food.GOOSEBERRY.get(2), 1.0f);
|
||||
AlleleETFruit.Gooseberry.setFamily(familyBerry);
|
||||
AlleleETFruit.GoldenRaspberry.addProduct(Food.GOLDEN_RASPBERRY.get(2), 1.0f);
|
||||
AlleleETFruit.GoldenRaspberry.setFamily(familyBerry);
|
||||
AlleleETFruit.Coconut.addProduct(Food.COCONUT.get(1), 1.0f);
|
||||
AlleleETFruit.Coconut.setFamily(familyJungle);
|
||||
AlleleETFruit.Cashew.addProduct(Food.CASHEW.get(1), 1.0f);
|
||||
AlleleETFruit.Cashew.setFamily(familyJungle);
|
||||
AlleleETFruit.Avacado.addProduct(Food.AVACADO.get(1), 1.0f);
|
||||
AlleleETFruit.Avacado.setFamily(familyJungle);
|
||||
AlleleETFruit.Nutmeg.addProduct(Food.NUTMEG.get(1), 1.0f);
|
||||
AlleleETFruit.Nutmeg.setFamily(familyJungle);
|
||||
AlleleETFruit.Allspice.addProduct(Food.ALLSPICE.get(1), 1.0f);
|
||||
AlleleETFruit.Allspice.setFamily(familyJungle);
|
||||
AlleleETFruit.Chilli.addProduct(Food.CHILLI.get(1), 1.0f);
|
||||
AlleleETFruit.Chilli.setFamily(familyJungle);
|
||||
AlleleETFruit.StarAnise.addProduct(Food.STAR_ANISE.get(1), 1.0f);
|
||||
AlleleETFruit.StarAnise.setFamily(familyJungle);
|
||||
AlleleETFruit.Mango.addProduct(Food.MANGO.get(1), 1.0f);
|
||||
AlleleETFruit.Mango.setFamily(familyPome);
|
||||
AlleleETFruit.Starfruit.addProduct(Food.STARFRUIT.get(1), 1.0f);
|
||||
AlleleETFruit.Starfruit.setFamily(familyJungle);
|
||||
AlleleETFruit.Candlenut.addProduct(Food.CANDLENUT.get(1), 1.0f);
|
||||
AlleleETFruit.Candlenut.setFamily(familyJungle);
|
||||
if (ConfigurationMain.alterLemon) {
|
||||
try {
|
||||
final IAlleleFruit lemon = (IAlleleFruit) AlleleManager.alleleRegistry.getAllele("forestry.fruitLemon");
|
||||
final FruitProviderNone prov = (FruitProviderNone) lemon.getProvider();
|
||||
final Field f = FruitProviderNone.class.getDeclaredField("family");
|
||||
final Field modifiersField = Field.class.getDeclaredField("modifiers");
|
||||
f.setAccessible(true);
|
||||
modifiersField.setAccessible(true);
|
||||
modifiersField.setInt(f, f.getModifiers() & 0xFFFFFFEF);
|
||||
f.set(prov, familyCitrus);
|
||||
} catch (IllegalAccessException | NoSuchFieldException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
for (final IAlleleSpecies tree : ModuleWood.treeBreedingSystem.getAllSpecies()) {
|
||||
if (tree instanceof AlleleTreeSpecies && ((IAlleleTreeSpecies) tree).getSuitableFruit().contains(familyPrune)) {
|
||||
((AlleleTreeSpecies) tree).addFruitFamily(familyCitrus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setRipening(int time, int unripe) {
|
||||
this.ripeningPeriod = time;
|
||||
this.colourUnripe = unripe;
|
||||
this.isRipening = true;
|
||||
this.diffR = (this.colour >> 16 & 0xFF) - (unripe >> 16 & 0xFF);
|
||||
this.diffG = (this.colour >> 8 & 0xFF) - (unripe >> 8 & 0xFF);
|
||||
this.diffB = (this.colour & 0xFF) - (unripe & 0xFF);
|
||||
}
|
||||
|
||||
public void addProduct(ItemStack product, float chance) {
|
||||
this.products.put(product, chance);
|
||||
public AlleleETFruit(String name, IFruitProvider provider) {
|
||||
super(binnie.core.Constants.EXTRA_TREES_MOD_ID, "fruit", name, true);
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFruitProvider getProvider() {
|
||||
return this;
|
||||
return this.provider;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites() {
|
||||
if (this == Apple) {
|
||||
for (FruitSprite sprite : FruitSprite.VALUES) {
|
||||
sprite.registerSprites();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ResourceLocation getSprite(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) {
|
||||
if (sprite != null) {
|
||||
return sprite.getLocation();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
public String getName() {
|
||||
return getProvider().getDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(IAlleleFruit o) {
|
||||
return o == this ? 0 : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<ItemStack, Float> getSpecialty() {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDecorativeColor() {
|
||||
return getColour(1.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean trySpawnFruitBlock(ITreeGenome genome, World world, Random rand, BlockPos pos) {
|
||||
return this.pod != null &&
|
||||
world.rand.nextFloat() <= genome.getSappiness() &&
|
||||
TreeManager.treeRoot.setFruitBlock(world, genome, this, genome.getSappiness(), pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NonNullList<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime) {
|
||||
NonNullList<ItemStack> products = NonNullList.create();
|
||||
if (this.pod != null) {
|
||||
if (ripeningTime >= 2) {
|
||||
for (Map.Entry<ItemStack, Float> product : this.products.entrySet()) {
|
||||
ItemStack single = product.getKey().copy();
|
||||
single.setCount(1);
|
||||
for (int i = 0; i < product.getKey().getCount(); ++i) {
|
||||
if (world.rand.nextFloat() <= product.getValue()) {
|
||||
products.add(single.copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
float stage = this.getRipeningStage(ripeningTime);
|
||||
if (stage >= 0.5f) {
|
||||
float modeYieldMod = 1.0f;
|
||||
for (final Map.Entry<ItemStack, Float> product : this.products.entrySet()) {
|
||||
if (world.rand.nextFloat() <= genome.getYield() * modeYieldMod * product.getValue() * 5.0f * stage) {
|
||||
products.add(product.getKey().copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return products;
|
||||
public String getAlleleName() {
|
||||
return getProvider().getDescription();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getModelName() {
|
||||
if (pod != null) {
|
||||
return pod.getModelName();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return getProvider().getModelName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFruitLeaf(ITreeGenome genome, World world, BlockPos pos) {
|
||||
return sprite != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModID() {
|
||||
return Constants.EXTRA_TREES_MOD_ID;
|
||||
return getProvider().getModID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColour(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) {
|
||||
if (!this.isRipening) {
|
||||
return this.colour;
|
||||
}
|
||||
float stage = getRipeningStage(ripeningTime);
|
||||
return getColour(stage);
|
||||
}
|
||||
|
||||
private int getColour(float stage) {
|
||||
final int r = (this.colourUnripe >> 16 & 0xFF) + (int) (this.diffR * stage);
|
||||
final int g = (this.colourUnripe >> 8 & 0xFF) + (int) (this.diffG * stage);
|
||||
final int b = (this.colourUnripe & 0xFF) + (int) (this.diffB * stage);
|
||||
return (r & 0xFF) << 16 | (g & 0xFF) << 8 | (b & 0xFF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return I18N.localise("extratrees.item.food." + this.getClass().getTypeName().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFruitFamily getFamily() {
|
||||
Preconditions.checkState(this.family != null, "Family has not been set.");
|
||||
return this.family;
|
||||
}
|
||||
|
||||
private void setFamily(IFruitFamily family) {
|
||||
this.family = family;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRipeningPeriod() {
|
||||
return this.ripeningPeriod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<ItemStack, Float> getProducts() {
|
||||
return products;
|
||||
}
|
||||
|
||||
private float getRipeningStage(final int ripeningTime) {
|
||||
if (ripeningTime >= this.ripeningPeriod) {
|
||||
return 1.0f;
|
||||
}
|
||||
return ripeningTime / this.ripeningPeriod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean requiresFruitBlocks() {
|
||||
return this.pod != null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ResourceLocation getDecorativeSprite() {
|
||||
if (sprite != null) {
|
||||
return sprite.getLocation();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.getDescription();
|
||||
}
|
||||
|
||||
public String getNameOfFruit() {
|
||||
if (this == AlleleETFruit.Apple) {
|
||||
return "Apple";
|
||||
}
|
||||
for (final ItemStack stack : this.products.keySet()) {
|
||||
if (stack.getItem() == ModuleCore.itemFood) {
|
||||
return Food.values()[stack.getItemDamage()].toString();
|
||||
}
|
||||
}
|
||||
return "NoFruit";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return this.getUID();
|
||||
public int compareTo(IAlleleFruit o) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
package binnie.extratrees.genetics;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleFruit;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpecies;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.arboriculture.FruitProviderNone;
|
||||
import forestry.arboriculture.genetics.alleles.AlleleTreeSpecies;
|
||||
|
||||
import binnie.extratrees.config.ConfigurationMain;
|
||||
import binnie.extratrees.genetics.fruits.ETFruitProviderNone;
|
||||
import binnie.extratrees.genetics.fruits.ETFruitProviderPod;
|
||||
import binnie.extratrees.genetics.fruits.ETFruitProviderRipening;
|
||||
import binnie.extratrees.genetics.fruits.FruitPod;
|
||||
import binnie.extratrees.genetics.fruits.FruitSprite;
|
||||
import binnie.extratrees.items.Food;
|
||||
import binnie.extratrees.modules.ModuleWood;
|
||||
import static binnie.extratrees.genetics.fruits.ETFruitFamily.BERRY;
|
||||
import static binnie.extratrees.genetics.fruits.ETFruitFamily.CITRUS;
|
||||
import static forestry.api.arboriculture.EnumFruitFamily.JUNGLE;
|
||||
import static forestry.api.arboriculture.EnumFruitFamily.NUX;
|
||||
import static forestry.api.arboriculture.EnumFruitFamily.POMES;
|
||||
import static forestry.api.arboriculture.EnumFruitFamily.PRUNES;
|
||||
|
||||
public enum AlleleETFruitDefinition {
|
||||
Blackthorn("blackthorn", 10, 7180062, 14561129, FruitSprite.SMALL, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.Blackthorn.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
CherryPlum("cherry_plum", 10, 7180062, 15211595, FruitSprite.SMALL, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CHERRY_PLUM.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Peach("peach", 10, 7180062, 16424995, FruitSprite.AVERAGE, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.PEACH.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Nectarine("nectarine", 10, 7180062, 16405795, FruitSprite.AVERAGE, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.NECTARINE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Apricot("apricot", 10, 7180062, 16437027, FruitSprite.AVERAGE, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.APRICOT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Almond("almond", 10, 7180062, 9364342, FruitSprite.SMALL, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.ALMOND.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
WildCherry("wild_cherry", 10, 7180062, 16711680, FruitSprite.TINY, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.WILD_CHERRY.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
SourCherry("sour_cherry", 10, 7180062, 10225963, FruitSprite.TINY, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.SOUR_CHERRY.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
BlackCherry("black_cherry", 10, 7180062, 4852249, FruitSprite.TINY, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BLACK_CHERRY.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Fig("fig", 9, 14201186, 7094086, FruitSprite.SMALL, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.FIG.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Elderberry("elderberry", 9, 7444317, 5331779, FruitSprite.TINY, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.ELDERBERRY.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Olive("olive", 9, 8887861, 6444842, FruitSprite.SMALL, PRUNES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.OLIVE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Orange("orange", 10, 3665987, 16749578, FruitSprite.AVERAGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.ORANGE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Manderin("manderin", 10, 3665987, 16749578, FruitSprite.AVERAGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.MANDERIN.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Tangerine("tangerine", 10, 3665987, 16749578, FruitSprite.AVERAGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.TANGERINE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Satsuma("satsuma", 10, 3665987, 16749578, FruitSprite.AVERAGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.SATSUMA.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
KeyLime("key_lime", 10, 3665987, 10223428, FruitSprite.SMALL, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.KEY_LIME.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Lime("lime", 10, 3665987, 10223428, FruitSprite.AVERAGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.LIME.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
FingerLime("finger_lime", 10, 3665987, 11156280, FruitSprite.SMALL, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.FINGER_LIME.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Pomelo("pomelo", 10, 3665987, 6083402, FruitSprite.LARGER, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.POMELO.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Grapefruit("grapefruit", 10, 3665987, 16749578, FruitSprite.LARGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.GRAPEFRUIT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Kumquat("kumquat", 10, 3665987, 16749578, FruitSprite.SMALL, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.KUMQUAT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Citron("citron", 10, 3665987, 16772192, FruitSprite.LARGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CITRON.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
BuddhaHand("buddha_hand", 10, 3665987, 16772192, FruitSprite.LARGE, CITRUS){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BUDDHA_HAND.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Apple("apple", 10, 7915859, 16193046, FruitSprite.AVERAGE, POMES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(new ItemStack(Items.APPLE), 1.0f);
|
||||
}
|
||||
},
|
||||
Crabapple("crabapple", 10, 7915859, 16760140, FruitSprite.AVERAGE, POMES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CRABAPPLE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Mango("mango", 10, 6654997, 15902262, FruitSprite.AVERAGE, POMES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.MANGO.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Pear("pear", 10, 10456913, 10474833, FruitSprite.PEAR, POMES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.PEAR.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
OsangeOsange("osange_osange", 10, 9934674, 10665767, FruitSprite.LARGER, POMES){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.OSANGE_ORANGE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Banana("banana", FruitPod.BANANA, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BANANA.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
RedBanana("red_banana", FruitPod.RED_BANANA, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.RED_BANANA.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Plantain("platain", FruitPod.PLANTAIN, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.PLANTAIN.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Coffee("coffee", 8, 7433501, 16273254, FruitSprite.TINY, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.COFFEE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Coconut("coconut", FruitPod.COCONUT, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.COCONUT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Cashew("cashew", 8, 12879132, 15289111, FruitSprite.AVERAGE, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CASHEW.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Avacado("avacado", 10, 10272370, 2170640, FruitSprite.PEAR, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.AVACADO.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Nutmeg("nutmeg", 9, 14861101, 11305813, FruitSprite.TINY, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.NUTMEG.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Allspice("allspice", 9, 15180922, 7423542, FruitSprite.TINY, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.ALLSPICE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Chilli("chilli", 10, 7430757, 15145010, FruitSprite.SMALL, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CHILLI.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
StarAnise("star_anise", 8, 8733742, 13917189, FruitSprite.TINY, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.STAR_ANISE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Starfruit("starfruit", 10, 9814541, 15061550, FruitSprite.AVERAGE, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.STARFRUIT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Candlenut("candlenut", 8, 8235123, 14600882, FruitSprite.SMALL, JUNGLE){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CANDLENUT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Hazelnut("hazelnut", 7, 8223006, 14463606, FruitSprite.SMALL, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.HAZELNUT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Butternut("butternut", 7, 11712336, 16102498, FruitSprite.SMALL, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BUTTERNUT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Beechnut("beechnut", 8, 14401148, 6241845, FruitSprite.TINY, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BEECHNUT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Pecan("pecan", 8, 10660940, 15781769, FruitSprite.SMALL, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.PECAN.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
BrazilNut("brazil_nut", 10, 5875561, 9852208, FruitSprite.LARGE, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BRAZIL_NUT.get(4), 1.0f);
|
||||
}
|
||||
},
|
||||
Acorn("acorn", 6, 7516710, 11364893, FruitSprite.TINY, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.ACORN.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
GingkoNut("gingko_nut", 7, 9213787, 15063725, FruitSprite.TINY, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.GINGKO_NUT.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Clove("clove", 9, 6847532, 11224133, FruitSprite.TINY, NUX){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CLOVE.get(1), 1.0f);
|
||||
}
|
||||
},
|
||||
Blackcurrant("blackcurrant", 8, 9407571, 4935251, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BLACKCURRANT.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Redcurrant("redcurrant", 8, 13008910, 15080974, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.REDCURRANT.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Blackberry("blackberry", 8, 9399665, 4801393, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BLACKBERRY.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Raspberry("raspberry", 8, 15520197, 14510449, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.RASPBERRY.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Blueberry("blueberry", 8, 10203799, 6329278, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.BLUEBERRY.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Cranberry("cranberry", 8, 12232496, 14555696, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.CRANBERRY.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Juniper("juniper", 8, 10194034, 6316914, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.JUNIPER.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
Gooseberry("gooseberry", 8, 12164944, 12177232, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.GOOSEBERRY.get(2), 1.0f);
|
||||
}
|
||||
},
|
||||
GoldenRaspberry("golden_raspberry", 8, 12496955, 15970363, FruitSprite.TINY, BERRY){
|
||||
@Override
|
||||
protected void addProducts() {
|
||||
addProduct(Food.GOLDEN_RASPBERRY.get(2), 1.0f);
|
||||
}
|
||||
}
|
||||
// , Papayimar("papayimar", FruitPod.PAPAYIMAR)
|
||||
;
|
||||
|
||||
IAlleleFruit alleleFruit;
|
||||
ETFruitProviderNone fruitProvider;
|
||||
|
||||
AlleleETFruitDefinition(String name, int time, int unripe, int color, FruitSprite sprite, IFruitFamily family) {
|
||||
alleleFruit = new AlleleETFruit(name, fruitProvider = new ETFruitProviderRipening(name, family, sprite).setColours(new Color(color), new Color(unripe)).setRipeningPeriod(time));
|
||||
}
|
||||
|
||||
AlleleETFruitDefinition(String name, FruitPod fruitPod, IFruitFamily family) {
|
||||
alleleFruit = new AlleleETFruit(name, fruitProvider = new ETFruitProviderPod(name, family, fruitPod));
|
||||
}
|
||||
|
||||
public static void preInit(){
|
||||
for (AlleleETFruitDefinition definition : values()) {
|
||||
AlleleManager.alleleRegistry.registerAllele(definition.alleleFruit, EnumTreeChromosome.FRUITS);
|
||||
}
|
||||
}
|
||||
|
||||
public static void init(){
|
||||
for(AlleleETFruitDefinition definition : values()){
|
||||
definition.addProducts();
|
||||
}
|
||||
|
||||
AlleleManager.alleleRegistry.registerFruitFamily(BERRY);
|
||||
AlleleManager.alleleRegistry.registerFruitFamily(CITRUS);
|
||||
|
||||
if (ConfigurationMain.alterLemon) {
|
||||
try {
|
||||
final IAlleleFruit lemon = (IAlleleFruit) AlleleManager.alleleRegistry.getAllele("forestry.fruitLemon");
|
||||
final FruitProviderNone prov = (FruitProviderNone) lemon.getProvider();
|
||||
final Field familyField = FruitProviderNone.class.getDeclaredField("family");
|
||||
final Field modifiersField = Field.class.getDeclaredField("modifiers");
|
||||
familyField.setAccessible(true);
|
||||
modifiersField.setAccessible(true);
|
||||
modifiersField.setInt(familyField, familyField.getModifiers() & 0xFFFFFFEF);
|
||||
familyField.set(prov, CITRUS);
|
||||
} catch (IllegalAccessException | NoSuchFieldException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
for (IAlleleSpecies tree : ModuleWood.treeBreedingSystem.getAllSpecies()) {
|
||||
if (tree instanceof AlleleTreeSpecies && ((IAlleleTreeSpecies) tree).getSuitableFruit().contains(PRUNES)) {
|
||||
((AlleleTreeSpecies) tree).addFruitFamily(CITRUS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void addProducts(){
|
||||
}
|
||||
|
||||
protected void addProduct(ItemStack product, float chance){
|
||||
fruitProvider.addDrop(product, chance);
|
||||
}
|
||||
|
||||
public IAlleleFruit getAllele() {
|
||||
return alleleFruit;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package binnie.extratrees.genetics;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.awt.Color;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
@@ -55,8 +56,6 @@ import forestry.core.tiles.TileUtil;
|
||||
|
||||
import binnie.core.Constants;
|
||||
import binnie.core.genetics.ForestryAllele;
|
||||
import binnie.extratrees.wood.EnumETLog;
|
||||
import binnie.extratrees.wood.EnumShrubLog;
|
||||
import binnie.extratrees.gen.WorldGenAlder;
|
||||
import binnie.extratrees.gen.WorldGenApple;
|
||||
import binnie.extratrees.gen.WorldGenAsh;
|
||||
@@ -78,8 +77,9 @@ import binnie.extratrees.gen.WorldGenTree2;
|
||||
import binnie.extratrees.gen.WorldGenTree3;
|
||||
import binnie.extratrees.gen.WorldGenTropical;
|
||||
import binnie.extratrees.gen.WorldGenWalnut;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import binnie.extratrees.genetics.fruits.ETFruitFamily;
|
||||
import binnie.extratrees.wood.EnumETLog;
|
||||
import binnie.extratrees.wood.EnumShrubLog;
|
||||
|
||||
public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, ITreeGenerator {
|
||||
OrchardApple("malus", "domestica", EnumLeafType.DECIDUOUS, new Color(0x09E67E), new Color(0xFF9CF3), EnumSaplingType.Default, EnumETLog.Apple, new Color(0x7B7A7B)) {
|
||||
@@ -90,7 +90,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Apple);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Apple.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Higher.getAllele());
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
SweetCrabapple("malus", "coronaria", EnumLeafType.DECIDUOUS, new Color(0x7A9953), new Color(0xFC359F), EnumSaplingType.Default, EnumETLog.Apple, new Color(0x7B7A7B)) {
|
||||
@@ -109,7 +109,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Crabapple);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Crabapple.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());
|
||||
@@ -119,7 +119,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
FloweringCrabapple("malus", "hopa", EnumLeafType.DECIDUOUS, new Color(0x7A9953), new Color(0xFC359F), EnumSaplingType.Default, EnumETLog.Apple, new Color(0x7B7A7B)) {
|
||||
@@ -130,7 +130,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Crabapple);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Crabapple.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -141,7 +141,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
PrairieCrabapple("malus", "ioensis", EnumLeafType.DECIDUOUS, new Color(0x7A9953), new Color(0xFC359F), EnumSaplingType.Default, EnumETLog.Apple, new Color(0x7B7A7B)) {
|
||||
@@ -152,7 +152,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Crabapple);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Crabapple.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -163,7 +163,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Blackthorn("prunus", "spinosa", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF87C7), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661)) {
|
||||
@@ -174,7 +174,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Blackthorn);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Blackthorn.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele());
|
||||
@@ -185,7 +185,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
CherryPlum("prunus", "cerasifera", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF87C7), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661)) {
|
||||
@@ -196,7 +196,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.CherryPlum);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.CherryPlum.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele());
|
||||
@@ -207,7 +207,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Peach("prunus", "persica", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF269A), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661)) {
|
||||
@@ -218,7 +218,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Peach);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Peach.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -229,7 +229,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Nectarine("prunus", "nectarina", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF269A), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661)) {
|
||||
@@ -240,7 +240,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Nectarine);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Nectarine.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele());
|
||||
@@ -250,7 +250,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Apricot("prunus", "armeniaca", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xF5B8D8), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661)) {
|
||||
@@ -261,7 +261,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Apricot);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Apricot.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele());
|
||||
@@ -271,7 +271,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Almond("prunus", "amygdalus", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xF584C0), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661)) {
|
||||
@@ -282,7 +282,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Almond);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Almond.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());
|
||||
@@ -292,7 +292,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
WildCherry("prunus", "avium", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xF7EBF6), EnumSaplingType.Fruit, EnumETLog.Cherry, new Color(0x716850)) {
|
||||
@@ -303,7 +303,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.WildCherry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.WildCherry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
@@ -315,7 +315,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
species.setTemperature(EnumTemperature.NORMAL);
|
||||
species.setRarity(0.0015F);
|
||||
}
|
||||
@@ -328,7 +328,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.SourCherry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.SourCherry.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
}
|
||||
@@ -337,7 +337,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
BlackCherry("prunus", "serotina", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFAE1F8), EnumSaplingType.Fruit, EnumETLog.Cherry, new Color(0x716850)) {
|
||||
@@ -348,7 +348,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.BlackCherry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.BlackCherry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -360,7 +360,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Orange("citrus", "sinensis", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -371,7 +371,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Orange);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Orange.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele());
|
||||
@@ -382,7 +382,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Manderin("citrus", "reticulata", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -393,7 +393,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Manderin);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Manderin.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
@@ -404,7 +404,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Satsuma("citrus", "unshiu", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -415,7 +415,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Satsuma);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Satsuma.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -426,7 +426,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Tangerine("citrus", "tangerina", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -437,7 +437,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Tangerine);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Tangerine.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -449,7 +449,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Lime("citrus", "latifolia", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -460,7 +460,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Lime);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Lime.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -470,7 +470,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
KeyLime("citrus", "aurantifolia", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -481,7 +481,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.KeyLime);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.KeyLime.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -493,7 +493,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
FingerLime("citrus", "australasica", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -504,7 +504,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.FingerLime);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.FingerLime.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -515,7 +515,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Pomelo("citrus", "maxima", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -526,7 +526,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Pomelo);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Pomelo.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -537,7 +537,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Grapefruit("citrus", "paradisi", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -548,7 +548,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Grapefruit);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Grapefruit.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -560,7 +560,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Kumquat("citrus", "margarita", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -571,7 +571,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Kumquat);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Kumquat.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -581,7 +581,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Citron("citrus", "medica", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -592,7 +592,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Citron);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Citron.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele());
|
||||
@@ -602,7 +602,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
BuddhaHand("citrus", "sarcodactylus", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39)) {
|
||||
@@ -613,7 +613,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.BuddhaHand);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.BuddhaHand.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
}
|
||||
@@ -622,7 +622,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Banana("musa", "sinensis", EnumLeafType.PALM, new Color(0xA1CD8E), new Color(0x44E500), EnumSaplingType.Default, EnumETLog.Banana, new Color(0x85924F)) {
|
||||
@@ -633,7 +633,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Banana);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Banana.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());
|
||||
@@ -653,7 +653,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.RedBanana);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.RedBanana.getAllele());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -670,7 +670,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Plantain);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Plantain.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
}
|
||||
@@ -689,7 +689,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Butternut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Butternut.getAllele());
|
||||
template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
@@ -700,7 +700,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Rowan("sorbus", "aucuparia", EnumLeafType.DECIDUOUS, new Color(0x9EC79B), new Color(0x9EE8B2), EnumSaplingType.Default, EnumETLog.Rowan, new Color(0xB6B09B)) {
|
||||
@@ -719,7 +719,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
@Override
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
}
|
||||
},
|
||||
Hemlock("tsuga", "heterophylla", EnumLeafType.CONIFERS, new Color(0x5CAC72), new Color(0x5CD172), EnumSaplingType.Default, EnumETLog.Hemlock, new Color(0xADA39B)) {
|
||||
@@ -753,7 +753,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Alder("alnus", "glutinosa", EnumLeafType.DECIDUOUS, new Color(0x698A33), new Color(0x69AE33), EnumSaplingType.Default, EnumETLog.Alder, new Color(0xC6C0B8)) {
|
||||
@@ -783,7 +783,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Beechnut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Beechnut.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
}
|
||||
@@ -802,7 +802,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Beechnut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Beechnut.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele());
|
||||
}
|
||||
|
||||
@@ -878,7 +878,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Hazelnut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Hazelnut.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
@@ -899,7 +899,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Fig);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Fig.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
}
|
||||
@@ -908,7 +908,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Whitebeam("sorbus", "aria", EnumLeafType.DECIDUOUS, new Color(0xBACE99), new Color(0x72863F), EnumSaplingType.Default, EnumETLog.Whitebeam, new Color(0x786A6D)) {
|
||||
@@ -953,7 +953,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Pecan);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Pecan.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele());
|
||||
@@ -964,7 +964,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Elm("ulmus", "procera", EnumLeafType.DECIDUOUS, new Color(0x7C9048), new Color(0x7CBE48), EnumSaplingType.Default, EnumETLog.Elm, new Color(0x848386)) {
|
||||
@@ -994,7 +994,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Elderberry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Elderberry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
}
|
||||
@@ -1003,8 +1003,8 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Holly("ilex", "aquifolium", EnumLeafType.DECIDUOUS, new Color(0x254B4C), new Color(0x6E9284), EnumSaplingType.Default, EnumETLog.Holly, new Color(0xB5AA85)) {
|
||||
@@ -1023,7 +1023,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Hornbeam("carpinus", "betulus", EnumLeafType.DECIDUOUS, new Color(0x96A71B), new Color(0x96DD1B), EnumSaplingType.Default, EnumETLog.Hornbeam, new Color(0xA39276)) {
|
||||
@@ -1062,7 +1062,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
AcornOak("quercus", "robur", EnumLeafType.DECIDUOUS, new Color(0x66733E), new Color(0x9EA231), EnumSaplingType.Default, EnumVanillaWoodType.OAK, new Color(0x614D30)) {
|
||||
@@ -1073,7 +1073,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Acorn);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Acorn.getAllele());
|
||||
template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
@@ -1122,7 +1122,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Olive);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Olive.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
}
|
||||
|
||||
@@ -1130,7 +1130,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
RedMaple("acer", "ubrum", EnumLeafType.MAPLE, new Color(0xE82E17), new Color(0xE82E17), EnumSaplingType.Default, EnumForestryWoodType.MAPLE, new Color(0x8A8781)) {
|
||||
@@ -1149,7 +1149,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
BalsamFir("abies", "balsamea", EnumLeafType.CONIFERS, new Color(0x74A07C), new Color(0x74A07C), EnumSaplingType.Default, EnumETLog.Fir, new Color(0x828382)) {
|
||||
@@ -1212,7 +1212,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Pear("pyrus", "communis", EnumLeafType.DECIDUOUS, new Color(0x5E8826), new Color(0x5E8826), EnumSaplingType.Default, EnumETLog.Pear, new Color(0xA89779)) {
|
||||
@@ -1223,7 +1223,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Pear);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Pear.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
@@ -1235,7 +1235,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
OsangeOrange("maclura", "pomifera", EnumLeafType.JUNGLE, new Color(0x687A50), new Color(0x687A50), EnumSaplingType.Default, EnumETLog.Maclura, new Color(0x8B5734)) {
|
||||
@@ -1246,7 +1246,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.OsangeOsange);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.OsangeOsange.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
}
|
||||
|
||||
@@ -1255,7 +1255,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
OldFustic("maclura", "tinctoria", EnumLeafType.JUNGLE, new Color(0x687A50), new Color(0x687A50), EnumSaplingType.Default, EnumETLog.Maclura, new Color(0x8B5734)) {
|
||||
@@ -1372,7 +1372,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.GingkoNut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.GingkoNut.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -1392,7 +1392,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.BrazilNut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.BrazilNut.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Larger.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -1460,7 +1460,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Clove("syzygium", "aromaticum", EnumLeafType.DECIDUOUS, new Color(0x7A821F), new Color(0x7A821F), EnumSaplingType.Default, EnumETLog.Syzgium, new Color(0xAB6F57)) {
|
||||
@@ -1471,7 +1471,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Clove);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Clove.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
@@ -1493,7 +1493,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Coffee);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Coffee.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());
|
||||
@@ -1568,7 +1568,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Blackcurrant);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Blackcurrant.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -1580,7 +1580,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.setRarity(0.0025F);
|
||||
species.setGrowthProvider(new ClimateGrowthProvider(EnumTemperature.NORMAL, EnumTolerance.BOTH_1, EnumHumidity.NORMAL, EnumTolerance.NONE));
|
||||
}
|
||||
@@ -1593,7 +1593,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Redcurrant);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Redcurrant.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -1605,7 +1605,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.setRarity(0.0025F);
|
||||
species.setGrowthProvider(new ClimateGrowthProvider(EnumTemperature.NORMAL, EnumTolerance.BOTH_1, EnumHumidity.NORMAL, EnumTolerance.NONE));
|
||||
}
|
||||
@@ -1618,7 +1618,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Blackberry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Blackberry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
@@ -1629,7 +1629,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
}
|
||||
},
|
||||
Raspberry("rubus", "idaeus", EnumLeafType.DECIDUOUS, new Color(0x83B96E), new Color(0x83B96E), EnumSaplingType.Shrub, EnumShrubLog.INSTANCE, new Color(0xFFFFFF)) {
|
||||
@@ -1640,7 +1640,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Raspberry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Raspberry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -1652,7 +1652,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.setRarity(0.0025F);
|
||||
species.setGrowthProvider(new ClimateGrowthProvider(EnumTemperature.NORMAL, EnumTolerance.BOTH_1, EnumHumidity.NORMAL, EnumTolerance.NONE));
|
||||
}
|
||||
@@ -1665,7 +1665,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Blueberry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Blueberry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -1677,7 +1677,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.setRarity(0.0025F);
|
||||
species.setGrowthProvider(new ClimateGrowthProvider(EnumTemperature.NORMAL, EnumTolerance.BOTH_1, EnumHumidity.NORMAL, EnumTolerance.NONE));
|
||||
}
|
||||
@@ -1690,7 +1690,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Cranberry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Cranberry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
@@ -1702,7 +1702,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.setRarity(0.0025F);
|
||||
species.setGrowthProvider(new ClimateGrowthProvider(EnumTemperature.NORMAL, EnumTolerance.BOTH_1, EnumHumidity.NORMAL, EnumTolerance.NONE));
|
||||
}
|
||||
@@ -1715,7 +1715,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Juniper);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Juniper.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
@@ -1727,7 +1727,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.setRarity(0.0025F);
|
||||
species.setGrowthProvider(new ClimateGrowthProvider(EnumTemperature.NORMAL, EnumTolerance.BOTH_1, EnumHumidity.NORMAL, EnumTolerance.NONE));
|
||||
}
|
||||
@@ -1740,7 +1740,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Gooseberry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Gooseberry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.High.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
@@ -1751,7 +1751,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
}
|
||||
},
|
||||
GoldenRaspberry("rubus", "occidentalis", EnumLeafType.DECIDUOUS, new Color(0x83B96E), new Color(0x83B96E), EnumSaplingType.Shrub, EnumShrubLog.INSTANCE, new Color(0xFFFFFF)) {
|
||||
@@ -1762,7 +1762,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.GoldenRaspberry);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.GoldenRaspberry.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -1774,7 +1774,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts"));
|
||||
species.addFruitFamily(ETFruitFamily.Berry);
|
||||
species.addFruitFamily(ETFruitFamily.BERRY);
|
||||
species.setRarity(0.0025F);
|
||||
species.setGrowthProvider(new ClimateGrowthProvider(EnumTemperature.NORMAL, EnumTolerance.BOTH_1, EnumHumidity.NORMAL, EnumTolerance.NONE));
|
||||
}
|
||||
@@ -1806,7 +1806,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Coconut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Coconut.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -1826,7 +1826,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Cashew);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Cashew.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
}
|
||||
|
||||
@@ -1844,7 +1844,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Avacado);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Avacado.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
}
|
||||
@@ -1853,7 +1853,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Nutmeg("myristica", "fragrans", EnumLeafType.JUNGLE, new Color(0x488D4C), new Color(0x488D4C), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A)) {
|
||||
@@ -1864,7 +1864,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Nutmeg);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Nutmeg.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
@@ -1884,7 +1884,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Allspice);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Allspice.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
@@ -1904,7 +1904,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Chilli);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Chilli.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Higher.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
@@ -1925,7 +1925,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.StarAnise);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.StarAnise.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele());
|
||||
}
|
||||
@@ -1944,7 +1944,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Mango);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Mango.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
@@ -1957,7 +1957,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Starfruit("averrhoa", "carambola", EnumLeafType.JUNGLE, new Color(0x6DA92D), new Color(0x6DA92D), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A)) {
|
||||
@@ -1968,7 +1968,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Starfruit);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Starfruit.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());
|
||||
}
|
||||
@@ -1977,7 +1977,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) {
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes"));
|
||||
species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle"));
|
||||
species.addFruitFamily(ETFruitFamily.Citrus);
|
||||
species.addFruitFamily(ETFruitFamily.CITRUS);
|
||||
}
|
||||
},
|
||||
Candlenut("aleurites", "moluccana", EnumLeafType.DECIDUOUS, new Color(0x8AA36C), new Color(0x8AA36C), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A)) {
|
||||
@@ -1988,7 +1988,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Candlenut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Candlenut.getAllele());
|
||||
template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele());
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele());
|
||||
@@ -2009,7 +2009,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
|
||||
@Override
|
||||
protected void setAlleles(AlleleTemplate template) {
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.Hazelnut);
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruitDefinition.Hazelnut.getAllele());
|
||||
template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele());
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package binnie.extratrees.genetics;
|
||||
package binnie.extratrees.genetics.fruits;
|
||||
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public enum ETFruitFamily implements IFruitFamily {
|
||||
Berry("Berries", "berry", "berri"),
|
||||
Citrus("Citrus", "citrus", "citrus");
|
||||
BERRY("Berries", "berry", "berri"),
|
||||
CITRUS("Citrus", "citrus", "citrus");
|
||||
|
||||
String name;
|
||||
String uid;
|
||||
@@ -0,0 +1,128 @@
|
||||
package binnie.extratrees.genetics.fruits;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
import binnie.core.Constants;
|
||||
import binnie.core.util.I18N;
|
||||
|
||||
public class ETFruitProviderNone implements IFruitProvider {
|
||||
protected final Map<ItemStack, Float> drops;
|
||||
protected final IFruitFamily family;
|
||||
protected final String name;
|
||||
protected int ripeningPeriod = 2;
|
||||
|
||||
public ETFruitProviderNone(String name, IFruitFamily family) {
|
||||
this.name = name;
|
||||
this.family = family;
|
||||
this.drops = new HashMap<>();
|
||||
}
|
||||
|
||||
public void addDrop(ItemStack product, float chance) {
|
||||
this.drops.put(product, chance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<ItemStack, Float> getSpecialty() {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDecorativeColor() {
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModID() {
|
||||
return Constants.EXTRA_TREES_MOD_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColour(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) {
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return I18N.localise("extratrees.fruits." + name);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFruitFamily getFamily() {
|
||||
return this.family;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRipeningPeriod() {
|
||||
return this.ripeningPeriod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<ItemStack, Float> getProducts() {
|
||||
return Collections.unmodifiableMap(drops);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFruitLeaf(ITreeGenome genome, World world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NonNullList<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime) {
|
||||
return NonNullList.create();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getModelName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ResourceLocation getSprite(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ResourceLocation getDecorativeSprite() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean requiresFruitBlocks() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean trySpawnFruitBlock(ITreeGenome genome, World world, Random rand, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package binnie.extratrees.genetics.fruits;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleFruit;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public class ETFruitProviderPod extends ETFruitProviderNone {
|
||||
@Nullable
|
||||
private FruitPod pod;
|
||||
|
||||
public ETFruitProviderPod(String name, IFruitFamily family, FruitPod pod) {
|
||||
super(name, family);
|
||||
this.pod = pod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean trySpawnFruitBlock(ITreeGenome genome, World world, Random rand, BlockPos pos) {
|
||||
if (rand.nextFloat() > genome.getSappiness()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IAlleleFruit activeAllele = (IAlleleFruit) genome.getActiveAllele(EnumTreeChromosome.FRUITS);
|
||||
return TreeManager.treeRoot.setFruitBlock(world, genome, activeAllele, genome.getSappiness(), pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NonNullList<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime) {
|
||||
NonNullList<ItemStack> products = NonNullList.create();
|
||||
if (this.pod != null) {
|
||||
if (ripeningTime >= ripeningPeriod) {
|
||||
for (Map.Entry<ItemStack, Float> product : drops.entrySet()) {
|
||||
ItemStack single = product.getKey().copy();
|
||||
single.setCount(1);
|
||||
for (int i = 0; i < product.getKey().getCount(); ++i) {
|
||||
if (world.rand.nextFloat() <= product.getValue()) {
|
||||
products.add(single.copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return products;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getModelName() {
|
||||
if (pod != null) {
|
||||
return pod.getModelName();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package binnie.extratrees.genetics.fruits;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public class ETFruitProviderRipening extends ETFruitProviderNone {
|
||||
|
||||
private int diffR, diffG, diffB;
|
||||
private int ripeningPeriod;
|
||||
private int colourCallow = 0xffffff;
|
||||
@Nullable
|
||||
private FruitSprite sprite;
|
||||
|
||||
public ETFruitProviderRipening(String name, IFruitFamily family, FruitSprite sprite) {
|
||||
super(name, family);
|
||||
this.sprite = sprite;
|
||||
}
|
||||
|
||||
public ETFruitProviderRipening setColours(Color ripe, Color callow) {
|
||||
colourCallow = callow.getRGB();
|
||||
int ripeRGB = ripe.getRGB();
|
||||
|
||||
diffR = (ripeRGB >> 16 & 255) - (colourCallow >> 16 & 255);
|
||||
diffG = (ripeRGB >> 8 & 255) - (colourCallow >> 8 & 255);
|
||||
diffB = (ripeRGB & 255) - (colourCallow & 255);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ETFruitProviderRipening setRipeningPeriod(int period) {
|
||||
ripeningPeriod = period;
|
||||
return this;
|
||||
}
|
||||
|
||||
private float getRipeningStage(final int ripeningTime) {
|
||||
if (ripeningTime >= this.ripeningPeriod) {
|
||||
return 1.0f;
|
||||
}
|
||||
return ripeningTime / this.ripeningPeriod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColour(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) {
|
||||
float stage = getRipeningStage(ripeningTime);
|
||||
return getColour(stage);
|
||||
}
|
||||
|
||||
private int getColour(float stage) {
|
||||
int r = (colourCallow >> 16 & 255) + (int) (diffR * stage);
|
||||
int g = (colourCallow >> 8 & 255) + (int) (diffG * stage);
|
||||
int b = (colourCallow & 255) + (int) (diffB * stage);
|
||||
|
||||
return (r & 255) << 16 | (g & 255) << 8 | b & 255;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFruitLeaf(ITreeGenome genome, World world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites() {
|
||||
sprite.registerSprites();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ResourceLocation getSprite(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) {
|
||||
if (sprite != null) {
|
||||
return sprite.getLocation();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package binnie.extratrees.wood;
|
||||
package binnie.extratrees.genetics.fruits;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
+7
-3
@@ -1,4 +1,4 @@
|
||||
package binnie.extratrees.genetics;
|
||||
package binnie.extratrees.genetics.fruits;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -20,6 +20,7 @@ public enum FruitSprite {
|
||||
PEAR;
|
||||
|
||||
public static final FruitSprite[] VALUES = values();
|
||||
protected boolean isRegistered = false;
|
||||
private final ResourceLocation location;
|
||||
|
||||
FruitSprite() {
|
||||
@@ -32,7 +33,10 @@ public enum FruitSprite {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites() {
|
||||
TextureMap map = Minecraft.getMinecraft().getTextureMapBlocks();
|
||||
map.registerSprite(location);
|
||||
if(!isRegistered) {
|
||||
TextureMap map = Minecraft.getMinecraft().getTextureMapBlocks();
|
||||
map.registerSprite(location);
|
||||
isRegistered = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,11 +85,11 @@ import binnie.extratrees.blocks.wood.BlockShrubLog;
|
||||
import binnie.extratrees.blocks.wood.ItemBlockETWood;
|
||||
import binnie.extratrees.blocks.wood.ItemBlockETWoodDoor;
|
||||
import binnie.extratrees.blocks.wood.ItemETSlab;
|
||||
import binnie.extratrees.genetics.AlleleETFruit;
|
||||
import binnie.extratrees.genetics.AlleleETFruitDefinition;
|
||||
import binnie.extratrees.genetics.ButterflySpecies;
|
||||
import binnie.extratrees.genetics.ETTreeDefinition;
|
||||
import binnie.extratrees.genetics.ExtraTreeMutation;
|
||||
import binnie.extratrees.genetics.FruitSprite;
|
||||
import binnie.extratrees.genetics.fruits.FruitSprite;
|
||||
import binnie.extratrees.genetics.TreeBreedingSystem;
|
||||
import binnie.extratrees.items.ExtraTreeLiquid;
|
||||
import binnie.extratrees.items.ItemBlockETDecorativeLeaves;
|
||||
@@ -362,7 +362,7 @@ public class ModuleWood extends Module {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
AlleleETFruit.init();
|
||||
AlleleETFruitDefinition.init();
|
||||
ETTreeDefinition.initTrees();
|
||||
ExtraTreeMutation.init();
|
||||
if (BinnieCore.isLepidopteryActive()) {
|
||||
@@ -495,7 +495,7 @@ public class ModuleWood extends Module {
|
||||
@SubscribeEvent
|
||||
public static void onRegisterAllele(AlleleRegisterEvent<IAlleleFruit> event) {
|
||||
if (event.getAlleleClass() == IAlleleFruit.class) {
|
||||
AlleleETFruit.preInit();
|
||||
AlleleETFruitDefinition.preInit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -396,6 +396,69 @@ extratrees.species.starfruit.name=Starfruit
|
||||
extratrees.species.candlenut.name=Candlenut
|
||||
extratrees.species.dwarfhazel.name=Dwarf Hazel
|
||||
|
||||
##################################################
|
||||
## Fruits
|
||||
|
||||
extratrees.fruits.blackthorn=Blackthorn
|
||||
extratrees.fruits.cherry_plum=Cherry Plum
|
||||
extratrees.fruits.peach=Peach
|
||||
extratrees.fruits.nectarine=Nectarine
|
||||
extratrees.fruits.apricot=Apricot
|
||||
extratrees.fruits.almond=Almond
|
||||
extratrees.fruits.wild_cherry=Wild Cherry
|
||||
extratrees.fruits.sour_cherry=Sour Cherry
|
||||
extratrees.fruits.black_cherry=Black Cherry
|
||||
extratrees.fruits.fig=Fig
|
||||
extratrees.fruits.elderberry=Elderberry
|
||||
extratrees.fruits.olive=Olive
|
||||
extratrees.fruits.orange=Orange
|
||||
extratrees.fruits.manderin=Manderin
|
||||
extratrees.fruits.tangerine=Tangerine
|
||||
extratrees.fruits.satsuma=Satsuma
|
||||
extratrees.fruits.key_lime=Key Lime
|
||||
extratrees.fruits.lime=Lime
|
||||
extratrees.fruits.finger_lime=Finger Lime
|
||||
extratrees.fruits.pomelo=Pomelo
|
||||
extratrees.fruits.grapefruit=Grapefruit
|
||||
extratrees.fruits.kumquat=Kumquat
|
||||
extratrees.fruits.citron=Citron
|
||||
extratrees.fruits.buddha_hand=Buddha Hand
|
||||
extratrees.fruits.apple=Apple
|
||||
extratrees.fruits.crabapple=Crabapple
|
||||
extratrees.fruits.mango=Mango
|
||||
extratrees.fruits.pear=Pear
|
||||
extratrees.fruits.osange_osange=Osange Osange
|
||||
extratrees.fruits.banana=Banana
|
||||
extratrees.fruits.red_banana=Red Banana
|
||||
extratrees.fruits.platain=Platain
|
||||
extratrees.fruits.coffee=Coffee
|
||||
extratrees.fruits.coconut=Coconut
|
||||
extratrees.fruits.cashew=Cashew
|
||||
extratrees.fruits.avacado=Avacado
|
||||
extratrees.fruits.nutmeg=Nutmeg
|
||||
extratrees.fruits.allspice=Allspice
|
||||
extratrees.fruits.chilli=Chilli
|
||||
extratrees.fruits.star_anise=Star Anise
|
||||
extratrees.fruits.starfruit=Starfruit
|
||||
extratrees.fruits.candlenut=Candlenut
|
||||
extratrees.fruits.hazelnut=Hazelnut
|
||||
extratrees.fruits.butternut=Butternut
|
||||
extratrees.fruits.beechnut=Beechnut
|
||||
extratrees.fruits.pecan=Pecan
|
||||
extratrees.fruits.brazil_nut=Brazil Nut
|
||||
extratrees.fruits.acorn=Acorn
|
||||
extratrees.fruits.gingko_nut=Gingko Nut
|
||||
extratrees.fruits.clove=Clove
|
||||
extratrees.fruits.blackcurrant=Blackcurrant
|
||||
extratrees.fruits.redcurrant=Redcurrant
|
||||
extratrees.fruits.blackberry=Blackberry
|
||||
extratrees.fruits.raspberry=Raspberry
|
||||
extratrees.fruits.blueberry=Blueberry
|
||||
extratrees.fruits.cranberry=Cranberry
|
||||
extratrees.fruits.juniper=Juniper
|
||||
extratrees.fruits.gooseberry=Gooseberry
|
||||
extratrees.fruits.golden_raspberry=Golden Raspberry
|
||||
|
||||
##################################################
|
||||
## Butterfly Species
|
||||
|
||||
|
||||
Reference in new issue
Block a user