From 8e14eb81a15353780239d5c2661064a20be4b518 Mon Sep 17 00:00:00 2001 From: marcin212 Date: Mon, 31 Oct 2016 21:03:38 +0100 Subject: [PATCH 1/2] Rewrite ExtraTreeSpecies class --- gradle.properties | 2 +- .../binnie/core/genetics/ForestryAllele.java | 12 +- .../core/genetics/TreeBreedingSystem.java | 3 +- .../java/binnie/extratrees/ExtraTrees.java | 29 +- .../binnie/extratrees/block/ModuleBlocks.java | 2 - .../binnie/extratrees/core/ModuleCore.java | 4 +- .../binnie/extratrees/gen/WorldGenAlder.java | 4 +- .../binnie/extratrees/gen/WorldGenApple.java | 3 +- .../binnie/extratrees/gen/WorldGenAsh.java | 4 +- .../binnie/extratrees/gen/WorldGenBanana.java | 4 +- .../binnie/extratrees/gen/WorldGenCitrus.java | 4 +- .../extratrees/gen/WorldGenConifer.java | 3 +- .../extratrees/gen/WorldGenDefault.java | 4 +- .../extratrees/gen/WorldGenEucalyptus.java | 8 +- .../binnie/extratrees/gen/WorldGenFir.java | 3 +- .../binnie/extratrees/gen/WorldGenHolly.java | 4 +- .../binnie/extratrees/gen/WorldGenJungle.java | 3 +- .../binnie/extratrees/gen/WorldGenLazy.java | 4 +- .../binnie/extratrees/gen/WorldGenMaple.java | 4 +- .../binnie/extratrees/gen/WorldGenPalm.java | 4 +- .../binnie/extratrees/gen/WorldGenPoplar.java | 4 +- .../binnie/extratrees/gen/WorldGenPrune.java | 4 +- .../binnie/extratrees/gen/WorldGenSorbus.java | 3 +- .../binnie/extratrees/gen/WorldGenSpruce.java | 3 +- .../binnie/extratrees/gen/WorldGenTilia.java | 3 +- .../binnie/extratrees/gen/WorldGenTree.java | 3 +- .../binnie/extratrees/gen/WorldGenTree2.java | 3 +- .../binnie/extratrees/gen/WorldGenTree3.java | 3 +- .../extratrees/gen/WorldGenTropical.java | 4 +- .../extratrees/genetics/EnumSaplingType.java | 72 + .../genetics/ExtraTreeMutation.java | 194 +- .../extratrees/genetics/ExtraTreeSpecies.java | 2620 ++++++++++------- .../extratrees/genetics/ModuleGenetics.java | 55 +- .../extratrees/genetics/TreeGenerator.java | 75 + .../extratrees/genetics/WoodAccess.java | 11 +- .../extratrees/worldgen/BlockTypeLog.java | 19 +- 36 files changed, 1860 insertions(+), 1324 deletions(-) create mode 100644 src/main/java/binnie/extratrees/genetics/EnumSaplingType.java create mode 100644 src/main/java/binnie/extratrees/genetics/TreeGenerator.java diff --git a/gradle.properties b/gradle.properties index 05513118..60b1318a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ mcversion=1.10.2 forgeversion=12.18.2.2114 mcp_mappings=snapshot_20160525 -forestry_version=5.2.16.306 +forestry_version=5.2.16.308 version_major=2 version_minor=0 diff --git a/src/main/java/binnie/core/genetics/ForestryAllele.java b/src/main/java/binnie/core/genetics/ForestryAllele.java index f028e7d9..2d859ec5 100644 --- a/src/main/java/binnie/core/genetics/ForestryAllele.java +++ b/src/main/java/binnie/core/genetics/ForestryAllele.java @@ -126,17 +126,7 @@ public class ForestryAllele { Highest; public IAllele getAllele() { - String s = this.toString(); - if (this == Saplings.Average) { - s = "Default"; - } - if (this == Saplings.High) { - s = "Double"; - } - if (this == Saplings.Higher) { - s = "Triple"; - } - return AlleleManager.alleleRegistry.getAllele("forestry.saplings" + s); + return AlleleManager.alleleRegistry.getAllele("forestry.saplings" + name()); } } diff --git a/src/main/java/binnie/core/genetics/TreeBreedingSystem.java b/src/main/java/binnie/core/genetics/TreeBreedingSystem.java index 48ec8566..165aff6b 100644 --- a/src/main/java/binnie/core/genetics/TreeBreedingSystem.java +++ b/src/main/java/binnie/core/genetics/TreeBreedingSystem.java @@ -257,8 +257,7 @@ public class TreeBreedingSystem extends BreedingSystem { switch ((EnumTreeChromosome) chromosome) { case FERTILITY: { for (final ForestryAllele.Saplings a : ForestryAllele.Saplings.values()) { - //TODO - //alleles.add(a.getAllele()); + alleles.add(a.getAllele()); } break; } diff --git a/src/main/java/binnie/extratrees/ExtraTrees.java b/src/main/java/binnie/extratrees/ExtraTrees.java index 9df41579..8195fd62 100644 --- a/src/main/java/binnie/extratrees/ExtraTrees.java +++ b/src/main/java/binnie/extratrees/ExtraTrees.java @@ -19,14 +19,10 @@ import binnie.extratrees.carpentry.ModuleCarpentry; import binnie.extratrees.config.ConfigurationMain; import binnie.extratrees.core.ExtraTreesGUID; import binnie.extratrees.core.ModuleCore; -import binnie.extratrees.genetics.ButterflySpecies; -import binnie.extratrees.genetics.ExtraTreeFruitGene; -import binnie.extratrees.genetics.ExtraTreeSpecies; -import binnie.extratrees.genetics.ModuleGenetics; +import binnie.extratrees.genetics.*; import binnie.extratrees.item.ModuleItems; import binnie.extratrees.machines.ModuleMachine; import binnie.extratrees.proxy.Proxy; -import forestry.api.arboriculture.EnumTreeChromosome; import forestry.api.arboriculture.ITreeRoot; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.AlleleSpeciesRegisterEvent; @@ -43,7 +39,9 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import java.util.Arrays; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; @Mod(modid = Constants.EXTRA_TREES_MOD_ID, name = "Binnie's Extra Trees", useMetadata = true, dependencies = "required-after:" + Constants.CORE_MOD_ID) @@ -155,14 +153,12 @@ public class ExtraTrees extends AbstractMod { for (final ExtraTreeFruitGene fruit : ExtraTreeFruitGene.values()) { AlleleManager.alleleRegistry.registerAllele(fruit); } - for (final ExtraTreeSpecies species : ExtraTreeSpecies.values()) { - AlleleManager.alleleRegistry.registerAllele(species, EnumTreeChromosome.SPECIES); - } - } + ExtraTreeSpecies.preInitTrees(); - if (BinnieCore.isLepidopteryActive()) { - for (final ButterflySpecies species2 : ButterflySpecies.values()) { - AlleleManager.alleleRegistry.registerAllele(species2); + if (BinnieCore.isLepidopteryActive()) { + for (final ButterflySpecies species2 : ButterflySpecies.values()) { + AlleleManager.alleleRegistry.registerAllele(species2); + } } } } @@ -180,12 +176,13 @@ public class ExtraTrees extends AbstractMod { .filter(mrl -> mrl.getResourceDomain().startsWith(Constants.EXTRA_TREES_MOD_ID)) .filter(mrl -> mrl.getResourcePath().startsWith("germlings")).collect(Collectors.toList()); //Replace model + Map map = Arrays.stream(ExtraTreeSpecies.values()).collect(Collectors.toMap(o -> o.name().toLowerCase(), o -> o)); models.forEach(model -> { String species = model.getVariant().split("=")[1]; - ExtraTreeSpecies treeSpecies = ExtraTreeSpecies.names().get(species); - int primaryColor = treeSpecies.getSpriteColour(1); - int secondaryColor = treeSpecies.getSpriteColour(0); - e.getModelRegistry().putObject(model, new DoublePassBakedModel(e.getModelRegistry().getObject(model), primaryColor, secondaryColor)); + ExtraTreeSpecies treeSpecies = map.get(species); + int primaryColor = treeSpecies.getLeafColor().getRGB(); + int secondaryColor = treeSpecies.getWoodColor().getRGB(); + e.getModelRegistry().putObject(model, new DoublePassBakedModel(e.getModelRegistry().getObject(model), primaryColor, secondaryColor)); }); } diff --git a/src/main/java/binnie/extratrees/block/ModuleBlocks.java b/src/main/java/binnie/extratrees/block/ModuleBlocks.java index c9461546..8e3fb277 100644 --- a/src/main/java/binnie/extratrees/block/ModuleBlocks.java +++ b/src/main/java/binnie/extratrees/block/ModuleBlocks.java @@ -123,8 +123,6 @@ public class ModuleBlocks implements IInitializable { // RenderingRegistry.registerBlockHandler(new StairsRenderer()); // ExtraTrees.doorRenderId = RenderingRegistry.getNextAvailableRenderId(); // RenderingRegistry.registerBlockHandler(new DoorBlockRenderer()); -// ExtraTrees.branchRenderId = RenderingRegistry.getNextAvailableRenderId(); -// RenderingRegistry.registerBlockHandler(new BranchBlockRenderer()); // RenderingRegistry.registerBlockHandler(new HedgeRenderer()); RecipeSorter.register("extratrees:multifence", MultiFenceRecipeSize.class, RecipeSorter.Category.SHAPED, ""); RecipeSorter.register("extratrees:multifence2", MultiFenceRecipeEmbedded.class, RecipeSorter.Category.SHAPED, ""); diff --git a/src/main/java/binnie/extratrees/core/ModuleCore.java b/src/main/java/binnie/extratrees/core/ModuleCore.java index 087eb769..bf9a681b 100644 --- a/src/main/java/binnie/extratrees/core/ModuleCore.java +++ b/src/main/java/binnie/extratrees/core/ModuleCore.java @@ -38,8 +38,8 @@ public class ModuleCore implements IInitializable { final PrintWriter outputFruit = new PrintWriter(new FileWriter("data/fruit.html")); final PrintWriter outputDesigns = new PrintWriter(new FileWriter("data/designs.html")); final Queue speciesQueue = new LinkedList<>(); - for (final IAlleleTreeSpecies s : ExtraTreeSpecies.values()) { - speciesQueue.add(s); + for (final ExtraTreeSpecies s : ExtraTreeSpecies.values()) { + speciesQueue.add(s.getSpecies()); } final Queue logQueue = new LinkedList<>(); Collections.addAll(logQueue, EnumExtraTreeLog.values()); diff --git a/src/main/java/binnie/extratrees/gen/WorldGenAlder.java b/src/main/java/binnie/extratrees/gen/WorldGenAlder.java index f37576c5..045b2a88 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenAlder.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenAlder.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenAlder { public static class CommonAlder extends WorldGenTree { - public CommonAlder(final ITreeGenData tree) { + public CommonAlder(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenApple.java b/src/main/java/binnie/extratrees/gen/WorldGenApple.java index cd620454..a25061a2 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenApple.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenApple.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenApple { public static class OrchardApple extends WorldGenTree { - public OrchardApple(final ITreeGenData tree) { + public OrchardApple(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenAsh.java b/src/main/java/binnie/extratrees/gen/WorldGenAsh.java index 94bb29ce..b6ad5dc3 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenAsh.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenAsh.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenAsh { public static class CommonAsh extends WorldGenTree { - public CommonAsh(final ITreeGenData tree) { + public CommonAsh(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenBanana.java b/src/main/java/binnie/extratrees/gen/WorldGenBanana.java index a4530ab7..5168da86 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenBanana.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenBanana.java @@ -1,9 +1,9 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenBanana extends WorldGenTree { - public WorldGenBanana(final ITreeGenData tree) { + public WorldGenBanana(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenCitrus.java b/src/main/java/binnie/extratrees/gen/WorldGenCitrus.java index f8b13821..46ffbe40 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenCitrus.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenCitrus.java @@ -1,9 +1,9 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenCitrus extends WorldGenTree { - public WorldGenCitrus(final ITreeGenData tree) { + public WorldGenCitrus(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenConifer.java b/src/main/java/binnie/extratrees/gen/WorldGenConifer.java index 4b632b81..cf1804ac 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenConifer.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenConifer.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenConifer { public static class WesternHemlock extends WorldGenTree { - public WesternHemlock(final ITreeGenData tree) { + public WesternHemlock(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenDefault.java b/src/main/java/binnie/extratrees/gen/WorldGenDefault.java index 5370ff7e..e67845ec 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenDefault.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenDefault.java @@ -1,9 +1,9 @@ package binnie.extratrees.gen; -import binnie.extratrees.genetics.ExtraTreeSpecies; import binnie.extratrees.worldgen.BlockType; import binnie.extratrees.worldgen.BlockTypeLeaf; import binnie.extratrees.worldgen.BlockTypeLog; +import forestry.api.arboriculture.ITree; import forestry.api.world.ITreeGenData; public class WorldGenDefault extends WorldGenTree { @@ -34,7 +34,7 @@ public class WorldGenDefault extends WorldGenTree { @Override public BlockType getWood() { - return new BlockTypeLog(((ExtraTreeSpecies) this.treeGen.getGenome().getPrimary()).getLog()); + return new BlockTypeLog(this.treeGen); } } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenEucalyptus.java b/src/main/java/binnie/extratrees/gen/WorldGenEucalyptus.java index c1eded19..67615aff 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenEucalyptus.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenEucalyptus.java @@ -1,13 +1,10 @@ package binnie.extratrees.gen; -import binnie.extratrees.block.EnumExtraTreeLog; -import binnie.extratrees.worldgen.BlockTypeLog; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenEucalyptus { public static class SwampGum extends WorldGenTree { - public SwampGum(final ITreeGenData tree) { + public SwampGum(final ITree tree) { super(tree); } @@ -75,7 +72,8 @@ public class WorldGenEucalyptus { for (int x = 0; x < this.girth; ++x) { for (int y = 0; y < this.girth; ++y) { for (int i = 0; i < 2; ++i) { - this.addBlock(x - offset, i, y - offset, new BlockTypeLog(EnumExtraTreeLog.Eucalyptus2), true); + //TODO Eucalyptus2 log + //this.addBlock(x - offset, i, y - offset, new BlockTypeLog(EnumExtraTreeLog.Eucalyptus2), true); } } } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenFir.java b/src/main/java/binnie/extratrees/gen/WorldGenFir.java index 8870e3d8..d287d2fc 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenFir.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenFir.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenFir { public static class DouglasFir extends WorldGenTree { - public DouglasFir(final ITreeGenData tree) { + public DouglasFir(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenHolly.java b/src/main/java/binnie/extratrees/gen/WorldGenHolly.java index a9c0a98c..caceb6e7 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenHolly.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenHolly.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenHolly { public static class Holly extends WorldGenTree { - public Holly(final ITreeGenData tree) { + public Holly(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenJungle.java b/src/main/java/binnie/extratrees/gen/WorldGenJungle.java index 199dc06c..f174de61 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenJungle.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenJungle.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenJungle { public static class Brazilwood extends WorldGenTree { - public Brazilwood(final ITreeGenData tree) { + public Brazilwood(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenLazy.java b/src/main/java/binnie/extratrees/gen/WorldGenLazy.java index 902e6a37..e35d18ed 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenLazy.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenLazy.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenLazy { public static class Tree extends WorldGenTree { - public Tree(final ITreeGenData tree) { + public Tree(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenMaple.java b/src/main/java/binnie/extratrees/gen/WorldGenMaple.java index 303f8348..ccd624c1 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenMaple.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenMaple.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenMaple { public static class RedMaple extends WorldGenTree { - public RedMaple(final ITreeGenData tree) { + public RedMaple(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenPalm.java b/src/main/java/binnie/extratrees/gen/WorldGenPalm.java index e53e1087..1d1f99f3 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenPalm.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenPalm.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenPalm { public static class Coconut extends WorldGenTree { - public Coconut(final ITreeGenData tree) { + public Coconut(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenPoplar.java b/src/main/java/binnie/extratrees/gen/WorldGenPoplar.java index 7a9229d0..ac5d2198 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenPoplar.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenPoplar.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenPoplar { public static class Aspen extends WorldGenTree { - public Aspen(final ITreeGenData tree) { + public Aspen(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenPrune.java b/src/main/java/binnie/extratrees/gen/WorldGenPrune.java index 462699b7..46981114 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenPrune.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenPrune.java @@ -1,9 +1,9 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenPrune extends WorldGenTree { - public WorldGenPrune(final ITreeGenData tree) { + public WorldGenPrune(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenSorbus.java b/src/main/java/binnie/extratrees/gen/WorldGenSorbus.java index a865c629..3010860a 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenSorbus.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenSorbus.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenSorbus { public static class Whitebeam extends WorldGenTree { - public Whitebeam(final ITreeGenData tree) { + public Whitebeam(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenSpruce.java b/src/main/java/binnie/extratrees/gen/WorldGenSpruce.java index eff6b741..fe636412 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenSpruce.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenSpruce.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenSpruce { public static class GiantSpruce extends WorldGenTree { - public GiantSpruce(final ITreeGenData tree) { + public GiantSpruce(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenTilia.java b/src/main/java/binnie/extratrees/gen/WorldGenTilia.java index 29d22313..fa3c4376 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenTilia.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenTilia.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenTilia { public static class Basswood extends WorldGenTree { - public Basswood(final ITreeGenData tree) { + public Basswood(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenTree.java b/src/main/java/binnie/extratrees/gen/WorldGenTree.java index bb1cc19a..a32fe513 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenTree.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenTree.java @@ -1,6 +1,5 @@ package binnie.extratrees.gen; -import binnie.extratrees.genetics.ExtraTreeSpecies; import binnie.extratrees.worldgen.BlockType; import binnie.extratrees.worldgen.BlockTypeLeaf; import binnie.extratrees.worldgen.BlockTypeLog; @@ -77,7 +76,7 @@ public abstract class WorldGenTree extends WorldGenerator { } public BlockType getWood() { - return new BlockTypeLog(((ExtraTreeSpecies) this.treeGen.getGenome().getPrimary()).getLog()); + return new BlockTypeLog(treeGen); } public WorldGenTree(final ITreeGenData tree) { diff --git a/src/main/java/binnie/extratrees/gen/WorldGenTree2.java b/src/main/java/binnie/extratrees/gen/WorldGenTree2.java index 2088fb10..02e71a40 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenTree2.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenTree2.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenTree2 { public static class Olive extends WorldGenTree { - public Olive(final ITreeGenData tree) { + public Olive(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenTree3.java b/src/main/java/binnie/extratrees/gen/WorldGenTree3.java index 953e6357..90f32cdc 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenTree3.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenTree3.java @@ -1,11 +1,10 @@ package binnie.extratrees.gen; import forestry.api.arboriculture.ITree; -import forestry.api.world.ITreeGenData; public class WorldGenTree3 { public static class Hazel extends WorldGenTree { - public Hazel(final ITreeGenData tree) { + public Hazel(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/gen/WorldGenTropical.java b/src/main/java/binnie/extratrees/gen/WorldGenTropical.java index b113560b..9c9f7dc2 100644 --- a/src/main/java/binnie/extratrees/gen/WorldGenTropical.java +++ b/src/main/java/binnie/extratrees/gen/WorldGenTropical.java @@ -1,10 +1,10 @@ package binnie.extratrees.gen; -import forestry.api.world.ITreeGenData; +import forestry.api.arboriculture.ITree; public class WorldGenTropical { public static class Mango extends WorldGenTree { - public Mango(final ITreeGenData tree) { + public Mango(final ITree tree) { super(tree); } diff --git a/src/main/java/binnie/extratrees/genetics/EnumSaplingType.java b/src/main/java/binnie/extratrees/genetics/EnumSaplingType.java new file mode 100644 index 00000000..c22e2acd --- /dev/null +++ b/src/main/java/binnie/extratrees/genetics/EnumSaplingType.java @@ -0,0 +1,72 @@ +package binnie.extratrees.genetics; + +import forestry.api.arboriculture.EnumGermlingType; +import forestry.api.arboriculture.IGermlingModelProvider; +import forestry.api.core.IModelManager; +import net.minecraft.client.renderer.block.model.ModelBakery; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import javax.annotation.Nonnull; +import java.awt.*; + +public enum EnumSaplingType { + Default, + Jungle, + Conifer, + Fruit, + Poplar, + Palm, + Shrub; + + public IGermlingModelProvider getGermlingModelProvider(Color leaf, Color wood){ + return new DefaultGermlingModelProvider(this, leaf, wood); + } + + private class DefaultGermlingModelProvider implements IGermlingModelProvider { + private ModelResourceLocation germlingModel; + private ModelResourceLocation pollenModel; + private EnumSaplingType saplingType; + private Color leaf; + private Color wood; + + public DefaultGermlingModelProvider(EnumSaplingType saplingType, Color leaf, Color wood) { + this.saplingType = saplingType; + this.wood = wood; + this.leaf = leaf; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerModels(Item item, IModelManager manager, EnumGermlingType type) { + if (type == EnumGermlingType.SAPLING) { + germlingModel = manager.getModelLocation("extratrees", "saplings/tree" + name()); + ModelBakery.registerItemVariants(item, new ResourceLocation("extratrees", "saplings/tree" + name())); + } + if (type == EnumGermlingType.POLLEN) { + pollenModel = manager.getModelLocation("pollen"); + ModelBakery.registerItemVariants(item, new ResourceLocation("forestry:pollen")); + } + } + + @Nonnull + @Override + public ModelResourceLocation getModel(EnumGermlingType type) { + if (type == EnumGermlingType.SAPLING) { + return germlingModel; + } else if (type == EnumGermlingType.POLLEN) { + return pollenModel; + } else { + return germlingModel; + } + } + + @Override + public int getSpriteColor(EnumGermlingType type, int renderPass) { + return type == EnumGermlingType.SAPLING && renderPass==0 ? wood.getRGB() : leaf.getRGB(); + } + } +} diff --git a/src/main/java/binnie/extratrees/genetics/ExtraTreeMutation.java b/src/main/java/binnie/extratrees/genetics/ExtraTreeMutation.java index b1ece296..6e006d79 100644 --- a/src/main/java/binnie/extratrees/genetics/ExtraTreeMutation.java +++ b/src/main/java/binnie/extratrees/genetics/ExtraTreeMutation.java @@ -29,103 +29,103 @@ public class ExtraTreeMutation implements ITreeMutation { public static void init() { final IAlleleTreeSpecies lemon = (IAlleleTreeSpecies) getVanilla("Lemon"); - new ExtraTreeMutation(getVanilla("Cherry"), lemon, ExtraTreeSpecies.KeyLime, 10); - new ExtraTreeMutation(ExtraTreeSpecies.KeyLime, lemon, ExtraTreeSpecies.FingerLime, 10); - new ExtraTreeMutation(getVanilla("Cherry"), lemon, ExtraTreeSpecies.Pomelo, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Pomelo, getVanilla("Cherry"), ExtraTreeSpecies.Manderin, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Pomelo, lemon, ExtraTreeSpecies.Citron, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Manderin, getVanilla("Cherry"), ExtraTreeSpecies.Kumquat, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Pomelo, ExtraTreeSpecies.Manderin, ExtraTreeSpecies.Orange, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Citron, ExtraTreeSpecies.Manderin, ExtraTreeSpecies.BuddhaHand, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Kumquat, ExtraTreeSpecies.Manderin, ExtraTreeSpecies.Tangerine, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Kumquat, ExtraTreeSpecies.Manderin, ExtraTreeSpecies.Satsuma, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Pomelo, ExtraTreeSpecies.Orange, ExtraTreeSpecies.Grapefruit, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Pomelo, ExtraTreeSpecies.KeyLime, ExtraTreeSpecies.Lime, 10); - new ExtraTreeMutation(getVanilla("Oak"), getVanilla("Cherry"), ExtraTreeSpecies.OrchardApple, 10); - new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple, getVanilla("Maple"), ExtraTreeSpecies.SweetCrabapple, 10); - new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple, ExtraTreeSpecies.SweetCrabapple, ExtraTreeSpecies.FloweringCrabapple, 10); - new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple, getVanilla("Birch"), ExtraTreeSpecies.PrairieCrabapple, 10); - new ExtraTreeMutation(getVanilla("Plum"), ExtraTreeSpecies.OrchardApple, ExtraTreeSpecies.Blackthorn, 10); - new ExtraTreeMutation(getVanilla("Plum"), getVanilla("Cherry"), ExtraTreeSpecies.CherryPlum, 10); - new ExtraTreeMutation(getVanilla("Plum"), getVanilla("Chestnut"), ExtraTreeSpecies.Peach, 10); - new ExtraTreeMutation(getVanilla("Plum"), ExtraTreeSpecies.Peach, ExtraTreeSpecies.Nectarine, 10); - new ExtraTreeMutation(getVanilla("Plum"), ExtraTreeSpecies.Peach, ExtraTreeSpecies.Apricot, 10); - new ExtraTreeMutation(getVanilla("Plum"), getVanilla("Walnut"), ExtraTreeSpecies.Almond, 10); - new ExtraTreeMutation(getVanilla("Lime"), getVanilla("Cherry"), ExtraTreeSpecies.WildCherry, 10); - new ExtraTreeMutation(getVanilla("Willow"), getVanilla("Cherry"), ExtraTreeSpecies.SourCherry, 10); - new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Cherry"), ExtraTreeSpecies.BlackCherry, 10); - new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Jungle"), ExtraTreeSpecies.Banana, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Banana, getVanilla("Kapok"), ExtraTreeSpecies.RedBanana, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Banana, getVanilla("Teak"), ExtraTreeSpecies.Plantain, 10); - new ExtraTreeMutation(getVanilla("Birch"), getVanilla("Oak"), ExtraTreeSpecies.Beech, 10); - new ExtraTreeMutation(getVanilla("Birch"), ExtraTreeSpecies.Beech, ExtraTreeSpecies.Alder, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Alder, ExtraTreeSpecies.Beech, ExtraTreeSpecies.Aspen, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Aspen, ExtraTreeSpecies.Alder, ExtraTreeSpecies.Rowan, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Beech, ExtraTreeSpecies.Aspen, ExtraTreeSpecies.Hazel, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Beech, ExtraTreeSpecies.Rowan, ExtraTreeSpecies.Hawthorn, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Alder, ExtraTreeSpecies.Aspen, ExtraTreeSpecies.Elder, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Alder, ExtraTreeSpecies.Rowan, ExtraTreeSpecies.Holly, 10); - new ExtraTreeMutation(getVanilla("Willow"), ExtraTreeSpecies.Aspen, ExtraTreeSpecies.Sallow, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Beech, getVanilla("Birch"), ExtraTreeSpecies.Pecan, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Beech, getVanilla("Spruce"), ExtraTreeSpecies.CopperBeech, 10); - new ExtraTreeMutation(getVanilla("Lime"), getVanilla("Spruce"), ExtraTreeSpecies.Ash, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Ash, getVanilla("Birch"), ExtraTreeSpecies.Whitebeam, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Ash, getVanilla("Pine"), ExtraTreeSpecies.Elm, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Ash, getVanilla("Larch"), ExtraTreeSpecies.Hornbeam, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Ash, getVanilla("Maple"), ExtraTreeSpecies.Sycamore, 10); - new ExtraTreeMutation(getVanilla("Larch"), getVanilla("Spruce"), ExtraTreeSpecies.Yew, 10); - new ExtraTreeMutation(getVanilla("Larch"), ExtraTreeSpecies.Alder, ExtraTreeSpecies.BalsamFir, 10); - new ExtraTreeMutation(getVanilla("Pine"), ExtraTreeSpecies.BalsamFir, ExtraTreeSpecies.Fir, 10); - new ExtraTreeMutation(getVanilla("Pine"), ExtraTreeSpecies.Fir, ExtraTreeSpecies.Hemlock, 10).setHeight(80); - new ExtraTreeMutation(ExtraTreeSpecies.Fir, getVanilla("Larch"), ExtraTreeSpecies.Cedar, 10).setHeight(60); - new ExtraTreeMutation(ExtraTreeSpecies.Fir, getVanilla("Spruce"), ExtraTreeSpecies.DouglasFir, 10).setHeight(60); - new ExtraTreeMutation(getVanilla("Pine"), getVanilla("Spruce"), ExtraTreeSpecies.Cypress, 10); - new ExtraTreeMutation(getVanilla("Pine"), getVanilla("Spruce"), ExtraTreeSpecies.LoblollyPine, 10); - new ExtraTreeMutation(getVanilla("Walnut"), getVanilla("Cherry"), ExtraTreeSpecies.Butternut, 10); - new ExtraTreeMutation(getVanilla("Walnut"), getVanilla("Oak"), ExtraTreeSpecies.AcornOak, 10); - new ExtraTreeMutation(getVanilla("Cherry"), ExtraTreeSpecies.Alder, ExtraTreeSpecies.Olive, 10); - new ExtraTreeMutation(getVanilla("Maple"), getVanilla("Lime"), ExtraTreeSpecies.RedMaple, 10); - new ExtraTreeMutation(getVanilla("Maple"), getVanilla("Larch"), ExtraTreeSpecies.Sweetgum, 10); - new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Lime"), ExtraTreeSpecies.Locust, 10); - new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Teak"), ExtraTreeSpecies.Iroko, 10); - new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple, getVanilla("Birch"), ExtraTreeSpecies.Pear, 10); - new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Teak"), ExtraTreeSpecies.OldFustic, 10); - new ExtraTreeMutation(ExtraTreeSpecies.OldFustic, getVanilla("Kapok"), ExtraTreeSpecies.OsangeOsange, 10); - new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Teak"), ExtraTreeSpecies.Brazilwood, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Brazilwood, getVanilla("Kapok"), ExtraTreeSpecies.Purpleheart, 10); - new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Teak"), ExtraTreeSpecies.Rosewood, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Rosewood, getVanilla("Kapok"), ExtraTreeSpecies.Logwood, 10); - new ExtraTreeMutation(getVanilla("Wenge"), getVanilla("Lime"), ExtraTreeSpecies.Gingko, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Beech, getVanilla("Jungle"), ExtraTreeSpecies.Brazilnut, 10); - new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Jungle"), ExtraTreeSpecies.RoseGum, 10); - new ExtraTreeMutation(ExtraTreeSpecies.RoseGum, getVanilla("Mahogony"), ExtraTreeSpecies.SwampGum, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Coffee, getVanilla("Teak"), ExtraTreeSpecies.Clove, 10); - new ExtraTreeMutation(getVanilla("Cherry"), getVanilla("Jungle"), ExtraTreeSpecies.Coffee, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Holly, ExtraTreeSpecies.Alder, ExtraTreeSpecies.Box, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Hemlock, getVanilla("Jungle"), ExtraTreeSpecies.MonkeyPuzzle, 10); - new ExtraTreeMutation(ExtraTreeSpecies.RoseGum, getVanilla("Balsa"), ExtraTreeSpecies.RainbowGum, 10); - new ExtraTreeMutation(ExtraTreeSpecies.RoseGum, ExtraTreeSpecies.Brazilwood, ExtraTreeSpecies.PinkIvory, 10); - new ExtraTreeMutation(getVanilla("Cherry"), ExtraTreeSpecies.Elder, ExtraTreeSpecies.Raspberry, 10); - new ExtraTreeMutation(getVanilla("Cherry"), ExtraTreeSpecies.Elder, ExtraTreeSpecies.Redcurrant, 10); - new ExtraTreeMutation(ExtraTreeSpecies.BlackCherry, ExtraTreeSpecies.Redcurrant, ExtraTreeSpecies.Blackcurrant, 10); - new ExtraTreeMutation(ExtraTreeSpecies.BlackCherry, ExtraTreeSpecies.Raspberry, ExtraTreeSpecies.Blackberry, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Blackberry, ExtraTreeSpecies.Raspberry, ExtraTreeSpecies.Blueberry, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Blackberry, ExtraTreeSpecies.CherryPlum, ExtraTreeSpecies.Cranberry, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Raspberry, ExtraTreeSpecies.Fir, ExtraTreeSpecies.Juniper, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Raspberry, ExtraTreeSpecies.Lime, ExtraTreeSpecies.Gooseberry, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Raspberry, ExtraTreeSpecies.Orange, ExtraTreeSpecies.GoldenRaspberry, 10); - new ExtraTreeMutation(getVanilla("Teak"), ExtraTreeSpecies.Rosewood, ExtraTreeSpecies.Cinnamon, 10); - new ExtraTreeMutation(getVanilla("Balsa"), ExtraTreeSpecies.Brazilnut, ExtraTreeSpecies.Coconut, 10); - new ExtraTreeMutation(getVanilla("Teak"), getVanilla("Oak"), ExtraTreeSpecies.Cashew, 10); - new ExtraTreeMutation(getVanilla("Wenge"), getVanilla("Oak"), ExtraTreeSpecies.Avacado, 10); - new ExtraTreeMutation(getVanilla("Teak"), ExtraTreeSpecies.Clove, ExtraTreeSpecies.Nutmeg, 10); - new ExtraTreeMutation(getVanilla("Teak"), ExtraTreeSpecies.Clove, ExtraTreeSpecies.Allspice, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Allspice, ExtraTreeSpecies.Clove, ExtraTreeSpecies.StarAnise, 10); - new ExtraTreeMutation(getVanilla("Jungle"), ExtraTreeSpecies.Orange, ExtraTreeSpecies.Mango, 10); - new ExtraTreeMutation(ExtraTreeSpecies.StarAnise, ExtraTreeSpecies.Mango, ExtraTreeSpecies.Starfruit, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Gingko, ExtraTreeSpecies.Candlenut, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Gingko, ExtraTreeSpecies.Chilli, 10); - new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Alder, ExtraTreeSpecies.DwarfHazel, 10); + new ExtraTreeMutation(getVanilla("Cherry"), lemon, ExtraTreeSpecies.KeyLime.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.KeyLime.getSpecies(), lemon, ExtraTreeSpecies.FingerLime.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Cherry"), lemon, ExtraTreeSpecies.Pomelo.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Pomelo.getSpecies(), getVanilla("Cherry"), ExtraTreeSpecies.Manderin.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Pomelo.getSpecies(), lemon, ExtraTreeSpecies.Citron.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Manderin.getSpecies(), getVanilla("Cherry"), ExtraTreeSpecies.Kumquat.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Pomelo.getSpecies(), ExtraTreeSpecies.Manderin.getSpecies(), ExtraTreeSpecies.Orange.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Citron.getSpecies(), ExtraTreeSpecies.Manderin.getSpecies(), ExtraTreeSpecies.BuddhaHand.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Kumquat.getSpecies(), ExtraTreeSpecies.Manderin.getSpecies(), ExtraTreeSpecies.Tangerine.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Kumquat.getSpecies(), ExtraTreeSpecies.Manderin.getSpecies(), ExtraTreeSpecies.Satsuma.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Pomelo.getSpecies(), ExtraTreeSpecies.Orange.getSpecies(), ExtraTreeSpecies.Grapefruit.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Pomelo.getSpecies(), ExtraTreeSpecies.KeyLime.getSpecies(), ExtraTreeSpecies.Lime.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Oak"), getVanilla("Cherry"), ExtraTreeSpecies.OrchardApple.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple.getSpecies(), getVanilla("Maple"), ExtraTreeSpecies.SweetCrabapple.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple.getSpecies(), ExtraTreeSpecies.SweetCrabapple.getSpecies(), ExtraTreeSpecies.FloweringCrabapple.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple.getSpecies(), getVanilla("Birch"), ExtraTreeSpecies.PrairieCrabapple.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Plum"), ExtraTreeSpecies.OrchardApple.getSpecies(), ExtraTreeSpecies.Blackthorn.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Plum"), getVanilla("Cherry"), ExtraTreeSpecies.CherryPlum.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Plum"), getVanilla("Chestnut"), ExtraTreeSpecies.Peach.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Plum"), ExtraTreeSpecies.Peach.getSpecies(), ExtraTreeSpecies.Nectarine.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Plum"), ExtraTreeSpecies.Peach.getSpecies(), ExtraTreeSpecies.Apricot.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Plum"), getVanilla("Walnut"), ExtraTreeSpecies.Almond.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Lime"), getVanilla("Cherry"), ExtraTreeSpecies.WildCherry.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Willow"), getVanilla("Cherry"), ExtraTreeSpecies.SourCherry.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Cherry"), ExtraTreeSpecies.BlackCherry.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Jungle"), ExtraTreeSpecies.Banana.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Banana.getSpecies(), getVanilla("Kapok"), ExtraTreeSpecies.RedBanana.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Banana.getSpecies(), getVanilla("Teak"), ExtraTreeSpecies.Plantain.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Birch"), getVanilla("Oak"), ExtraTreeSpecies.Beech.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Birch"), ExtraTreeSpecies.Beech.getSpecies(), ExtraTreeSpecies.Alder.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.Beech.getSpecies(), ExtraTreeSpecies.Aspen.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Aspen.getSpecies(), ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.Rowan.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Beech.getSpecies(), ExtraTreeSpecies.Aspen.getSpecies(), ExtraTreeSpecies.Hazel.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Beech.getSpecies(), ExtraTreeSpecies.Rowan.getSpecies(), ExtraTreeSpecies.Hawthorn.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.Aspen.getSpecies(), ExtraTreeSpecies.Elder.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.Rowan.getSpecies(), ExtraTreeSpecies.Holly.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Willow"), ExtraTreeSpecies.Aspen.getSpecies(), ExtraTreeSpecies.Sallow.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Beech.getSpecies(), getVanilla("Birch"), ExtraTreeSpecies.Pecan.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Beech.getSpecies(), getVanilla("Spruce"), ExtraTreeSpecies.CopperBeech.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Lime"), getVanilla("Spruce"), ExtraTreeSpecies.Ash.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Ash.getSpecies(), getVanilla("Birch"), ExtraTreeSpecies.Whitebeam.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Ash.getSpecies(), getVanilla("Pine"), ExtraTreeSpecies.Elm.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Ash.getSpecies(), getVanilla("Larch"), ExtraTreeSpecies.Hornbeam.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Ash.getSpecies(), getVanilla("Maple"), ExtraTreeSpecies.Sycamore.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Larch"), getVanilla("Spruce"), ExtraTreeSpecies.Yew.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Larch"), ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.BalsamFir.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Pine"), ExtraTreeSpecies.BalsamFir.getSpecies(), ExtraTreeSpecies.Fir.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Pine"), ExtraTreeSpecies.Fir.getSpecies(), ExtraTreeSpecies.Hemlock.getSpecies(), 10).setHeight(80); + new ExtraTreeMutation(ExtraTreeSpecies.Fir.getSpecies(), getVanilla("Larch"), ExtraTreeSpecies.Cedar.getSpecies(), 10).setHeight(60); + new ExtraTreeMutation(ExtraTreeSpecies.Fir.getSpecies(), getVanilla("Spruce"), ExtraTreeSpecies.DouglasFir.getSpecies(), 10).setHeight(60); + new ExtraTreeMutation(getVanilla("Pine"), getVanilla("Spruce"), ExtraTreeSpecies.Cypress.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Pine"), getVanilla("Spruce"), ExtraTreeSpecies.LoblollyPine.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Walnut"), getVanilla("Cherry"), ExtraTreeSpecies.Butternut.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Walnut"), getVanilla("Oak"), ExtraTreeSpecies.AcornOak.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Cherry"), ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.Olive.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Maple"), getVanilla("Lime"), ExtraTreeSpecies.RedMaple.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Maple"), getVanilla("Larch"), ExtraTreeSpecies.Sweetgum.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Lime"), ExtraTreeSpecies.Locust.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Teak"), ExtraTreeSpecies.Iroko.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.OrchardApple.getSpecies(), getVanilla("Birch"), ExtraTreeSpecies.Pear.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Teak"), ExtraTreeSpecies.OldFustic.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.OldFustic.getSpecies(), getVanilla("Kapok"), ExtraTreeSpecies.OsangeOsange.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Teak"), ExtraTreeSpecies.Brazilwood.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Brazilwood.getSpecies(), getVanilla("Kapok"), ExtraTreeSpecies.Purpleheart.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Teak"), ExtraTreeSpecies.Rosewood.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Rosewood.getSpecies(), getVanilla("Kapok"), ExtraTreeSpecies.Logwood.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Wenge"), getVanilla("Lime"), ExtraTreeSpecies.Gingko.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Beech.getSpecies(), getVanilla("Jungle"), ExtraTreeSpecies.Brazilnut.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Jungle"), ExtraTreeSpecies.RoseGum.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.RoseGum.getSpecies(), getVanilla("Mahogony"), ExtraTreeSpecies.SwampGum.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Coffee.getSpecies(), getVanilla("Teak"), ExtraTreeSpecies.Clove.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Cherry"), getVanilla("Jungle"), ExtraTreeSpecies.Coffee.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Holly.getSpecies(), ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.Box.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Hemlock.getSpecies(), getVanilla("Jungle"), ExtraTreeSpecies.MonkeyPuzzle.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.RoseGum.getSpecies(), getVanilla("Balsa"), ExtraTreeSpecies.RainbowGum.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.RoseGum.getSpecies(), ExtraTreeSpecies.Brazilwood.getSpecies(), ExtraTreeSpecies.PinkIvory.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Cherry"), ExtraTreeSpecies.Elder.getSpecies(), ExtraTreeSpecies.Raspberry.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Cherry"), ExtraTreeSpecies.Elder.getSpecies(), ExtraTreeSpecies.Redcurrant.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.BlackCherry.getSpecies(), ExtraTreeSpecies.Redcurrant.getSpecies(), ExtraTreeSpecies.Blackcurrant.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.BlackCherry.getSpecies(), ExtraTreeSpecies.Raspberry.getSpecies(), ExtraTreeSpecies.Blackberry.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Blackberry.getSpecies(), ExtraTreeSpecies.Raspberry.getSpecies(), ExtraTreeSpecies.Blueberry.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Blackberry.getSpecies(), ExtraTreeSpecies.CherryPlum.getSpecies(), ExtraTreeSpecies.Cranberry.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Raspberry.getSpecies(), ExtraTreeSpecies.Fir.getSpecies(), ExtraTreeSpecies.Juniper.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Raspberry.getSpecies(), ExtraTreeSpecies.Lime.getSpecies(), ExtraTreeSpecies.Gooseberry.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Raspberry.getSpecies(), ExtraTreeSpecies.Orange.getSpecies(), ExtraTreeSpecies.GoldenRaspberry.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Teak"), ExtraTreeSpecies.Rosewood.getSpecies(), ExtraTreeSpecies.Cinnamon.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Balsa"), ExtraTreeSpecies.Brazilnut.getSpecies(), ExtraTreeSpecies.Coconut.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Teak"), getVanilla("Oak"), ExtraTreeSpecies.Cashew.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Wenge"), getVanilla("Oak"), ExtraTreeSpecies.Avacado.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Teak"), ExtraTreeSpecies.Clove.getSpecies(), ExtraTreeSpecies.Nutmeg.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Teak"), ExtraTreeSpecies.Clove.getSpecies(), ExtraTreeSpecies.Allspice.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Allspice.getSpecies(), ExtraTreeSpecies.Clove.getSpecies(), ExtraTreeSpecies.StarAnise.getSpecies(), 10); + new ExtraTreeMutation(getVanilla("Jungle"), ExtraTreeSpecies.Orange.getSpecies(), ExtraTreeSpecies.Mango.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.StarAnise.getSpecies(), ExtraTreeSpecies.Mango.getSpecies(), ExtraTreeSpecies.Starfruit.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Hazel.getSpecies(), ExtraTreeSpecies.Gingko.getSpecies(), ExtraTreeSpecies.Candlenut.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Hazel.getSpecies(), ExtraTreeSpecies.Gingko.getSpecies(), ExtraTreeSpecies.Chilli.getSpecies(), 10); + new ExtraTreeMutation(ExtraTreeSpecies.Hazel.getSpecies(), ExtraTreeSpecies.Alder.getSpecies(), ExtraTreeSpecies.DwarfHazel.getSpecies(), 10); } public static IAllele getVanilla(final String uid) { diff --git a/src/main/java/binnie/extratrees/genetics/ExtraTreeSpecies.java b/src/main/java/binnie/extratrees/genetics/ExtraTreeSpecies.java index 2979d201..f1e6848b 100644 --- a/src/main/java/binnie/extratrees/genetics/ExtraTreeSpecies.java +++ b/src/main/java/binnie/extratrees/genetics/ExtraTreeSpecies.java @@ -1,1129 +1,1599 @@ package binnie.extratrees.genetics; -import binnie.Binnie; import binnie.Constants; -import binnie.core.Mods; import binnie.core.genetics.ForestryAllele; -import binnie.extratrees.ExtraTrees; import binnie.extratrees.block.EnumExtraTreeLog; -import binnie.extratrees.gen.WorldGenAlder; -import binnie.extratrees.gen.WorldGenApple; -import binnie.extratrees.gen.WorldGenAsh; -import binnie.extratrees.gen.WorldGenBanana; -import binnie.extratrees.gen.WorldGenBeech; -import binnie.extratrees.gen.WorldGenConifer; -import binnie.extratrees.gen.WorldGenDefault; -import binnie.extratrees.gen.WorldGenEucalyptus; -import binnie.extratrees.gen.WorldGenFir; -import binnie.extratrees.gen.WorldGenHolly; -import binnie.extratrees.gen.WorldGenJungle; -import binnie.extratrees.gen.WorldGenLazy; -import binnie.extratrees.gen.WorldGenMaple; -import binnie.extratrees.gen.WorldGenPalm; -import binnie.extratrees.gen.WorldGenPoplar; -import binnie.extratrees.gen.WorldGenShrub; -import binnie.extratrees.gen.WorldGenSorbus; -import binnie.extratrees.gen.WorldGenTree; -import binnie.extratrees.gen.WorldGenTree2; -import binnie.extratrees.gen.WorldGenTree3; -import binnie.extratrees.gen.WorldGenTropical; -import binnie.extratrees.gen.WorldGenWalnut; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; -import com.mojang.authlib.GameProfile; -import forestry.api.apiculture.EnumBeeChromosome; -import forestry.api.arboriculture.EnumForestryWoodType; -import forestry.api.arboriculture.EnumGermlingType; -import forestry.api.arboriculture.EnumLeafType; -import forestry.api.arboriculture.EnumTreeChromosome; -import forestry.api.arboriculture.EnumVanillaWoodType; -import forestry.api.arboriculture.IAlleleFruit; -import forestry.api.arboriculture.IAlleleTreeSpecies; -import forestry.api.arboriculture.ILeafSpriteProvider; -import forestry.api.arboriculture.ITree; -import forestry.api.arboriculture.ITreeGenerator; -import forestry.api.arboriculture.ITreeGenome; -import forestry.api.arboriculture.ITreeRoot; -import forestry.api.arboriculture.IWoodProvider; -import forestry.api.arboriculture.IWoodType; -import forestry.api.arboriculture.TreeManager; -import forestry.api.arboriculture.WoodBlockKind; -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; -import forestry.api.core.IModelManager; +import binnie.extratrees.gen.*; +import forestry.api.arboriculture.*; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAllele; +import forestry.api.genetics.IChromosomeType; import forestry.api.genetics.IClassification; -import forestry.api.genetics.IFruitFamily; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.IMutation; -import forestry.api.world.ITreeGenData; -import forestry.arboriculture.PluginArboriculture; -import forestry.arboriculture.genetics.Tree; -import forestry.arboriculture.tiles.TileLeaves; -import forestry.core.tiles.TileUtil; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.block.model.ModelBakery; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import forestry.arboriculture.worldgen.WorldGenLemon; +import forestry.arboriculture.worldgen.WorldGenPlum; import net.minecraft.world.gen.feature.WorldGenerator; -import net.minecraftforge.common.EnumPlantType; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import org.apache.commons.lang3.StringUtils; -import javax.annotation.Nonnull; import java.awt.*; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; -public class ExtraTreeSpecies implements IAlleleTreeSpecies//, IIconProvider, IGermlingIconProvider -{ - public static final ExtraTreeSpecies OrchardApple = new ExtraTreeSpecies("malus", "domestica", 6588464, 16751859, 8092283, EnumExtraTreeLog.Apple, ExtraTreeFruitGene.Apple, SaplingType.Default, WorldGenApple.OrchardApple.class); - public static final ExtraTreeSpecies SweetCrabapple = new ExtraTreeSpecies("malus", "coronaria", 8034643, 16528799, 8092283, EnumExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, SaplingType.Default, WorldGenApple.SweetCrabapple.class); - public static final ExtraTreeSpecies FloweringCrabapple = new ExtraTreeSpecies("malus", "hopa", 8034643, 16528799, 8092283, EnumExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, SaplingType.Default, WorldGenApple.FloweringCrabapple.class); - public static final ExtraTreeSpecies PrairieCrabapple = new ExtraTreeSpecies("malus", "ioensis", 8034643, 16528799, 8092283, EnumExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, SaplingType.Default, WorldGenApple.PrairieCrabapple.class); - public static final ExtraTreeSpecies Blackthorn = new ExtraTreeSpecies("prunus", "spinosa ", 7180062, 16746439, 11961953, EnumForestryWoodType.PLUM, ExtraTreeFruitGene.Blackthorn, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies CherryPlum = new ExtraTreeSpecies("prunus", "cerasifera", 7180062, 16746439, 11961953, EnumForestryWoodType.PLUM, ExtraTreeFruitGene.CherryPlum, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Peach = new ExtraTreeSpecies("prunus", "persica", 7180062, 16721562, 11961953, EnumForestryWoodType.PLUM, ExtraTreeFruitGene.Peach, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Nectarine = new ExtraTreeSpecies("prunus", "nectarina", 7180062, 16721562, 11961953, EnumForestryWoodType.PLUM, ExtraTreeFruitGene.Nectarine, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Apricot = new ExtraTreeSpecies("prunus", "armeniaca", 7180062, 16103640, 11961953, EnumForestryWoodType.PLUM, ExtraTreeFruitGene.Apricot, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Almond = new ExtraTreeSpecies("prunus", "amygdalus", 7180062, 16090304, 11961953, EnumForestryWoodType.PLUM, ExtraTreeFruitGene.Almond, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies WildCherry = new ExtraTreeSpecies("prunus", "avium", 7180062, 16247798, 7432272, EnumExtraTreeLog.Cherry, ExtraTreeFruitGene.WildCherry, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies SourCherry = new ExtraTreeSpecies("prunus", "cerasus", 7180062, 16247798, 7432272, EnumExtraTreeLog.Cherry, ExtraTreeFruitGene.SourCherry, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies BlackCherry = new ExtraTreeSpecies("prunus", "serotina", 7180062, 16441848, 7432272, EnumExtraTreeLog.Cherry, ExtraTreeFruitGene.BlackCherry, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Orange = new ExtraTreeSpecies("citrus", "sinensis", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Orange, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Manderin = new ExtraTreeSpecies("citrus", "reticulata", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Manderin, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Satsuma = new ExtraTreeSpecies("citrus", "unshiu", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Satsuma, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Tangerine = new ExtraTreeSpecies("citrus", "tangerina", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Tangerine, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Lime = new ExtraTreeSpecies("citrus", "latifolia", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Lime, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies KeyLime = new ExtraTreeSpecies("citrus", "aurantifolia", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.KeyLime, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies FingerLime = new ExtraTreeSpecies("citrus", "australasica", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.FingerLime, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Pomelo = new ExtraTreeSpecies("citrus", "maxima", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Pomelo, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Grapefruit = new ExtraTreeSpecies("citrus", "paradisi", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Grapefruit, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Kumquat = new ExtraTreeSpecies("citrus", "margarita", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Kumquat, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Citron = new ExtraTreeSpecies("citrus", "medica", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.Citron, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies BuddhaHand = new ExtraTreeSpecies("citrus", "sarcodactylus", 8957780, 10729552, 5983033, EnumForestryWoodType.CITRUS, ExtraTreeFruitGene.BuddhaHand, SaplingType.Fruit, (Class) null); - public static final ExtraTreeSpecies Banana = new ExtraTreeSpecies("musa", "sinensis", 10603918, 4515072, 8753743, EnumExtraTreeLog.Banana, ExtraTreeFruitGene.Banana, SaplingType.Default, WorldGenBanana.class); - public static final ExtraTreeSpecies RedBanana = new ExtraTreeSpecies("musa", "rubra", 10603918, 4515072, 8753743, EnumExtraTreeLog.Banana, ExtraTreeFruitGene.RedBanana, SaplingType.Default, WorldGenBanana.class); - public static final ExtraTreeSpecies Plantain = new ExtraTreeSpecies("musa", "paradisiaca", 10603918, 4515072, 8753743, EnumExtraTreeLog.Banana, ExtraTreeFruitGene.Plantain, SaplingType.Default, WorldGenBanana.class); - public static final ExtraTreeSpecies Butternut = new ExtraTreeSpecies("juglans", "cinerea", 8566156, 8576396, 12037536, EnumExtraTreeLog.Butternut, ExtraTreeFruitGene.Butternut, SaplingType.Default, WorldGenWalnut.Butternut.class); - public static final ExtraTreeSpecies Rowan = new ExtraTreeSpecies("sorbus", "aucuparia", 10405787, 10414258, 11972763, EnumExtraTreeLog.Rowan, (IAlleleFruit) null, SaplingType.Default, WorldGenSorbus.Rowan.class); - public static final ExtraTreeSpecies Hemlock = new ExtraTreeSpecies("tsuga", "heterophylla", 6073458, 6082930, 11379611, EnumExtraTreeLog.Hemlock, (IAlleleFruit) null, SaplingType.Default, WorldGenConifer.WesternHemlock.class); - public static final ExtraTreeSpecies Ash = new ExtraTreeSpecies("fraxinus", "excelsior", 4754987, 4777003, 9013634, EnumExtraTreeLog.Ash, (IAlleleFruit) null, SaplingType.Default, WorldGenAsh.CommonAsh.class); - public static final ExtraTreeSpecies Alder = new ExtraTreeSpecies("alnus", "glutinosa", 6916659, 6925875, 13025464, EnumExtraTreeLog.Alder, (IAlleleFruit) null, SaplingType.Default, WorldGenAlder.CommonAlder.class); - public static final ExtraTreeSpecies Beech = new ExtraTreeSpecies("fagus", "sylvatica", 8626252, 8635980, 11702654, EnumExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, SaplingType.Default, WorldGenBeech.CommonBeech.class); - public static final ExtraTreeSpecies CopperBeech = new ExtraTreeSpecies("fagus", "purpurea", 8393496, 13720397, 11702654, EnumExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, SaplingType.Default, WorldGenBeech.CopperBeech.class); - public static final ExtraTreeSpecies Aspen = new ExtraTreeSpecies("populus", "tremula", 9096247, 9101711, 9217671, EnumForestryWoodType.POPLAR, (IAlleleFruit) null, SaplingType.Default, WorldGenPoplar.Aspen.class); - public static final ExtraTreeSpecies Yew = new ExtraTreeSpecies("taxus", "baccata", 9734733, 9743949, 13745089, EnumExtraTreeLog.Yew, (IAlleleFruit) null, SaplingType.Default, WorldGenConifer.Yew.class); - public static final ExtraTreeSpecies Cypress = new ExtraTreeSpecies("chamaecyparis", "lawsoniana", 9030055, 9035206, 10126467, EnumExtraTreeLog.Cypress, (IAlleleFruit) null, SaplingType.Poplar, WorldGenConifer.Cypress.class); - public static final ExtraTreeSpecies DouglasFir = new ExtraTreeSpecies("pseudotsuga", "menziesii", 10073474, 10080682, 8553346, EnumExtraTreeLog.Fir, (IAlleleFruit) null, SaplingType.Default, WorldGenFir.DouglasFir.class); - public static final ExtraTreeSpecies Hazel = new ExtraTreeSpecies("Corylus", "avellana", 10204498, 10215762, 11180143, EnumExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, SaplingType.Default, WorldGenTree3.Hazel.class); - public static final ExtraTreeSpecies Sycamore = new ExtraTreeSpecies("ficus", "sycomorus", 10528047, 11851100, 8418135, EnumExtraTreeLog.Fig, ExtraTreeFruitGene.Fig, SaplingType.Default, WorldGenTree3.Sycamore.class); - public static final ExtraTreeSpecies Whitebeam = new ExtraTreeSpecies("sorbus", "aria", 12242585, 7505471, 7891565, EnumExtraTreeLog.Whitebeam, (IAlleleFruit) null, SaplingType.Default, WorldGenSorbus.Whitebeam.class); - public static final ExtraTreeSpecies Hawthorn = new ExtraTreeSpecies("crataegus", "monogyna", 7055434, 10008443, 6248261, EnumExtraTreeLog.Hawthorn, (IAlleleFruit) null, SaplingType.Default, WorldGenTree3.Hawthorn.class); - public static final ExtraTreeSpecies Pecan = new ExtraTreeSpecies("carya", "illinoinensis", 8762996, 2906139, 4076848, EnumExtraTreeLog.Hickory, ExtraTreeFruitGene.Pecan, SaplingType.Default, WorldGenTree3.Pecan.class); - public static final ExtraTreeSpecies Elm = new ExtraTreeSpecies("ulmus", "procera", 8163400, 8175176, 8684422, EnumExtraTreeLog.Elm, (IAlleleFruit) null, SaplingType.Default, WorldGenTree3.Elm.class); - public static final ExtraTreeSpecies Elder = new ExtraTreeSpecies("sambucus", "nigra", 11450483, 14739389, 14202996, EnumExtraTreeLog.Elder, ExtraTreeFruitGene.Elderberry, SaplingType.Default, WorldGenTree3.Elder.class); - public static final ExtraTreeSpecies Holly = new ExtraTreeSpecies("ilex", "aquifolium", 2444108, 7246468, 11905669, EnumExtraTreeLog.Holly, (IAlleleFruit) null, SaplingType.Default, WorldGenHolly.Holly.class); - public static final ExtraTreeSpecies Hornbeam = new ExtraTreeSpecies("carpinus", "betulus", 9873179, 9887003, 10719862, EnumExtraTreeLog.Hornbeam, (IAlleleFruit) null, SaplingType.Default, WorldGenTree3.Hornbeam.class); - public static final ExtraTreeSpecies Sallow = new ExtraTreeSpecies("salix", "caprea", 11449123, 12053541, 10590869, EnumForestryWoodType.WILLOW, (IAlleleFruit) null, SaplingType.Default, WorldGenTree3.Sallow.class); - public static final ExtraTreeSpecies AcornOak = new ExtraTreeSpecies("quercus", "robur", 6714174, 10396209, 6376752, EnumVanillaWoodType.OAK, ExtraTreeFruitGene.Acorn, SaplingType.Default, WorldGenTree3.AcornOak.class); - public static final ExtraTreeSpecies Fir = new ExtraTreeSpecies("abies", "alba", 7306272, 7328032, 8553346, EnumExtraTreeLog.Fir, (IAlleleFruit) null, SaplingType.Default, WorldGenFir.SilverFir.class); - public static final ExtraTreeSpecies Cedar = new ExtraTreeSpecies("cedrus", "libani", 9806704, 9824368, 11368015, EnumExtraTreeLog.Cedar, (IAlleleFruit) null, SaplingType.Default, WorldGenConifer.Cedar.class); - public static final ExtraTreeSpecies Olive = new ExtraTreeSpecies("olea", "europaea", 3950644, 3950644, 8089706, EnumExtraTreeLog.Olive, ExtraTreeFruitGene.Olive, SaplingType.Default, WorldGenTree2.Olive.class); - public static final ExtraTreeSpecies RedMaple = new ExtraTreeSpecies("acer", "ubrum", 15216151, 15216151, 9078657, EnumForestryWoodType.MAPLE, (IAlleleFruit) null, SaplingType.Default, WorldGenMaple.RedMaple.class); - public static final ExtraTreeSpecies BalsamFir = new ExtraTreeSpecies("abies", "balsamea", 7643260, 7643260, 8553346, EnumExtraTreeLog.Fir, (IAlleleFruit) null, SaplingType.Default, WorldGenFir.BalsamFir.class); - public static final ExtraTreeSpecies LoblollyPine = new ExtraTreeSpecies("pinus", "taeda", 7309895, 7309895, 7558729, EnumForestryWoodType.PINE, (IAlleleFruit) null, SaplingType.Default, WorldGenConifer.LoblollyPine.class); - public static final ExtraTreeSpecies Sweetgum = new ExtraTreeSpecies("liquidambar", "styraciflua", 9144162, 9144162, 10592668, EnumExtraTreeLog.Sweetgum, (IAlleleFruit) null, SaplingType.Default, WorldGenTree2.Sweetgum.class); - public static final ExtraTreeSpecies Locust = new ExtraTreeSpecies("robinia", "pseudoacacia", 8942336, 8942336, 11381948, EnumExtraTreeLog.Locust, (IAlleleFruit) null, SaplingType.Default, WorldGenTree2.Locust.class); - public static final ExtraTreeSpecies Pear = new ExtraTreeSpecies("pyrus", "communis", 6195238, 6195238, 11048825, EnumExtraTreeLog.Pear, ExtraTreeFruitGene.Pear, SaplingType.Default, WorldGenTree2.Pear.class); - public static final ExtraTreeSpecies OsangeOsange = new ExtraTreeSpecies("maclura", "pomifera", 6847056, 6847056, 9131828, EnumExtraTreeLog.Maclura, ExtraTreeFruitGene.OsangeOsange, SaplingType.Default, WorldGenJungle.OsangeOsange.class); - public static final ExtraTreeSpecies OldFustic = new ExtraTreeSpecies("maclura", "tinctoria", 6847056, 6847056, 9131828, EnumExtraTreeLog.Maclura, (IAlleleFruit) null, SaplingType.Default, WorldGenJungle.OldFustic.class); - public static final ExtraTreeSpecies Brazilwood = new ExtraTreeSpecies("caesalpinia", "echinata", 6321241, 6321241, 10387560, EnumExtraTreeLog.Brazilwood, (IAlleleFruit) null, SaplingType.Default, WorldGenJungle.Brazilwood.class); - public static final ExtraTreeSpecies Logwood = new ExtraTreeSpecies("haematoxylum", "campechianum", 8953707, 8953707, 16376530, EnumExtraTreeLog.Logwood, (IAlleleFruit) null, SaplingType.Default, WorldGenJungle.Logwood.class); - public static final ExtraTreeSpecies Rosewood = new ExtraTreeSpecies("dalbergia", "latifolia", 8887074, 8887074, 10061414, EnumExtraTreeLog.Rosewood, (IAlleleFruit) null, SaplingType.Default, WorldGenJungle.Rosewood.class); - public static final ExtraTreeSpecies Purpleheart = new ExtraTreeSpecies("peltogyne", "spp", 7835477, 7835477, 9671330, EnumExtraTreeLog.Purpleheart, (IAlleleFruit) null, SaplingType.Default, WorldGenJungle.Purpleheart.class); - public static final ExtraTreeSpecies Iroko = new ExtraTreeSpecies("milicia", "excelsa", 11520108, 11520108, 6315099, EnumExtraTreeLog.Iroko, (IAlleleFruit) null, SaplingType.Default, WorldGenTree2.Iroko.class); - public static final ExtraTreeSpecies Gingko = new ExtraTreeSpecies("ginkgo", "biloba", 7444049, 7444049, 11382428, EnumExtraTreeLog.Gingko, ExtraTreeFruitGene.GingkoNut, SaplingType.Default, WorldGenTree2.Gingko.class); - public static final ExtraTreeSpecies Brazilnut = new ExtraTreeSpecies("bertholletia", "excelsa", 8163195, 8163195, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.BrazilNut, SaplingType.Default, WorldGenJungle.BrazilNut.class); - public static final ExtraTreeSpecies RoseGum = new ExtraTreeSpecies("eucalyptus", "grandis", 10265176, 10265176, 15392474, EnumExtraTreeLog.Eucalyptus, (IAlleleFruit) null, SaplingType.Default, WorldGenEucalyptus.RoseGum.class); - public static final ExtraTreeSpecies SwampGum = new ExtraTreeSpecies("eucalyptus", "grandis", 10667654, 10667654, 8814181, EnumExtraTreeLog.Eucalyptus2, (IAlleleFruit) null, SaplingType.Default, WorldGenEucalyptus.SwampGum.class); - public static final ExtraTreeSpecies Box = new ExtraTreeSpecies("boxus", "sempervirens", 7510381, 7510381, 11235159, EnumExtraTreeLog.Box, (IAlleleFruit) null, SaplingType.Default, WorldGenTree2.Box.class); - public static final ExtraTreeSpecies Clove = new ExtraTreeSpecies("syzygium", "aromaticum", 8028703, 8028703, 11235159, EnumExtraTreeLog.Syzgium, ExtraTreeFruitGene.Clove, SaplingType.Default, WorldGenTree2.Clove.class); - public static final ExtraTreeSpecies Coffee = new ExtraTreeSpecies("coffea", "arabica", 7311461, 7311461, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Coffee, SaplingType.Default, WorldGenJungle.Coffee.class); - public static final ExtraTreeSpecies MonkeyPuzzle = new ExtraTreeSpecies("araucaria", "araucana", 5726552, 5726552, 7558729, EnumForestryWoodType.PINE, (IAlleleFruit) null, SaplingType.Default, WorldGenConifer.MonkeyPuzzle.class); - public static final ExtraTreeSpecies RainbowGum = new ExtraTreeSpecies("eucalyptus", "deglupta", 12054565, 12054565, 7123007, EnumExtraTreeLog.Eucalyptus3, (IAlleleFruit) null, SaplingType.Default, WorldGenEucalyptus.RainbowGum.class); - public static final ExtraTreeSpecies PinkIvory = new ExtraTreeSpecies("berchemia", "zeyheri", 8163673, 8163673, 8349012, EnumExtraTreeLog.PinkIvory, (IAlleleFruit) null, SaplingType.Default, WorldGenTree.class); - public static final ExtraTreeSpecies Blackcurrant = new ExtraTreeSpecies("ribes", "nigrum", 10934876, 10934876, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Blackcurrant, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Redcurrant = new ExtraTreeSpecies("ribes", "rubrum", 7646208, 7646208, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Redcurrant, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Blackberry = new ExtraTreeSpecies("rubus", "fruticosus", 9617755, 9617755, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Blackberry, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Raspberry = new ExtraTreeSpecies("rubus", "idaeus", 8632686, 8632686, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Raspberry, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Blueberry = new ExtraTreeSpecies("vaccinium", "corymbosum", 7522128, 7522128, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Blueberry, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Cranberry = new ExtraTreeSpecies("vaccinium", "oxycoccos", 9884025, 9884025, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Cranberry, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Juniper = new ExtraTreeSpecies("juniperus", "communis", 9482569, 9482569, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Juniper, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Gooseberry = new ExtraTreeSpecies("ribes", "grossularia", 7977728, 7977728, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.Gooseberry, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies GoldenRaspberry = new ExtraTreeSpecies("rubus", "occidentalis", 8632686, 8632686, 16777215, EnumExtraTreeLog.EMPTY, ExtraTreeFruitGene.GoldenRaspberry, SaplingType.Shrub, WorldGenShrub.Shrub.class); - public static final ExtraTreeSpecies Cinnamon = new ExtraTreeSpecies("cinnamomum", "cassia", 7573003, 7573003, 8804412, EnumExtraTreeLog.Cinnamon, (IAlleleFruit) null, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies Coconut = new ExtraTreeSpecies("cocous", "nucifera", 6592803, 6592803, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Coconut, SaplingType.Default, WorldGenPalm.Coconut.class); - public static final ExtraTreeSpecies Cashew = new ExtraTreeSpecies("anacardium", "occidentale", 11254114, 11254114, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Cashew, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies Avacado = new ExtraTreeSpecies("persea", "americana", 9872245, 9872245, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Avacado, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies Nutmeg = new ExtraTreeSpecies("myristica", "fragrans", 4754764, 4754764, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Nutmeg, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies Allspice = new ExtraTreeSpecies("pimenta", "dioica", 8165156, 8165156, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Allspice, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies Chilli = new ExtraTreeSpecies("capsicum", "annuum", 2793217, 2793217, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Chilli, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies StarAnise = new ExtraTreeSpecies("illicium", "verum", 8373257, 8373257, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.StarAnise, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies Mango = new ExtraTreeSpecies("mangifera", "indica", 8893812, 8893812, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Mango, SaplingType.Default, WorldGenTropical.Mango.class); - public static final ExtraTreeSpecies Starfruit = new ExtraTreeSpecies("averrhoa", "carambola", 7186733, 7186733, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Starfruit, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies Candlenut = new ExtraTreeSpecies("aleurites", "moluccana", 9085804, 9085804, 5456154, EnumVanillaWoodType.JUNGLE, ExtraTreeFruitGene.Candlenut, SaplingType.Default, WorldGenLazy.Tree.class); - public static final ExtraTreeSpecies DwarfHazel = new ExtraTreeSpecies("Corylus", "americana", 10204498, 10215762, 11180143, EnumExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, SaplingType.Shrub, WorldGenShrub.Shrub.class); +public enum ExtraTreeSpecies { + OrchardApple("malus", "domestica", EnumLeafType.DECIDUOUS, new Color(0x09E67E), new Color(0xFF9CF3),EnumSaplingType.Default, EnumExtraTreeLog.Apple, new Color(0x7B7A7B), WorldGenApple.OrchardApple.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Apple); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Higher.getAllele()); + } + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + SweetCrabapple("malus", "coronaria", EnumLeafType.DECIDUOUS, new Color(0x7A9953), new Color(0xFC359F),EnumSaplingType.Default, EnumExtraTreeLog.Apple, new Color(0x7B7A7B), WorldGenApple.SweetCrabapple.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Crabapple); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + FloweringCrabapple("malus", "hopa", EnumLeafType.DECIDUOUS, new Color(0x7A9953), new Color(0xFC359F),EnumSaplingType.Default, EnumExtraTreeLog.Apple, new Color(0x7B7A7B), WorldGenApple.FloweringCrabapple.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Crabapple); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + PrairieCrabapple("malus", "ioensis", EnumLeafType.DECIDUOUS, new Color(0x7A9953), new Color(0xFC359F), EnumSaplingType.Default, EnumExtraTreeLog.Apple, new Color(0x7B7A7B), WorldGenApple.PrairieCrabapple.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Crabapple); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Blackthorn("prunus", "spinosa", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF87C7), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Blackthorn); + template.set(EnumTreeChromosome.HEIGHT,ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD,ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS,ForestryAllele.Sappiness.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + CherryPlum("prunus", "cerasifera", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF87C7), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.CherryPlum); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS,ForestryAllele.Sappiness.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Peach("prunus", "persica", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF269A), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Peach); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Nectarine("prunus", "nectarina", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFF269A), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Nectarine); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Apricot("prunus", "armeniaca", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xF5B8D8), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Apricot); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Almond("prunus", "amygdalus", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xF584C0), EnumSaplingType.Fruit, EnumForestryWoodType.PLUM, new Color(0xB68661), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Almond); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());; + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + WildCherry("prunus", "avium", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xF7EBF6), EnumSaplingType.Fruit, EnumExtraTreeLog.Cherry, new Color(0x716850), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.WildCherry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + SourCherry("prunus", "cerasus", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xF7EBF6), EnumSaplingType.Fruit, EnumExtraTreeLog.Cherry, new Color(0x716850), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.SourCherry); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());; + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + BlackCherry("prunus", "serotina", EnumLeafType.DECIDUOUS, new Color(0x6D8F1E), new Color(0xFAE1F8), EnumSaplingType.Fruit, EnumExtraTreeLog.Cherry, new Color(0x716850), WorldGenPlum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.BlackCherry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Orange("citrus", "sinensis", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Orange); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Manderin("citrus", "reticulata", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Manderin); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Satsuma("citrus", "unshiu", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Satsuma); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.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()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Tangerine("citrus", "tangerina", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Tangerine); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Lime("citrus", "latifolia", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Lime); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + KeyLime("citrus", "aurantifolia", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.KeyLime); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + FingerLime("citrus", "australasica", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.FingerLime); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Pomelo("citrus", "maxima", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Pomelo); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Grapefruit("citrus", "paradisi", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Grapefruit); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Kumquat("citrus", "margarita", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Kumquat); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Citron("citrus", "medica", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Citron); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + BuddhaHand("citrus", "sarcodactylus", EnumLeafType.JUNGLE, new Color(0x88AF54), new Color(0xA3B850), EnumSaplingType.Fruit, EnumForestryWoodType.CITRUS, new Color(0x5B4B39), WorldGenLemon.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.BuddhaHand); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Banana("musa", "sinensis", EnumLeafType.PALM, new Color(0xA1CD8E), new Color(0x44E500), EnumSaplingType.Default, EnumExtraTreeLog.Banana, new Color(0x85924F), WorldGenBanana.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Banana); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + RedBanana("musa", "rubra", EnumLeafType.PALM, new Color(0xA1CD8E), new Color(0x44E500), EnumSaplingType.Default, EnumExtraTreeLog.Banana, new Color(0x85924F), WorldGenBanana.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.RedBanana); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Plantain("musa", "paradisiaca", EnumLeafType.PALM, new Color(0xA1CD8E), new Color(0x44E500), EnumSaplingType.Default, EnumExtraTreeLog.Banana, new Color(0x85924F), WorldGenBanana.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Plantain); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Butternut("juglans", "cinerea", EnumLeafType.DECIDUOUS, new Color(0x82B58C), new Color(0x82DD8C), EnumSaplingType.Default, EnumExtraTreeLog.Butternut, new Color(0xB7ADA0), WorldGenWalnut.Butternut.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Butternut); + template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele()); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Rowan("sorbus", "aucuparia", EnumLeafType.DECIDUOUS, new Color(0x9EC79B), new Color(0x9EE8B2), EnumSaplingType.Default, EnumExtraTreeLog.Rowan, new Color(0xB6B09B), WorldGenSorbus.Rowan.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Larger.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Hemlock("tsuga", "heterophylla", EnumLeafType.CONIFERS, new Color(0x5CAC72), new Color(0x5CD172), EnumSaplingType.Default, EnumExtraTreeLog.Hemlock, new Color(0xADA39B), WorldGenConifer.WesternHemlock.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slower.getAllele()); + template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele()); + } + }, + Ash("fraxinus", "excelsior", EnumLeafType.DECIDUOUS, new Color(0x488E2B), new Color(0x48E42B), EnumSaplingType.Default, EnumExtraTreeLog.Ash, new Color(0x898982), WorldGenAsh.CommonAsh.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Alder("alnus", "glutinosa", EnumLeafType.DECIDUOUS, new Color(0x698A33), new Color(0x69AE33), EnumSaplingType.Default, EnumExtraTreeLog.Alder, new Color(0xC6C0B8), WorldGenAlder.CommonAlder.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Beech("fagus", "sylvatica", EnumLeafType.DECIDUOUS, new Color(0x83A04C), new Color(0x83C64C), EnumSaplingType.Default, EnumExtraTreeLog.Beech, new Color(0xB2917E), WorldGenBeech.CommonBeech.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Beechnut); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + CopperBeech("fagus", "purpurea", EnumLeafType.DECIDUOUS, new Color(0x801318), new Color(0xD15B4D), EnumSaplingType.Default, EnumExtraTreeLog.Beech, new Color(0xB2917E), WorldGenBeech.CopperBeech.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Beechnut); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Aspen("populus", "tremula", EnumLeafType.DECIDUOUS, new Color(0x8ACC37), new Color(0x8AE18F), EnumSaplingType.Default, EnumForestryWoodType.POPLAR, new Color(0x8CA687), WorldGenPoplar.Aspen.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Yew("taxus", "baccata", EnumLeafType.CONIFERS, new Color(0x948A4D), new Color(0x94AE4D), EnumSaplingType.Default, EnumExtraTreeLog.Yew, new Color(0xD1BBC1), WorldGenConifer.Yew.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + }, + Cypress("chamaecyparis", "lawsoniana", EnumLeafType.CONIFERS, new Color(0x89C9A7), new Color(0x89DDC6), EnumSaplingType.Poplar, EnumExtraTreeLog.Cypress, new Color(0x9A8483), WorldGenConifer.Cypress.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Larger.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele()); + } + }, + DouglasFir("pseudotsuga", "menziesii", EnumLeafType.CONIFERS, new Color(0x99B582), new Color(0x99D1AA), EnumSaplingType.Default, EnumExtraTreeLog.Fir, new Color(0x828382), WorldGenFir.DouglasFir.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele()); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slower.getAllele()); + } + }, + Hazel("Corylus", "avellana", EnumLeafType.DECIDUOUS, new Color(0x9BB552), new Color(0x9BE152), EnumSaplingType.Default, EnumExtraTreeLog.Hazel, new Color(0xAA986F), WorldGenTree3.Hazel.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Hazelnut); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Sycamore("ficus", "sycomorus", EnumLeafType.DECIDUOUS, new Color(0xA0A52F), new Color(0xB4D55C), EnumSaplingType.Default, EnumExtraTreeLog.Fig, new Color(0x807357), WorldGenTree3.Sycamore.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Fig); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Whitebeam("sorbus", "aria", EnumLeafType.DECIDUOUS, new Color(0xBACE99), new Color(0x72863F), EnumSaplingType.Default, EnumExtraTreeLog.Whitebeam, new Color(0x786A6D), WorldGenSorbus.Whitebeam.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + } + }, + Hawthorn("crataegus", "monogyna", EnumLeafType.DECIDUOUS, new Color(0x6BA84A), new Color(0x98B77B), EnumSaplingType.Default, EnumExtraTreeLog.Hawthorn, new Color(0x5F5745), WorldGenTree3.Hawthorn.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Pecan("carya", "illinoinensis", EnumLeafType.DECIDUOUS, new Color(0x85B674), new Color(0x2C581B), EnumSaplingType.Default, EnumExtraTreeLog.Hickory, new Color(0x3E3530), WorldGenTree3.Pecan.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Pecan); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Elm("ulmus", "procera", EnumLeafType.DECIDUOUS, new Color(0x7C9048), new Color(0x7CBE48), EnumSaplingType.Default, EnumExtraTreeLog.Elm, new Color(0x848386), WorldGenTree3.Elm.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + } + }, + Elder("sambucus", "nigra", EnumLeafType.DECIDUOUS, new Color(0xAEB873), new Color(0xE0E7BD), EnumSaplingType.Default, EnumExtraTreeLog.Elder, new Color(0xD8B874), WorldGenTree3.Elder.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Elderberry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Holly("ilex", "aquifolium", EnumLeafType.DECIDUOUS, new Color(0x254B4C), new Color(0x6E9284), EnumSaplingType.Default, EnumExtraTreeLog.Holly, new Color(0xB5AA85), WorldGenHolly.Holly.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Hornbeam("carpinus", "betulus", EnumLeafType.DECIDUOUS, new Color(0x96A71B), new Color(0x96DD1B), EnumSaplingType.Default, EnumExtraTreeLog.Hornbeam, new Color(0xA39276), WorldGenTree3.Hornbeam.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Sallow("salix", "caprea", EnumLeafType.WILLOW, new Color(0xAEB323), new Color(0xB7EC25), EnumSaplingType.Default, EnumForestryWoodType.WILLOW, new Color(0xA19A95), WorldGenTree3.Sallow.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + AcornOak("quercus", "robur", EnumLeafType.DECIDUOUS, new Color(0x66733E), new Color(0x9EA231), EnumSaplingType.Default, EnumVanillaWoodType.OAK, new Color(0x614D30), WorldGenTree3.AcornOak.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Acorn); + template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele()); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Fir("abies", "alba", EnumLeafType.CONIFERS, new Color(0x6F7C20), new Color(0x6FD120), EnumSaplingType.Default, EnumExtraTreeLog.Fir, new Color(0x828382), WorldGenFir.SilverFir.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele()); + } + }, + Cedar("cedrus", "libani", EnumLeafType.CONIFERS, new Color(0x95A370), new Color(0x95E870), EnumSaplingType.Default, EnumExtraTreeLog.Cedar, new Color(0xAD764F), WorldGenConifer.Cedar.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele()); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slower.getAllele()); + } + }, + Olive("olea", "europaea", EnumLeafType.DECIDUOUS, new Color(0x3C4834), new Color(0x3C4834), EnumSaplingType.Default, EnumExtraTreeLog.Olive, new Color(0x7B706A), WorldGenTree2.Olive.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Olive); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + RedMaple("acer", "ubrum", EnumLeafType.MAPLE, new Color(0xE82E17), new Color(0xE82E17), EnumSaplingType.Default, EnumForestryWoodType.MAPLE, new Color(0x8A8781), WorldGenMaple.RedMaple.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.High.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + BalsamFir("abies", "balsamea", EnumLeafType.CONIFERS, new Color(0x74A07C), new Color(0x74A07C), EnumSaplingType.Default, EnumExtraTreeLog.Fir, new Color(0x828382), WorldGenFir.BalsamFir.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele()); + } + }, + LoblollyPine("pinus", "taeda", EnumLeafType.CONIFERS, new Color(0x6F8A47), new Color(0x6F8A47), EnumSaplingType.Default, EnumForestryWoodType.PINE, new Color(0x735649), WorldGenConifer.LoblollyPine.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slow.getAllele()); + } + }, + Sweetgum("liquidambar", "styraciflua", EnumLeafType.DECIDUOUS, new Color(0x8B8762), new Color(0x8B8762), EnumSaplingType.Default, EnumExtraTreeLog.Sweetgum, new Color(0xA1A19C), WorldGenTree2.Sweetgum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.High.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Locust("robinia", "pseudoacacia", EnumLeafType.DECIDUOUS, new Color(0x887300), new Color(0x887300), EnumSaplingType.Default, EnumExtraTreeLog.Locust, new Color(0xADACBC), WorldGenTree2.Locust.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Pear("pyrus", "communis", EnumLeafType.DECIDUOUS, new Color(0x5E8826), new Color(0x5E8826), EnumSaplingType.Default, EnumExtraTreeLog.Pear, new Color(0xA89779), WorldGenTree2.Pear.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Pear); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + OsangeOsange("maclura", "pomifera", EnumLeafType.JUNGLE, new Color(0x687A50), new Color(0x687A50), EnumSaplingType.Default, EnumExtraTreeLog.Maclura, new Color(0x8B5734), WorldGenJungle.OsangeOsange.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.OsangeOsange); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + OldFustic("maclura", "tinctoria", EnumLeafType.JUNGLE, new Color(0x687A50), new Color(0x687A50), EnumSaplingType.Default, EnumExtraTreeLog.Maclura, new Color(0x8B5734), WorldGenJungle.OldFustic.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Brazilwood("caesalpinia", "echinata", EnumLeafType.JUNGLE, new Color(0x607459), new Color(0x607459), EnumSaplingType.Default, EnumExtraTreeLog.Brazilwood, new Color(0x9E8068), WorldGenJungle.Brazilwood.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Logwood("haematoxylum", "campechianum", EnumLeafType.JUNGLE, new Color(0x889F6B), new Color(0x889F6B), EnumSaplingType.Default, EnumExtraTreeLog.Logwood, new Color(0xF9E2D2), WorldGenJungle.Logwood.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Rosewood("dalbergia", "latifolia", EnumLeafType.JUNGLE, new Color(0x879B22), new Color(0x879B22), EnumSaplingType.Default, EnumExtraTreeLog.Rosewood, new Color(0x998666), WorldGenJungle.Rosewood.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lowest.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Purpleheart("peltogyne", "spp", EnumLeafType.JUNGLE, new Color(0x778F55), new Color(0x778F55), EnumSaplingType.Default, EnumExtraTreeLog.Purpleheart, new Color(0x9392A2), WorldGenJungle.Purpleheart.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Iroko("milicia", "excelsa", EnumLeafType.DECIDUOUS, new Color(0xAFC86C), new Color(0xAFC86C), EnumSaplingType.Default, EnumExtraTreeLog.Iroko, new Color(0x605C5B), WorldGenTree2.Iroko.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Gingko("ginkgo", "biloba", EnumLeafType.JUNGLE, new Color(0x719651), new Color(0x719651), EnumSaplingType.Default, EnumExtraTreeLog.Gingko, new Color(0xADAE9C), WorldGenTree2.Gingko.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.GingkoNut); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Brazilnut("bertholletia", "excelsa", EnumLeafType.JUNGLE, new Color(0x7C8F7B), new Color(0x7C8F7B), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenJungle.BrazilNut.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.BrazilNut); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Larger.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + RoseGum("eucalyptus", "grandis", EnumLeafType.JUNGLE, new Color(0x9CA258), new Color(0x9CA258), EnumSaplingType.Default, EnumExtraTreeLog.Eucalyptus, new Color(0xEADEDA), WorldGenEucalyptus.RoseGum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Largest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slowest.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + SwampGum("eucalyptus", "grandis", EnumLeafType.JUNGLE, new Color(0xA2C686), new Color(0xA2C686), EnumSaplingType.Default, EnumExtraTreeLog.Eucalyptus2, new Color(0x867E65), WorldGenEucalyptus.SwampGum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele()); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Slower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Box("boxus", "sempervirens", EnumLeafType.DECIDUOUS, new Color(0x72996D), new Color(0x72996D), EnumSaplingType.Default, EnumExtraTreeLog.Box, new Color(0xAB6F57), WorldGenTree2.Box.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Clove("syzygium", "aromaticum", EnumLeafType.DECIDUOUS, new Color(0x7A821F), new Color(0x7A821F), EnumSaplingType.Default, EnumExtraTreeLog.Syzgium, new Color(0xAB6F57), WorldGenTree2.Clove.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Clove); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Coffee("coffea", "arabica", EnumLeafType.JUNGLE, new Color(0x6F9065), new Color(0x6F9065), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenJungle.Coffee.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Coffee); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Large.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + MonkeyPuzzle("araucaria", "araucana", EnumLeafType.CONIFERS, new Color(0x576158), new Color(0x576158), EnumSaplingType.Default, EnumForestryWoodType.PINE, new Color(0x735649), WorldGenConifer.MonkeyPuzzle.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.GIRTH, ForestryAllele.Int.Int2.getAllele()); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + RainbowGum("eucalyptus", "deglupta", EnumLeafType.JUNGLE, new Color(0xB7F025), new Color(0xB7F025), EnumSaplingType.Default, EnumExtraTreeLog.Eucalyptus3, new Color(0x6CB03F), WorldGenEucalyptus.RainbowGum.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + PinkIvory("berchemia", "zeyheri", EnumLeafType.DECIDUOUS, new Color(0x7C9159), new Color(0x7C9159), EnumSaplingType.Default, EnumExtraTreeLog.PinkIvory, new Color(0x7F6554), WorldGenTree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Blackcurrant("ribes", "nigrum", EnumLeafType.DECIDUOUS, new Color(0xA6DA5C), new Color(0xA6DA5C), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Blackcurrant); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Redcurrant("ribes", "rubrum", EnumLeafType.DECIDUOUS, new Color(0x74AC00), new Color(0x74AC00), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Redcurrant); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.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()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Blackberry("rubus", "fruticosus", EnumLeafType.DECIDUOUS, new Color(0x92C15B), new Color(0x92C15B), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Blackberry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Raspberry("rubus", "idaeus", EnumLeafType.DECIDUOUS, new Color(0x83B96E), new Color(0x83B96E), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Raspberry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Blueberry("vaccinium", "corymbosum", EnumLeafType.DECIDUOUS, new Color(0x72C750), new Color(0x72C750), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Blueberry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.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()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Cranberry("vaccinium", "oxycoccos", EnumLeafType.DECIDUOUS, new Color(0x96D179), new Color(0x96D179), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Cranberry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Juniper("juniperus", "communis", EnumLeafType.CONIFERS, new Color(0x90B149), new Color(0x90B149), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Juniper); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Gooseberry("ribes", "grossularia", EnumLeafType.DECIDUOUS, new Color(0x79BB00), new Color(0x79BB00), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Gooseberry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.High.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + GoldenRaspberry("rubus", "occidentalis", EnumLeafType.DECIDUOUS, new Color(0x83B96E), new Color(0x83B96E), EnumSaplingType.Shrub, EnumExtraTreeLog.EMPTY, new Color(0xFFFFFF), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.GoldenRaspberry); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fastest.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + species.addFruitFamily(ExtraTreeFruitFamily.Berry); + } + }, + Cinnamon("cinnamomum", "cassia", EnumLeafType.JUNGLE, new Color(0x738E0B), new Color(0x738E0B), EnumSaplingType.Default, EnumExtraTreeLog.Cinnamon, new Color(0x86583C), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Coconut("cocous", "nucifera", EnumLeafType.PALM, new Color(0x649923), new Color(0x649923), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenPalm.Coconut.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Coconut); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + } + }, + Cashew("anacardium", "occidentale", EnumLeafType.JUNGLE, new Color(0xABB962), new Color(0xABB962), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Cashew); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Avacado("persea", "americana", EnumLeafType.JUNGLE, new Color(0x96A375), new Color(0x96A375), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Avacado); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Nutmeg("myristica", "fragrans", EnumLeafType.JUNGLE, new Color(0x488D4C), new Color(0x488D4C), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Nutmeg); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Allspice("pimenta", "dioica", EnumLeafType.JUNGLE, new Color(0x7C9724), new Color(0x7C9724), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Allspice); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Chilli("capsicum", "annuum", EnumLeafType.JUNGLE, new Color(0x2A9F01), new Color(0x2A9F01), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Chilli); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Higher.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + StarAnise("illicium", "verum", EnumLeafType.JUNGLE, new Color(0x7FC409), new Color(0x7FC409), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.StarAnise); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Average.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.High.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + Mango("mangifera", "indica", EnumLeafType.JUNGLE, new Color(0x87B574), new Color(0x87B574), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenTropical.Mango.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Mango); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smaller.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Low.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.pomes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Starfruit("averrhoa", "carambola", EnumLeafType.JUNGLE, new Color(0x6DA92D), new Color(0x6DA92D), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Starfruit); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Average.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(ExtraTreeFruitFamily.Citrus); + } + }, + Candlenut("aleurites", "moluccana", EnumLeafType.DECIDUOUS, new Color(0x8AA36C), new Color(0x8AA36C), EnumSaplingType.Default, EnumVanillaWoodType.JUNGLE, new Color(0x53411A), WorldGenLazy.Tree.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Candlenut); + template.set(EnumTreeChromosome.HEIGHT, ForestryAllele.TreeHeight.Smallest.getAllele()); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Lowest.getAllele()); + template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Low.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.jungle")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }, + DwarfHazel("Corylus", "americana", EnumLeafType.DECIDUOUS, new Color(0x9BB552), new Color(0x9BE152), EnumSaplingType.Shrub, EnumExtraTreeLog.Hazel, new Color(0xAA986F), WorldGenShrub.Shrub.class){ + @Override + protected void setAlleles(AlleleTemplate template) { + template.set(EnumTreeChromosome.FRUITS, ExtraTreeFruitGene.Hazelnut); + template.set(EnumTreeChromosome.FERTILITY, ForestryAllele.Saplings.Average.getAllele()); + template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele()); + template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Faster.getAllele()); + } + + @Override + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.prunes")); + species.addFruitFamily(AlleleManager.alleleRegistry.getFruitFamily("forestry.nuts")); + } + }; + + private String branchName; + private String binomial; + private Color leafColor; + private Color leafPollinatedColor; + private Color woodColor; private EnumLeafType leafType; - private SaplingType saplingType; - ArrayList families; - int girth; - Class gen; - IAlleleFruit fruit; - IAllele[] template; - int color; - String binomial; - //String uid; - IWoodType wood; - IWoodProvider woodProvider; - String branchName; - IClassification branch; + private ILeafSpriteProvider leafSpriteProvider; + private EnumSaplingType saplingType; + private IWoodType woodType; + private IWoodProvider woodProvider; + private ITreeGenerator treeGenerator; + private IClassification branch; + private IAlleleTreeSpecies species; + private ITreeGenome genome; + private AlleleTemplate template; + private static final String unlocalizedName = "extratrees.species.%s.name"; + private static final String unlocalizedDesc = "extratrees.species.%s.desc"; - private static LinkedList list; - private static BiMap namesMap; - private static Map revNamesMap; + ExtraTreeSpecies(String branch, String binomial, EnumLeafType leafType, Color leafColor, Color leafPollinatedColor, EnumSaplingType saplingType, IWoodType woodType, Color woodColor, Class treeGenerator) { + this.binomial = binomial; + this.leafType = leafType; + this.leafColor = leafColor; + this.leafPollinatedColor = leafPollinatedColor; + this.leafSpriteProvider = TreeManager.treeFactory.getLeafIconProvider(leafType, leafColor, leafPollinatedColor); + this.saplingType = saplingType; + this.woodType = woodType; + this.woodProvider = new WoodProvider(woodType); + this.treeGenerator = new TreeGenerator(treeGenerator, woodType); + this.woodColor = woodColor; + this.branchName = branch; - public static List values() { - if (list == null) { - list = new LinkedList<>(); - for (Field f : ExtraTreeSpecies.class.getFields()) { - if (f.getType() == ExtraTreeSpecies.class) { - try { - list.add((ExtraTreeSpecies) f.get(ExtraTreeSpecies.AcornOak)); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - } - } - } - return list; } - public static Map names() { - if (revNamesMap == null) { - TreeMap m = new TreeMap(String.CASE_INSENSITIVE_ORDER); - m.putAll(namesMap.inverse()); - revNamesMap = m; + public static void initTrees() { + for (ExtraTreeSpecies tree : values()) { + tree.init(); } - return revNamesMap; - } - - public String getSpeciesName() { - if (namesMap == null) { - namesMap = HashBiMap.create(); - for (Field f : ExtraTreeSpecies.class.getFields()) { - if (f.getType() == ExtraTreeSpecies.class) { - try { - namesMap.put((ExtraTreeSpecies) f.get(ExtraTreeSpecies.AcornOak), f.getName()); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - } - } - - } - String value = namesMap.get(this); - if (value == null || value.isEmpty()) { - throw new RuntimeException("Name not found for:" + value); - } - return namesMap.get(this); - } - - public static void init() { - final String bookArborist = "Arborist Manual"; - for (final ExtraTreeSpecies species : values()) { - species.preInit(); - } - ExtraTreeSpecies.OrchardApple.finished(); - ExtraTreeSpecies.SweetCrabapple.finished(); - ExtraTreeSpecies.FloweringCrabapple.finished(); - ExtraTreeSpecies.PrairieCrabapple.finished(); - final ExtraTreeSpecies[] arr$2; - final ExtraTreeSpecies[] pruneSpecies = arr$2 = new ExtraTreeSpecies[]{ - ExtraTreeSpecies.Blackthorn, ExtraTreeSpecies.CherryPlum, ExtraTreeSpecies.Almond, ExtraTreeSpecies.Apricot, - ExtraTreeSpecies.Peach, ExtraTreeSpecies.Nectarine, ExtraTreeSpecies.WildCherry, ExtraTreeSpecies.SourCherry, - ExtraTreeSpecies.BlackCherry}; - for (final ExtraTreeSpecies species2 : arr$2) { - final IAlleleTreeSpecies citrus = (IAlleleTreeSpecies) AlleleManager.alleleRegistry.getAllele("forestry.treePlum"); - species2.setWorldGen(citrus.getGenerator().getWorldGenerator(TreeManager.treeRoot.templateAsIndividual(citrus.getRoot().getDefaultTemplate())).getClass()); - species2.saplingType = SaplingType.Fruit; - species2.finished(); - } - ExtraTreeSpecies[] arr$3; - final ExtraTreeSpecies[] citrusSpecies = arr$3 = new ExtraTreeSpecies[]{ - ExtraTreeSpecies.Orange, ExtraTreeSpecies.Manderin, ExtraTreeSpecies.Satsuma, ExtraTreeSpecies.Tangerine, - ExtraTreeSpecies.Lime, ExtraTreeSpecies.KeyLime, ExtraTreeSpecies.FingerLime, ExtraTreeSpecies.Pomelo, - ExtraTreeSpecies.Grapefruit, ExtraTreeSpecies.Kumquat, ExtraTreeSpecies.Citron, ExtraTreeSpecies.BuddhaHand}; - for (final ExtraTreeSpecies species3 : arr$3) { - species3.setLeafType(EnumLeafType.JUNGLE); - species3.saplingType = SaplingType.Fruit; - final IAlleleTreeSpecies citrus2 = (IAlleleTreeSpecies) AlleleManager.alleleRegistry.getAllele("forestry.treeLemon"); - species3.setWorldGen(citrus2.getGenerator().getWorldGenerator(TreeManager.treeRoot.templateAsIndividual(citrus2.getRoot().getDefaultTemplate())).getClass()); - species3.finished(); - } - ExtraTreeSpecies.Banana.setLeafType(EnumLeafType.PALM); - ExtraTreeSpecies.RedBanana.setLeafType(EnumLeafType.PALM); - ExtraTreeSpecies.Plantain.setLeafType(EnumLeafType.PALM); - ExtraTreeSpecies.Banana.finished(); - ExtraTreeSpecies.RedBanana.finished(); - ExtraTreeSpecies.Plantain.finished(); - ExtraTreeSpecies.Hemlock.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.Butternut.finished(); - ExtraTreeSpecies.Butternut.setGirth(2); - ExtraTreeSpecies.Rowan.finished(); - ExtraTreeSpecies.Hemlock.finished(); - ExtraTreeSpecies.Hemlock.setGirth(2); - ExtraTreeSpecies.Ash.finished(); - ExtraTreeSpecies.Alder.finished(); - ExtraTreeSpecies.Beech.finished(); - ExtraTreeSpecies.CopperBeech.finished(); - ExtraTreeSpecies.Aspen.finished(); - ExtraTreeSpecies.Yew.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.Cypress.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.DouglasFir.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.Yew.finished(); - ExtraTreeSpecies.Cypress.finished(); - ExtraTreeSpecies.Cypress.saplingType = SaplingType.Poplar; - ExtraTreeSpecies.DouglasFir.finished(); - ExtraTreeSpecies.DouglasFir.setGirth(2); - ExtraTreeSpecies.Hazel.finished(); - ExtraTreeSpecies.DwarfHazel.finished(); - ExtraTreeSpecies.DwarfHazel.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Sycamore.finished(); - ExtraTreeSpecies.Whitebeam.finished(); - ExtraTreeSpecies.Hawthorn.finished(); - ExtraTreeSpecies.Pecan.finished(); - ExtraTreeSpecies.Fir.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.Cedar.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.Sallow.setLeafType(EnumLeafType.WILLOW); - ExtraTreeSpecies.Elm.finished(); - ExtraTreeSpecies.Elder.finished(); - ExtraTreeSpecies.Holly.finished(); - ExtraTreeSpecies.Hornbeam.finished(); - ExtraTreeSpecies.Sallow.finished(); - ExtraTreeSpecies.AcornOak.finished(); - ExtraTreeSpecies.AcornOak.setGirth(2); - ExtraTreeSpecies.Fir.finished(); - ExtraTreeSpecies.Cedar.finished(); - ExtraTreeSpecies.Cedar.setGirth(2); - ExtraTreeSpecies.RedMaple.setLeafType(EnumLeafType.MAPLE); - ExtraTreeSpecies.BalsamFir.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.LoblollyPine.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.Olive.finished(); - ExtraTreeSpecies.RedMaple.finished(); - ExtraTreeSpecies.BalsamFir.finished(); - ExtraTreeSpecies.LoblollyPine.finished(); - ExtraTreeSpecies.Sweetgum.finished(); - ExtraTreeSpecies.Locust.finished(); - ExtraTreeSpecies.Pear.finished(); - ExtraTreeSpecies.OsangeOsange.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.OldFustic.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Brazilwood.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Logwood.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Rosewood.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Purpleheart.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.OsangeOsange.finished(); - ExtraTreeSpecies.OldFustic.finished(); - ExtraTreeSpecies.Brazilwood.finished(); - ExtraTreeSpecies.Logwood.finished(); - ExtraTreeSpecies.Rosewood.finished(); - ExtraTreeSpecies.Purpleheart.finished(); - ExtraTreeSpecies.Gingko.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Brazilnut.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.RoseGum.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.SwampGum.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Coffee.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.MonkeyPuzzle.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.RainbowGum.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Iroko.finished(); - ExtraTreeSpecies.Gingko.finished(); - ExtraTreeSpecies.Brazilnut.finished(); - ExtraTreeSpecies.RoseGum.finished(); - ExtraTreeSpecies.SwampGum.finished(); - ExtraTreeSpecies.SwampGum.setGirth(2); - ExtraTreeSpecies.Box.finished(); - ExtraTreeSpecies.Clove.finished(); - ExtraTreeSpecies.Coffee.finished(); - ExtraTreeSpecies.MonkeyPuzzle.finished(); - ExtraTreeSpecies.MonkeyPuzzle.setGirth(2); - ExtraTreeSpecies.RainbowGum.finished(); - ExtraTreeSpecies.PinkIvory.finished(); - ExtraTreeSpecies.Juniper.setLeafType(EnumLeafType.CONIFERS); - ExtraTreeSpecies.Blackcurrant.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Redcurrant.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Blackberry.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Raspberry.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Blueberry.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Cranberry.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Juniper.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.Gooseberry.saplingType = SaplingType.Shrub; - ExtraTreeSpecies.GoldenRaspberry.saplingType = SaplingType.Shrub; - for (final ExtraTreeSpecies species3 : values()) { - final String scientific = species3.branchName.substring(0, 1).toUpperCase() + species3.branchName.substring(1).toLowerCase(); - final String uid = "trees." + species3.branchName.toLowerCase(); - IClassification branch = AlleleManager.alleleRegistry.getClassification("genus." + uid); - if (branch == null) { - branch = AlleleManager.alleleRegistry.createAndRegisterClassification(IClassification.EnumClassLevel.GENUS, uid, scientific); - } - (species3.branch = branch).addMemberSpecies(species3); - } - ExtraTreeSpecies.Cinnamon.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Coconut.setLeafType(EnumLeafType.PALM); - ExtraTreeSpecies.Cashew.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Avacado.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Nutmeg.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Allspice.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Chilli.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.StarAnise.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Mango.setLeafType(EnumLeafType.JUNGLE); - ExtraTreeSpecies.Starfruit.setLeafType(EnumLeafType.JUNGLE); - 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 = ExtraTreeFruitFamily.Berry; - final IFruitFamily familyCitrus = ExtraTreeFruitFamily.Citrus; - ExtraTreeSpecies.OrchardApple.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.SweetCrabapple.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.FloweringCrabapple.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.PrairieCrabapple.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Blackthorn.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.CherryPlum.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Peach.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Nectarine.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Apricot.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Almond.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.WildCherry.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.SourCherry.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.BlackCherry.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Orange.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Manderin.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Satsuma.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Tangerine.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Lime.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.KeyLime.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.FingerLime.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Pomelo.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Grapefruit.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Kumquat.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Citron.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.BuddhaHand.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Banana.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.RedBanana.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Plantain.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Butternut.addFamily(familyPome).addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus); - ExtraTreeSpecies.Rowan.addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Ash.addFamily(familyPome).addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus); - ExtraTreeSpecies.Alder.addFamily(familyPome).addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.Beech.addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.CopperBeech.addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.Aspen.addFamily(familyPome).addFamily(familyNuts); - ExtraTreeSpecies.Hazel.addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.Sycamore.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus); - ExtraTreeSpecies.Whitebeam.addFamily(familyPome).addFamily(familyPrune); - ExtraTreeSpecies.Hawthorn.addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.Pecan.addFamily(familyPome).addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus); - ExtraTreeSpecies.Elm.addFamily(familyPome).addFamily(familyPrune); - ExtraTreeSpecies.Elder.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus).addFamily(familyBerry); - ExtraTreeSpecies.Holly.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Hornbeam.addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.Sallow.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.AcornOak.addFamily(familyPome).addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.Olive.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus); - ExtraTreeSpecies.RedMaple.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.Sweetgum.addFamily(familyNuts); - ExtraTreeSpecies.Locust.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus); - ExtraTreeSpecies.Pear.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus); - ExtraTreeSpecies.OsangeOsange.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus).addFamily(familyJungle); - ExtraTreeSpecies.OldFustic.addFamily(familyJungle); - ExtraTreeSpecies.Brazilwood.addFamily(familyJungle); - ExtraTreeSpecies.Logwood.addFamily(familyJungle); - ExtraTreeSpecies.Rosewood.addFamily(familyJungle); - ExtraTreeSpecies.Purpleheart.addFamily(familyJungle); - ExtraTreeSpecies.Iroko.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Gingko.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Brazilnut.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.RoseGum.addFamily(familyJungle); - ExtraTreeSpecies.SwampGum.addFamily(familyJungle); - ExtraTreeSpecies.Box.addFamily(familyPome).addFamily(familyPrune).addFamily(familyNuts).addFamily(familyCitrus); - ExtraTreeSpecies.Clove.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Coffee.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.MonkeyPuzzle.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.RainbowGum.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.PinkIvory.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Blackcurrant.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Redcurrant.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Blackberry.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Raspberry.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Blueberry.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Cranberry.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Juniper.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Gooseberry.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.GoldenRaspberry.addFamily(familyPrune).addFamily(familyNuts).addFamily(familyBerry); - ExtraTreeSpecies.Cinnamon.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Coconut.addFamily(familyJungle); - ExtraTreeSpecies.Cashew.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Avacado.addFamily(familyPrune).addFamily(familyCitrus).addFamily(familyJungle); - ExtraTreeSpecies.Nutmeg.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Allspice.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Chilli.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.StarAnise.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.Mango.addFamily(familyPome).addFamily(familyPrune).addFamily(familyCitrus).addFamily(familyJungle); - ExtraTreeSpecies.Starfruit.addFamily(familyPrune).addFamily(familyCitrus).addFamily(familyJungle); - ExtraTreeSpecies.Candlenut.addFamily(familyNuts).addFamily(familyJungle); - ExtraTreeSpecies.DwarfHazel.addFamily(familyPrune).addFamily(familyNuts); - ExtraTreeSpecies.OrchardApple.setYield(ForestryAllele.Yield.Higher).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.SweetCrabapple.setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Average).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.FloweringCrabapple.setFertility(ForestryAllele.Saplings.Average).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.PrairieCrabapple.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Average); - ExtraTreeSpecies.Blackthorn.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Average).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.CherryPlum.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Average).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Peach.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Average); - ExtraTreeSpecies.Nectarine.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Average); - ExtraTreeSpecies.Apricot.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Average); - ExtraTreeSpecies.Almond.setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.WildCherry.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.SourCherry.setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.BlackCherry.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Lowest).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Orange.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Average).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Manderin.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.Satsuma.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Tangerine.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Average).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Lime.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.KeyLime.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Lowest).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.FingerLime.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Pomelo.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Grapefruit.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Kumquat.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.Citron.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Average); - ExtraTreeSpecies.BuddhaHand.setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.Banana.setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.RedBanana.setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Plantain.setHeight(ForestryAllele.TreeHeight.Average).setYield(ForestryAllele.Yield.Lower); - ExtraTreeSpecies.Butternut.setHeight(ForestryAllele.TreeHeight.Smaller).setYield(ForestryAllele.Yield.Low); - ExtraTreeSpecies.Rowan.setHeight(ForestryAllele.TreeHeight.Larger).setFertility(ForestryAllele.Saplings.Low).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Hemlock.setHeight(ForestryAllele.TreeHeight.Average).setFertility(ForestryAllele.Saplings.Low).setMaturation(ForestryAllele.Maturation.Slower); - ExtraTreeSpecies.Ash.setFertility(ForestryAllele.Saplings.Low).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Alder.setHeight(ForestryAllele.TreeHeight.Average).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Beech.setHeight(ForestryAllele.TreeHeight.Average).setYield(ForestryAllele.Yield.Lower); - ExtraTreeSpecies.CopperBeech.setMaturation(ForestryAllele.Maturation.Slow); - ExtraTreeSpecies.Aspen.setFertility(ForestryAllele.Saplings.Average).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Yew.setHeight(ForestryAllele.TreeHeight.Large).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Cypress.setHeight(ForestryAllele.TreeHeight.Larger).setFertility(ForestryAllele.Saplings.Low).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Slow); - ExtraTreeSpecies.DouglasFir.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setMaturation(ForestryAllele.Maturation.Slower); - ExtraTreeSpecies.Hazel.setHeight(ForestryAllele.TreeHeight.Average).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Sycamore.setFertility(ForestryAllele.Saplings.Lowest).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Whitebeam.setHeight(ForestryAllele.TreeHeight.Smaller); - ExtraTreeSpecies.Hawthorn.setHeight(ForestryAllele.TreeHeight.Average); - ExtraTreeSpecies.Pecan.setHeight(ForestryAllele.TreeHeight.Large).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Slow); - ExtraTreeSpecies.Elm.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setSappiness(ForestryAllele.Sappiness.Average); - ExtraTreeSpecies.Elder.setHeight(ForestryAllele.TreeHeight.Smaller).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.Holly.setHeight(ForestryAllele.TreeHeight.Average).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.Hornbeam.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Lower).setMaturation(ForestryAllele.Maturation.Slow); - ExtraTreeSpecies.Sallow.setHeight(ForestryAllele.TreeHeight.Large).setFertility(ForestryAllele.Saplings.Low); - ExtraTreeSpecies.AcornOak.setHeight(ForestryAllele.TreeHeight.Large).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Fir.setHeight(ForestryAllele.TreeHeight.Large).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Slow); - ExtraTreeSpecies.Cedar.setHeight(ForestryAllele.TreeHeight.Smaller).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Slower); - ExtraTreeSpecies.Olive.setYield(ForestryAllele.Yield.Average); - ExtraTreeSpecies.RedMaple.setFertility(ForestryAllele.Saplings.Average).setSappiness(ForestryAllele.Sappiness.High); - ExtraTreeSpecies.BalsamFir.setHeight(ForestryAllele.TreeHeight.Average).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Slow); - ExtraTreeSpecies.LoblollyPine.setHeight(ForestryAllele.TreeHeight.Smaller).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Slow); - ExtraTreeSpecies.Sweetgum.setHeight(ForestryAllele.TreeHeight.Average).setFertility(ForestryAllele.Saplings.High).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Average); - ExtraTreeSpecies.Locust.setHeight(ForestryAllele.TreeHeight.Smallest); - ExtraTreeSpecies.Pear.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.OsangeOsange.setYield(ForestryAllele.Yield.Lower); - ExtraTreeSpecies.OldFustic.setHeight(ForestryAllele.TreeHeight.Smaller).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Brazilwood.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Logwood.setHeight(ForestryAllele.TreeHeight.Average).setFertility(ForestryAllele.Saplings.Low).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Rosewood.setHeight(ForestryAllele.TreeHeight.Average).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Purpleheart.setHeight(ForestryAllele.TreeHeight.Large).setSappiness(ForestryAllele.Sappiness.Lower); - ExtraTreeSpecies.Iroko.setHeight(ForestryAllele.TreeHeight.Average).setFertility(ForestryAllele.Saplings.Low); - ExtraTreeSpecies.Gingko.setHeight(ForestryAllele.TreeHeight.Large).setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.Brazilnut.setHeight(ForestryAllele.TreeHeight.Larger).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.RoseGum.setHeight(ForestryAllele.TreeHeight.Largest).setFertility(ForestryAllele.Saplings.Lowest).setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Slowest); - ExtraTreeSpecies.SwampGum.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Lowest).setMaturation(ForestryAllele.Maturation.Slower); - ExtraTreeSpecies.Box.setHeight(ForestryAllele.TreeHeight.Smaller).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Clove.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Coffee.setHeight(ForestryAllele.TreeHeight.Large).setYield(ForestryAllele.Yield.Average).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.MonkeyPuzzle.setHeight(ForestryAllele.TreeHeight.Average).setYield(ForestryAllele.Yield.Lower).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.RainbowGum.setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Lower); - ExtraTreeSpecies.PinkIvory.setHeight(ForestryAllele.TreeHeight.Smallest); - ExtraTreeSpecies.Blackcurrant.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Redcurrant.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Average).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Blackberry.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Raspberry.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Blueberry.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Average).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Cranberry.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Average).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Juniper.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Low).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.Gooseberry.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.High).setYield(ForestryAllele.Yield.High).setMaturation(ForestryAllele.Maturation.Faster); - ExtraTreeSpecies.GoldenRaspberry.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Fastest); - ExtraTreeSpecies.Cinnamon.setHeight(ForestryAllele.TreeHeight.Average).setYield(ForestryAllele.Yield.Lower).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Coconut.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Cashew.setYield(ForestryAllele.Yield.Low); - ExtraTreeSpecies.Avacado.setHeight(ForestryAllele.TreeHeight.Smallest).setYield(ForestryAllele.Yield.Average); - ExtraTreeSpecies.Nutmeg.setHeight(ForestryAllele.TreeHeight.Smaller).setYield(ForestryAllele.Yield.High).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.Allspice.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.High); - ExtraTreeSpecies.Chilli.setHeight(ForestryAllele.TreeHeight.Smaller).setYield(ForestryAllele.Yield.Higher).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.StarAnise.setHeight(ForestryAllele.TreeHeight.Average).setYield(ForestryAllele.Yield.High); - ExtraTreeSpecies.Mango.setHeight(ForestryAllele.TreeHeight.Smaller).setFertility(ForestryAllele.Saplings.Low).setYield(ForestryAllele.Yield.Average).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Starfruit.setYield(ForestryAllele.Yield.Average).setMaturation(ForestryAllele.Maturation.Fast); - ExtraTreeSpecies.Candlenut.setHeight(ForestryAllele.TreeHeight.Smallest).setFertility(ForestryAllele.Saplings.Lowest).setYield(ForestryAllele.Yield.Low).setSappiness(ForestryAllele.Sappiness.Low); - ExtraTreeSpecies.DwarfHazel.setFertility(ForestryAllele.Saplings.Average).setSappiness(ForestryAllele.Sappiness.Lower).setMaturation(ForestryAllele.Maturation.Faster); - } - - private ExtraTreeSpecies addFamily(final IFruitFamily family) { - this.families.add(family); - return this; - } - - static final ItemStack getEBXLStack(final String name) { - try { - final Class elements = Class.forName("extrabiomes.lib.Element"); - final Method getElementMethod = elements.getMethod("valueOf", String.class); - final Method getItemStack = elements.getMethod("get"); - final Object element = getElementMethod.invoke(null, "SAPLING_AUTUMN_YELLOW"); - return (ItemStack) getItemStack.invoke(element); - } catch (Exception e) { - throw new RuntimeException(e); + for (ExtraTreeSpecies tree : values()) { + tree.registerMutations(); } } - private void setWorldGen(final Class gen) { - this.gen = gen; - } - - private void setGirth(final int i) { - this.template[EnumTreeChromosome.GIRTH.ordinal()] = AlleleManager.alleleRegistry.getAllele("forestry.i" + i + "d"); + public static void preInitTrees() { + for (ExtraTreeSpecies tree : values()) { + tree.preInit(); + } } public void preInit() { - this.template = Binnie.Genetics.getTreeRoot().getDefaultTemplate(); - this.template[EnumTreeChromosome.SPECIES.ordinal()] = this; - if (this.fruit != null) { - this.template[EnumTreeChromosome.FRUITS.ordinal()] = this.fruit; - } - this.template[EnumTreeChromosome.GIRTH.ordinal()] = AlleleManager.alleleRegistry.getAllele("forestry.i" + this.girth + "d"); - final IClassification clas = AlleleManager.alleleRegistry.getClassification("trees." + this.branch); - if (clas != null) { - clas.addMemberSpecies(this); - this.branch = clas; + final String scientific = StringUtils.capitalize(branchName); + final String uid = "trees." + branchName; + branch = AlleleManager.alleleRegistry.getClassification("genus." + uid); + if (branch == null) { + branch = AlleleManager.alleleRegistry.createAndRegisterClassification(IClassification.EnumClassLevel.GENUS, uid, scientific); } + IAlleleTreeSpeciesBuilder speciesBuilder = TreeManager.treeFactory.createSpecies(getUID(), String.format(unlocalizedName, getUID()), getAuthority(), String.format(unlocalizedDesc, getUID()), isDominant(), + branch, getBinomial(), Constants.EXTRA_TREES_MOD_ID, leafSpriteProvider, saplingType.getGermlingModelProvider(leafColor, woodColor), woodProvider, treeGenerator); + setSpeciesProperties(speciesBuilder); + species = speciesBuilder.build(); + branch.addMemberSpecies(species); + } + public void init() { + template = new AlleleTemplate(); + template.set(EnumTreeChromosome.SPECIES, species); + setAlleles(template); + genome = TreeManager.treeRoot.templateAsGenome(template.getAlleles()); + TreeManager.treeRoot.registerTemplate(template.getAlleles()); + } + + protected void setSpeciesProperties(IAlleleTreeSpeciesBuilder species) { } - int colorPollineted; - int woodColor; + protected void setAlleles(AlleleTemplate template) { - private ExtraTreeSpecies(final String branch, final String binomial, final int color, final int polColor, final int woodColor, final IWoodType wood, final IAlleleFruit fruit, SaplingType saplingType, final Class gen) { - this.leafType = EnumLeafType.DECIDUOUS; - this.saplingType = saplingType; - this.families = new ArrayList<>(); - this.girth = 1; - this.fruit = null; - this.color = color; - this.colorPollineted = new Color(color).brighter().getRGB(); - this.wood = wood; - this.fruit = fruit; - this.gen = ((gen == null) ? WorldGenTree.class : gen); - this.branchName = branch; - this.binomial = binomial; - this.woodProvider = new WoodProvider(this.wood); - this.woodColor = woodColor; - this.colorPollineted = polColor; - //this.uid = getSpeciesName().toLowerCase().trim(); - } -///TODO - - @Override - public boolean equals(Object obj) { - return obj == this; } - @Override - public int getSpriteColour(int renderPass) { - return getGermlingColour(EnumGermlingType.SAPLING, renderPass); + protected void registerMutations() { + } - @Override - public int compareTo(@Nonnull IAlleleTreeSpecies o) { - return o == this ? 0 : -1; - } - - @Nonnull - @Override - public String getModID() { - return "extratrees"; - } - - @Override - public IWoodProvider getWoodProvider() { - return woodProvider; - } - - @Nonnull - @Override - public ILeafSpriteProvider getLeafSpriteProvider() { - return TreeManager.treeFactory.getLeafIconProvider(leafType, new Color(color), new Color(colorPollineted)); - } - - @Nonnull - @Override - public ModelResourceLocation getGermlingModel(EnumGermlingType type) { - if (type == EnumGermlingType.SAPLING) { - return germlingModel; - } else if (type == EnumGermlingType.POLLEN) { - return pollenModel; - } else { - return germlingModel; - } - } - - - private ModelResourceLocation germlingModel; - private ModelResourceLocation pollenModel; - - @Override - public void registerModels(Item item, IModelManager manager, EnumGermlingType type) { - if (type == EnumGermlingType.SAPLING) { - germlingModel = manager.getModelLocation("extratrees", "saplings/tree" + saplingType.name()); - ModelBakery.registerItemVariants(item, new ResourceLocation("extratrees", "saplings/tree" + saplingType.name())); - } - if (type == EnumGermlingType.POLLEN) { - pollenModel = manager.getModelLocation("pollen"); - ModelBakery.registerItemVariants(item, new ResourceLocation("forestry:pollen")); - } - } - - - //// - @Override - public String getName() { - return ExtraTrees.proxy.localise("species." + this.getUID() + ".name"); - } - - @Override - public String getDescription() { - return ExtraTrees.proxy.localiseOrBlank("species." + this.getUID() + ".desc"); - } - - @Override - public EnumTemperature getTemperature() { - return EnumTemperature.NORMAL; - } - - @Override - public EnumHumidity getHumidity() { - return EnumHumidity.NORMAL; - } - - @Override - public boolean hasEffect() { - return false; - } - - @Override - public boolean isSecret() { - return false; - } - - @Override - public boolean isCounted() { - return true; - } - - @Override - public String getBinomial() { - return this.binomial; - } - - @Override - public String getAuthority() { - return "Binnie"; - } - - @Override - public IClassification getBranch() { - return this.branch; - } - - @Override public String getUID() { - return getSpeciesName().toLowerCase().trim(); + return name().toLowerCase(); } - @Override public boolean isDominant() { return true; } - @Override - public EnumPlantType getPlantType() { - return EnumPlantType.Plains; + public String getBinomial() { + return binomial; } + public String getAuthority() { + return "Binnie"; + } - WoodAccess woodAccess = new WoodAccess(); + public Color getLeafColor() { + return leafColor; + } - @Override - public ITreeGenerator getGenerator() { - return new ITreeGenerator() { - @Override - public WorldGenerator getWorldGenerator(ITreeGenData tree) { - return ExtraTreeSpecies.this.getGenerator(tree); + public Color getWoodColor() { + return woodColor; + } + + public String getBranchName() { + return branchName; + } + + public IAlleleTreeSpecies getSpecies() { + return species; + } + + private static class AlleleTemplate { + IAllele[] alleles; + + protected AlleleTemplate() { + alleles = TreeManager.treeRoot.getDefaultTemplate(); + } + + protected AlleleTemplate(IAllele[] alleles) { + this.alleles = alleles; + } + + public & IChromosomeType> void set(T chromosomeType, IAllele allele) { + if (allele == null) { + throw new NullPointerException("Allele must not be null"); } - - @Override - public boolean setLogBlock(ITreeGenome genome, World world, BlockPos pos, EnumFacing facing) { - if (ExtraTreeSpecies.this.wood != null) { - //ItemStack block = woodProvider.getWoodStack(); //TreeManager.woodAccess.getBlock(wood, WoodBlockKind.LOG, false); - return world.setBlockState(pos, woodAccess.getBlock(wood, WoodBlockKind.LOG, false), 2); - } - return false; - } - - @Override - public boolean setLeaves(ITreeGenome genome, World world, GameProfile owner, BlockPos pos) { - boolean placed = world.setBlockState(pos, PluginArboriculture.blocks.leaves.getDefaultState()); - if (!placed) { - return false; - } - - Block block = world.getBlockState(pos).getBlock(); - if (PluginArboriculture.blocks.leaves != block) { - world.setBlockToAir(pos); - return false; - } - - TileLeaves tileLeaves = TileUtil.getTile(world, pos, TileLeaves.class); - if (tileLeaves == null) { - world.setBlockToAir(pos); - return false; - } - - tileLeaves.getOwnerHandler().setOwner(owner); - tileLeaves.setTree(new Tree(genome)); - - world.markBlockRangeForRenderUpdate(pos, pos); - return true; - } - - }; - } - - public WorldGenerator getGenerator(final ITreeGenData tree) { - if (this.gen != null) { - try { - return this.gen.getConstructor(ITree.class).newInstance(tree); - } catch (Exception ex) { + if (!chromosomeType.getAlleleClass().isInstance(allele)) { + throw new IllegalArgumentException("Allele is the wrong type. Expected: " + chromosomeType + " Got: " + allele); } + alleles[chromosomeType.ordinal()] = allele; } - return new WorldGenDefault(tree); - } - void setLeafType(final EnumLeafType type) { - this.leafType = type; - if (this.leafType == EnumLeafType.CONIFERS) { - this.saplingType = SaplingType.Conifer; - } - if (this.leafType == EnumLeafType.JUNGLE) { - this.saplingType = SaplingType.Jungle; - } - if (this.leafType == EnumLeafType.PALM) { - this.saplingType = SaplingType.Palm; + public IAllele[] getAlleles() { + return alleles; } } - - public IAllele[] getTemplate() { - return this.template; - } - - @Override - public ArrayList getSuitableFruit() { - return this.families; - } - - public IWoodType getLog() { - return this.wood; - } - - public ExtraTreeSpecies setHeight(final ForestryAllele.TreeHeight height) { - final IAllele allele = height.getAllele(); - if (allele != null) { - this.template[EnumTreeChromosome.HEIGHT.ordinal()] = allele; - } - return this; - } - - public ExtraTreeSpecies setSappiness(final ForestryAllele.Sappiness height) { - final IAllele allele = height.getAllele(); - if (allele != null) { - this.template[EnumTreeChromosome.SAPPINESS.ordinal()] = allele; - } - return this; - } - - public ExtraTreeSpecies setMaturation(final ForestryAllele.Maturation height) { - final IAllele allele = height.getAllele(); - if (allele != null) { - this.template[EnumTreeChromosome.MATURATION.ordinal()] = allele; - } - return this; - } - - public ExtraTreeSpecies setYield(final ForestryAllele.Yield height) { - final IAllele allele = height.getAllele(); - if (allele != null) { - this.template[EnumTreeChromosome.YIELD.ordinal()] = allele; - } - return this; - } - - public ExtraTreeSpecies setFertility(final ForestryAllele.Saplings height) { - final IAllele allele = height.getAllele(); - if (allele != null) { - this.template[EnumTreeChromosome.FERTILITY.ordinal()] = allele; - } - return this; - } - - public void setGrowthConditions(final ForestryAllele.Growth growth) { - final IAllele allele = growth.getAllele(); - if (allele != null) { - this.template[EnumTreeChromosome.GROWTH.ordinal()] = allele; - } - } - - public void finished() { - - } - - - public int getLeafColour(final ITree tree) { - return this.color; - } - -// public short getLeafIconIndex(final ITree tree, final boolean fancy) { -// if (!fancy) { -// return this.leafType.plainUID; -// } -// if (tree.getMate() != null) { -// return this.leafType.changedUID; -// } -// return this.leafType.fancyUID; -// } - -// @Override -// public int getIconColour(final int renderPass) { -// return (renderPass == 0) ? this.color : 0xFFFFFF;// 10451021; -// } - -// @Override -// @SideOnly(Side.CLIENT) -// public IIcon getGermlingIcon(final EnumGermlingType type, final int renderPass) { -// if (type == EnumGermlingType.POLLEN) { -// return PluginArboriculture.items.pollenFertile.getIcon(PluginArboriculture.items.pollenFertile.getItemStack(), renderPass); -// } -// -// return (renderPass == 0) ? this.saplingType.icon[1] : this.saplingType.icon[0]; -// } -// -// @Override -// public IIconProvider getIconProvider() { -// return this; -// } -// -// @Override -// public IIcon getIcon(final short texUID) { -// return TextureManager.getInstance().getIcon(texUID); -// } -// -// @Override -// public void registerIcons(final IIconRegister register) { -// for (final SaplingType type : SaplingType.values()) { -// (type.icon = new IIcon[2])[0] = ExtraTrees.proxy.getIcon(register, "saplings/" + type.toString().toLowerCase() + ".trunk"); -// type.icon[1] = ExtraTrees.proxy.getIcon(register, "saplings/" + type.toString().toLowerCase() + ".leaves"); -// } -// } - - @Override - public ITreeRoot getRoot() { - return Binnie.Genetics.getTreeRoot(); - } - - @Override - public float getResearchSuitability(final ItemStack itemstack) { - if (itemstack == null) { - return 0.0f; - } - if (this.template[EnumTreeChromosome.FRUITS.ordinal()] instanceof ExtraTreeFruitGene) { - final ExtraTreeFruitGene fruit = (ExtraTreeFruitGene) this.template[EnumTreeChromosome.FRUITS.ordinal()]; - for (final ItemStack stack : fruit.products.keySet()) { - if (stack.isItemEqual(itemstack)) { - return 1.0f; - } - } - } - if (itemstack.getItem() == Mods.Forestry.item("honeyDrop")) { - return 0.5f; - } - if (itemstack.getItem() == Mods.Forestry.item("honeydew")) { - return 0.7f; - } - if (itemstack.getItem() == Mods.Forestry.item("beeComb")) { - return 0.4f; - } - if (AlleleManager.alleleRegistry.isIndividual(itemstack)) { - return 1.0f; - } - for (final Map.Entry entry : this.getRoot().getResearchCatalysts().entrySet()) { - if (entry.getKey().isItemEqual(itemstack)) { - return entry.getValue(); - } - } - return 0.0f; - } - - @Override - public ItemStack[] getResearchBounty(final World world, final GameProfile researcher, final IIndividual individual, final int bountyLevel) { - final ArrayList bounty = new ArrayList<>(); - ItemStack research = null; - if (world.rand.nextFloat() < 10.0f / bountyLevel) { - final Collection combinations = this.getRoot().getCombinations(this); - if (combinations.size() > 0) { - final IMutation[] candidates = combinations.toArray(new IMutation[0]); - research = AlleleManager.alleleRegistry.getMutationNoteStack(researcher, candidates[world.rand.nextInt(candidates.length)]); - } - } - if (research != null) { - bounty.add(research); - } - if (this.template[EnumTreeChromosome.FRUITS.ordinal()] instanceof ExtraTreeFruitGene) { - final ExtraTreeFruitGene fruit = (ExtraTreeFruitGene) this.template[EnumTreeChromosome.FRUITS.ordinal()]; - for (final ItemStack stack : fruit.products.keySet()) { - final ItemStack stack2 = stack.copy(); - stack2.stackSize = world.rand.nextInt((int) (bountyLevel / 2.0f)) + 1; - bounty.add(stack2); - } - } - return bounty.toArray(new ItemStack[0]); - } - - @Override - @SideOnly(Side.CLIENT) - public int getGermlingColour(final EnumGermlingType type, int renderPass) { - if (type == EnumGermlingType.SAPLING) { - return (renderPass != 0) ? this.getLeafColour(null) : ((this.getLog() == null) ? 16777215 : woodColor); - } - return this.getLeafColour(null); - } - - @Override - public int getComplexity() { - return 1 + this.getGeneticAdvancement(this, new ArrayList<>()); - } - - private int getGeneticAdvancement(final IAllele species, final ArrayList exclude) { - final int own = 1; - int highest = 0; - exclude.add(species); - for (final IMutation mutation : this.getRoot().getPaths(species, EnumBeeChromosome.SPECIES)) { - if (!exclude.contains(mutation.getAllele0())) { - final int otherAdvance = this.getGeneticAdvancement(mutation.getAllele0(), exclude); - if (otherAdvance > highest) { - highest = otherAdvance; - } - } - if (!exclude.contains(mutation.getAllele1())) { - final int otherAdvance = this.getGeneticAdvancement(mutation.getAllele1(), exclude); - if (otherAdvance <= highest) { - continue; - } - highest = otherAdvance; - } - } - return own + ((highest < 0) ? 0 : highest); - } -//never used -// public ItemStack[] getLogStacks() { -// if (this.wood == null) { -// return new ItemStack[0]; -// } -// return new ItemStack[] { this.wood.getItemStack() }; -// } - - @Override - public String getUnlocalizedName() { - return "extratrees.species." + this.getUID() + ".name"; - } - - public enum SaplingType { - Default, - Jungle, - Conifer, - Fruit, - Poplar, - Palm, - Shrub; - - public ModelResourceLocation getModelLocation(ExtraTreeSpecies species) { - return new ModelResourceLocation(Constants.EXTRA_TREES_MOD_ID + ":saplings/tree" + name()); - } - - public ResourceLocation getResourceLocation(ExtraTreeSpecies species) { - return new ResourceLocation(Constants.EXTRA_TREES_MOD_ID + ":saplings/tree" + name()); - } - //IIcon[] icon; - } - -// @Override -// public int getLeafColour(boolean pollinated) { -// return pollinated ? colorPollineted : color; -// } -// -// @SideOnly(Side.CLIENT) -// @Override -// public IIcon getLeafIcon(boolean pollinated, boolean fancy) { -// try { -// if (pollinated) -// return TextureLeaves.get(EnumLeafType.valueOf(leafType.descript.toUpperCase())).getPollinated(); -// if (fancy) -// return TextureLeaves.get(EnumLeafType.valueOf(leafType.descript.toUpperCase())).getFancy(); -// return TextureLeaves.get(EnumLeafType.valueOf(leafType.descript.toUpperCase())).getPlain(); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// return null; -// } -// -// @SideOnly(Side.CLIENT) -// @Override -// public IIcon getIcon(EnumGermlingType type, int renderPass) { -// return getGermlingIcon(type, renderPass); -// } - } diff --git a/src/main/java/binnie/extratrees/genetics/ModuleGenetics.java b/src/main/java/binnie/extratrees/genetics/ModuleGenetics.java index 2fb22587..c6da6157 100644 --- a/src/main/java/binnie/extratrees/genetics/ModuleGenetics.java +++ b/src/main/java/binnie/extratrees/genetics/ModuleGenetics.java @@ -8,7 +8,6 @@ import forestry.api.genetics.IClassification; import java.util.ArrayList; import java.util.List; -import java.util.Locale; public class ModuleGenetics implements IInitializable { String[] branches; @@ -27,12 +26,9 @@ public class ModuleGenetics implements IInitializable { @Override public void init() { - ExtraTreeSpecies.init(); ExtraTreeFruitGene.init(); - for (final ExtraTreeSpecies species : ExtraTreeSpecies.values()) { - Binnie.Genetics.getTreeRoot().registerTemplate(species.getTemplate()); - } - ExtraTreeMutation.init(); + ExtraTreeSpecies.initTrees(); + ExtraTreeMutation.init(); } @Override @@ -53,51 +49,4 @@ public class ModuleGenetics implements IInitializable { } } - private void generateBranches() { - for (final String hierarchy : this.branches) { - final List set = new ArrayList<>(); - for (final String string : hierarchy.split(" ", 0)) { - set.add(string.toLowerCase()); - } - this.classifications.add(set); - } - for (final ExtraTreeSpecies species : ExtraTreeSpecies.values()) { - final IClassification branch = this.getOrCreateClassification(IClassification.EnumClassLevel.GENUS, species.branchName); - branch.addMemberSpecies(species); - species.branch = branch; - IClassification clss = branch; - int currentLevel = IClassification.EnumClassLevel.GENUS.ordinal(); - while (clss.getParent() == null) { - for (final List set2 : this.classifications) { - if (set2.contains(clss.getScientific().toLowerCase())) { - String nextLevel = ""; - int index = set2.indexOf(clss.getScientific().toLowerCase()) + 1; - while (nextLevel.length() == 0) { - try { - nextLevel = set2.get(index++); - } catch (IndexOutOfBoundsException ex) { - throw new RuntimeException("Reached end point at " + set2.get(index - 2)); - } - --currentLevel; - } - final IClassification parent = this.getOrCreateClassification(IClassification.EnumClassLevel.values()[currentLevel], nextLevel); - parent.addMemberGroup(clss); - clss = parent; - break; - } - } - } - } - } - - private IClassification getOrCreateClassification(final IClassification.EnumClassLevel level, String name) { - if (level == IClassification.EnumClassLevel.GENUS) { - name = "trees." + name; - } - final String uid = level.name().toLowerCase(Locale.ENGLISH) + "." + name.toLowerCase(); - if (AlleleManager.alleleRegistry.getClassification(uid) != null) { - return AlleleManager.alleleRegistry.getClassification(uid); - } - return AlleleManager.alleleRegistry.createAndRegisterClassification(level, name.toLowerCase(), name); - } } diff --git a/src/main/java/binnie/extratrees/genetics/TreeGenerator.java b/src/main/java/binnie/extratrees/genetics/TreeGenerator.java new file mode 100644 index 00000000..281e7585 --- /dev/null +++ b/src/main/java/binnie/extratrees/genetics/TreeGenerator.java @@ -0,0 +1,75 @@ +package binnie.extratrees.genetics; + +import binnie.extratrees.gen.WorldGenDefault; +import com.mojang.authlib.GameProfile; +import forestry.api.arboriculture.*; +import forestry.api.world.ITreeGenData; +import forestry.arboriculture.PluginArboriculture; +import forestry.arboriculture.genetics.Tree; +import forestry.arboriculture.tiles.TileLeaves; +import forestry.core.genetics.alleles.AlleleBoolean; +import forestry.core.tiles.TileUtil; +import net.minecraft.block.Block; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +import javax.annotation.Nullable; + +public class TreeGenerator implements ITreeGenerator { + Class generator; + IWoodType woodType; + + public TreeGenerator(Class generator, @Nullable IWoodType woodType) { + this.generator = generator; + this.woodType = woodType; + } + + @Override + public WorldGenerator getWorldGenerator(ITreeGenData tree) { + try { + return generator.getConstructor(ITree.class).newInstance(tree); + } catch (Exception ex) { + ex.printStackTrace(); + } + return new WorldGenDefault(tree); + } + + @Override + public boolean setLogBlock(ITreeGenome genome, World world, BlockPos pos, EnumFacing facing) { + if (woodType != null) { + AlleleBoolean fireproofAllele = (AlleleBoolean) genome.getActiveAllele(EnumTreeChromosome.FIREPROOF); + boolean fireproof = fireproofAllele.getValue(); + return world.setBlockState(pos, WoodAccess.getInstance().getBlock(woodType, WoodBlockKind.LOG, fireproof), 2); + } + return false; + } + + @Override + public boolean setLeaves(ITreeGenome genome, World world, GameProfile owner, BlockPos pos) { + boolean placed = world.setBlockState(pos, PluginArboriculture.blocks.leaves.getDefaultState()); + if (!placed) { + return false; + } + + Block block = world.getBlockState(pos).getBlock(); + if (PluginArboriculture.blocks.leaves != block) { + world.setBlockToAir(pos); + return false; + } + + TileLeaves tileLeaves = TileUtil.getTile(world, pos, TileLeaves.class); + if (tileLeaves == null) { + world.setBlockToAir(pos); + return false; + } + + tileLeaves.getOwnerHandler().setOwner(owner); + tileLeaves.setTree(new Tree(genome)); + + world.markBlockRangeForRenderUpdate(pos, pos); + return true; + } + +} diff --git a/src/main/java/binnie/extratrees/genetics/WoodAccess.java b/src/main/java/binnie/extratrees/genetics/WoodAccess.java index 0854faf7..ad8613d8 100644 --- a/src/main/java/binnie/extratrees/genetics/WoodAccess.java +++ b/src/main/java/binnie/extratrees/genetics/WoodAccess.java @@ -2,6 +2,7 @@ package binnie.extratrees.genetics; import forestry.api.arboriculture.IWoodAccess; import forestry.api.arboriculture.IWoodType; +import forestry.api.arboriculture.TreeManager; import forestry.api.arboriculture.WoodBlockKind; import net.minecraft.block.Block; import net.minecraft.block.properties.PropertyEnum; @@ -13,7 +14,12 @@ import java.util.HashMap; import java.util.List; public class WoodAccess implements IWoodAccess { - static HashMap woodMap = new HashMap<>(); + private static HashMap woodMap = new HashMap<>(); + private static final WoodAccess instance = new WoodAccess(); + + public static WoodAccess getInstance() { + return instance; + } public static & IWoodType> void registerWithVariants(T woodTyped, WoodBlockKind woodBlockKind, PropertyEnum property) { for (V value : property.getAllowedValues()) { @@ -29,7 +35,8 @@ public class WoodAccess implements IWoodAccess { @Override public IBlockState getBlock(IWoodType woodType, WoodBlockKind kind, boolean fireproof) { - return woodMap.get(woodType); + IBlockState state = woodMap.get(woodType); + return state==null? TreeManager.woodAccess.getBlock(woodType, kind, fireproof) : state; } @Override diff --git a/src/main/java/binnie/extratrees/worldgen/BlockTypeLog.java b/src/main/java/binnie/extratrees/worldgen/BlockTypeLog.java index 58409d6d..c8fff786 100644 --- a/src/main/java/binnie/extratrees/worldgen/BlockTypeLog.java +++ b/src/main/java/binnie/extratrees/worldgen/BlockTypeLog.java @@ -1,29 +1,20 @@ package binnie.extratrees.worldgen; -import binnie.extratrees.genetics.WoodAccess; -import forestry.api.arboriculture.IWoodType; -import forestry.api.arboriculture.TreeManager; -import forestry.api.arboriculture.WoodBlockKind; import forestry.api.world.ITreeGenData; -import net.minecraft.block.state.IBlockState; +import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockTypeLog extends BlockType { - IWoodType log; + ITreeGenData treeGenData; - public BlockTypeLog(final IWoodType log) { + public BlockTypeLog(ITreeGenData treeGenData) { super(null, 0); - this.log = log; + this.treeGenData = treeGenData; } @Override public void setBlock(final World world, final ITreeGenData tree, final BlockPos pos) { - - IBlockState blockState = new WoodAccess().getBlock(log, WoodBlockKind.LOG, false); - if (blockState == null) - blockState = TreeManager.woodAccess.getBlock(log, WoodBlockKind.LOG, false); - world.setBlockState(pos, blockState, 2); - //this.log.placeBlock(world, new BlockPos(x, y, z)); + treeGenData.setLogBlock(world, pos, EnumFacing.UP); } } From a903d57103a85f23b6a56a68fa318f4467293445 Mon Sep 17 00:00:00 2001 From: marcin212 Date: Tue, 1 Nov 2016 02:34:49 +0100 Subject: [PATCH 2/2] Work on items from wood --- .../java/binnie/extratrees/ExtraTrees.java | 2 +- .../extratrees/block/BlockETPlanks.java | 212 +++++++++-------- .../binnie/extratrees/block/ModuleBlocks.java | 77 +++++-- .../binnie/extratrees/block/PlankType.java | 5 +- .../extratrees/genetics/WoodAccess.java | 33 ++- .../assets/extratrees/blockstates/plank.json | 216 ++++++++++++++++++ 6 files changed, 428 insertions(+), 117 deletions(-) create mode 100644 src/main/resources/assets/extratrees/blockstates/plank.json diff --git a/src/main/java/binnie/extratrees/ExtraTrees.java b/src/main/java/binnie/extratrees/ExtraTrees.java index 8195fd62..6bf24430 100644 --- a/src/main/java/binnie/extratrees/ExtraTrees.java +++ b/src/main/java/binnie/extratrees/ExtraTrees.java @@ -58,7 +58,7 @@ public class ExtraTrees extends AbstractMod { public static Block blockStairs; //public static Block blockLog; public static BlockCarpentry blockCarpentry; - public static Block blockPlanks; + //public static Block blockPlanks; public static Block blockMachine; public static Block blockFence; public static BlockCarpentry blockPanel; diff --git a/src/main/java/binnie/extratrees/block/BlockETPlanks.java b/src/main/java/binnie/extratrees/block/BlockETPlanks.java index 63237398..154026b9 100644 --- a/src/main/java/binnie/extratrees/block/BlockETPlanks.java +++ b/src/main/java/binnie/extratrees/block/BlockETPlanks.java @@ -1,96 +1,159 @@ package binnie.extratrees.block; -import binnie.Binnie; -import binnie.core.block.IBlockMetadata; -import binnie.core.block.TileEntityMetadata; -import binnie.extratrees.ExtraTrees; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; import forestry.api.core.Tabs; +import net.minecraft.block.Block; import net.minecraft.block.BlockPlanks; import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; + import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import javax.annotation.Nonnull; +import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; -public class BlockETPlanks extends BlockPlanks implements IBlockMetadata { - public BlockETPlanks() { - this.setRegistryName("planks"); +import static net.minecraft.block.BlockFence.*; + +public class BlockETPlanks extends Block implements IItemModelRegister { + protected static final int VARIANTS_PER_BLOCK = 16; + protected static final int VARIANTS_META_MASK = VARIANTS_PER_BLOCK - 1; + private final boolean fireproof; + public static final int GROUP_COUNT = (int) Math.ceil(EnumExtraTreeLog.values().length / (float) VARIANTS_PER_BLOCK); + protected int offset = -1; + protected static PropertyEnum[] plankTypes; + + static { + plankTypes = new PropertyEnum[GROUP_COUNT]; + for (int i = 0; i < GROUP_COUNT; i++) { + int finalI = i; + List allowed = Arrays.stream(EnumExtraTreeLog.values()).filter(l -> l.getMetadata() >= finalI * VARIANTS_PER_BLOCK && l.getMetadata() < finalI * VARIANTS_PER_BLOCK + VARIANTS_PER_BLOCK).collect(Collectors.toList()); + plankTypes[i] = PropertyEnum.create("wood_type", EnumExtraTreeLog.class, allowed); + } + } + + public BlockETPlanks(int offset, boolean fireproof) { + super(Material.WOOD); + this.fireproof = fireproof; + this.offset = offset; + this.setRegistryName("plank." + (fireproof ? "fireproof." : "") + offset); this.setCreativeTab(Tabs.tabArboriculture); this.setResistance(5.0f); this.setHardness(2.0f); + this.setHarvestLevel("axe", 0); this.setSoundType(SoundType.WOOD); } - @Override - public int getPlacedMeta(ItemStack p0, World p1, BlockPos pos, EnumFacing p5) { - return 0; + public static class PlankItemBlock extends ItemBlock { + EnumExtraTreeLog[] values; + + public PlankItemBlock(V block) { + super(block); + setHasSubtypes(true); + setMaxDamage(0); + setRegistryName(block.getRegistryName()); + values = block.getVariant().getAllowedValues().toArray(new EnumExtraTreeLog[]{}); + } + + @Override + public int getMetadata(int damage) { + return damage; + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return "tile.plank." + values[stack.getMetadata()].getName(); + } } -// @Override -// public ArrayList getDrops(final World world, final int x, final int y, final int z, final int blockMeta, final int fortune) { -// return BlockMetadata.getBlockDropped(this, world, x, y, z, blockMeta); -// } -// -// @Override -// public boolean removedByPlayer(final World world, final EntityPlayer player, final int x, final int y, final int z) { -// return BlockMetadata.breakBlock(this, player, world, x, y, z); -// } @Override - public TileEntity createNewTileEntity(final World var1, final int i) { - return new TileEntityMetadata(); - } - -// @Override -// public boolean hasTileEntity(final int meta) { -// return true; -// } -// -// @Override -// public boolean onBlockEventReceived(final World par1World, final int par2, final int par3, final int par4, final int par5, final int par6) { -// super.onBlockEventReceived(par1World, par2, par3, par4, par5, par6); -// final TileEntity tileentity = par1World.getTileEntity(par2, par3, par4); -// return tileentity != null && tileentity.receiveClientEvent(par5, par6); -// } -// -// @Override -// public int getPlacedMeta(final ItemStack stack, final World world, final int x, final int y, final int z, final ForgeDirection clickedBlock) { -// return TileEntityMetadata.getItemDamage(stack); -// } - - @Override - public int getDroppedMeta(final int blockMeta, final int tileMeta) { - return tileMeta; + public float getBlockHardness(IBlockState blockState, World worldIn, BlockPos pos) { + int meta = getMetaFromState(blockState); + EnumExtraTreeLog woodType = getWoodType(meta); + return woodType.getHardness(); } @Override - public String getBlockName(final ItemStack par1ItemStack) { - final int meta = TileEntityMetadata.getItemDamage(par1ItemStack); - return Binnie.Language.localise(ExtraTrees.instance, "block.plank.name", PlankType.ExtraTreePlanks.values()[meta].getName()); + public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { + if (fireproof) { + return 0; + } + return 20; } @Override - public void getBlockTooltip(final ItemStack par1ItemStack, final List par3List) { + public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { + if (fireproof) { + return 0; + } + return 5; } @Override - public void dropAsStack(World world, BlockPos pos, ItemStack p4) { - //this.dropBlockAsItem(world, pos, drop); + public int getMetaFromState(IBlockState state) { + return damageDropped(state); } -// @Override -// public void dropAsStack(final World world, final int x, final int y, final int z, final ItemStack drop) { -// this.dropBlockAsItem(world, x, y, z, drop); -// } + @Override + public IBlockState getStateFromMeta(int meta) { + EnumExtraTreeLog woodType = getWoodType(meta); + return getDefaultState().withProperty(getVariant(), woodType); + } -// @Override -// public void getSubBlocks(final Item itemIn, final CreativeTabs par2CreativeTabs, final List itemList) { -// for (int i = 0; i < PlankType.ExtraTreePlanks.values().length; ++i) { -// itemList.add(TileEntityMetadata.getItemStack(this, i)); -// } + + @Override + protected BlockStateContainer createBlockState() { + return new BlockStateContainer(this, getVariant()); + } + + @Override + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + list.addAll(getVariant().getAllowedValues().stream().map(woodType -> new ItemStack(this, 1, woodType.getMetadata() % VARIANTS_PER_BLOCK)).collect(Collectors.toList())); + } + + + @Nonnull + public PropertyEnum getVariant(){ + return plankTypes[offset]; + } + + @Override + public final int damageDropped(IBlockState state) { + return state.getValue(getVariant()).getMetadata() % VARIANTS_PER_BLOCK; + } + + @Override + public final IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { + EnumExtraTreeLog woodType = getWoodType(meta); + return getDefaultState().withProperty(getVariant(), woodType); + } + + public EnumExtraTreeLog getWoodType(int meta) { + return EnumExtraTreeLog.values()[offset * VARIANTS_PER_BLOCK + (meta & VARIANTS_META_MASK)]; + } + + @Override + public void registerModel(Item item, IModelManager manager) { + + } + +// public String getBlockName(final ItemStack par1ItemStack) { +// final int meta = TileEntityMetadata.getItemDamage(par1ItemStack); +// return Binnie.Language.localise(ExtraTrees.instance, "block.plank.name", PlankType.ExtraTreePlanks.values()[meta].getName()); // } // @Override @@ -115,36 +178,5 @@ public class BlockETPlanks extends BlockPlanks implements IBlockMetadata { // plank.loadIcon(register); // } // } -// -// @Override -// public void breakBlock(final World par1World, final int par2, final int par3, final int par4, final Block par5, final int par6) { -// super.breakBlock(par1World, par2, par3, par4, par5, par6); -// par1World.removeTileEntity(par2, par3, par4); -// } - -// @Override -// public boolean isWood(final IBlockAccess world, final int x, final int y, final int z) { -// return true; -// } -// -// @Override -// public int getFlammability(final IBlockAccess world, final int x, final int y, final int z, final ForgeDirection face) { -// return 20; -// } -// -// @Override -// public boolean isFlammable(final IBlockAccess world, final int x, final int y, final int z, final ForgeDirection face) { -// return true; -// } -// -// @Override -// public int getFireSpreadSpeed(final IBlockAccess world, final int x, final int y, final int z, final ForgeDirection face) { -// return 5; -// } - -// @Override -// public ItemStack getPickBlock(final MovingObjectPosition target, final World world, final int x, final int y, final int z) { -// return BlockMetadata.getPickBlock(world, x, y, z); -// } } diff --git a/src/main/java/binnie/extratrees/block/ModuleBlocks.java b/src/main/java/binnie/extratrees/block/ModuleBlocks.java index 8e3fb277..976ac608 100644 --- a/src/main/java/binnie/extratrees/block/ModuleBlocks.java +++ b/src/main/java/binnie/extratrees/block/ModuleBlocks.java @@ -32,7 +32,10 @@ import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; import net.minecraftforge.oredict.ShapedOreRecipe; +import javax.annotation.Nonnull; + import static binnie.extratrees.block.BlockETLog.woodTypes; +import static binnie.extratrees.block.BlockETPlanks.plankTypes; public class ModuleBlocks implements IInitializable { // public static int hedgeRenderID; @@ -40,37 +43,71 @@ public class ModuleBlocks implements IInitializable { @Override public void preInit() { PlankType.setup(); - ExtraTrees.blockPlanks = new BlockETPlanks(); + //ExtraTrees.blockPlanks = new BlockETPlanks(); ExtraTrees.blockFence = new BlockFence("fence"); + for (int i = 0; i < BlockETPlanks.GROUP_COUNT ; i++) { + int finalI = i; + BlockETPlanks blockETPlank = new BlockETPlanks(finalI, false) { + @Override + public PropertyEnum getVariant() {return plankTypes[finalI];} + }; + + GameRegistry.register(blockETPlank); + Item plank = GameRegistry.register(new BlockETPlanks.PlankItemBlock<>(blockETPlank)); + WoodAccess.getInstance().registerWithVariants(blockETPlank, WoodBlockKind.PLANKS, plankTypes[finalI], false); + ExtraTrees.proxy.setCustomStateMapper("plank", blockETPlank); + + + //fireproof + BlockETPlanks blockETPlankFireproof = new BlockETPlanks(finalI, true) { + @Override + public PropertyEnum getVariant() { + return plankTypes[finalI]; + } + }; + GameRegistry.register(blockETPlankFireproof); + ExtraTrees.proxy.setCustomStateMapper("plank", blockETPlankFireproof); + Item plankFireproof = GameRegistry.register(new BlockETPlanks.PlankItemBlock<>(blockETPlankFireproof)); + WoodAccess.getInstance().registerWithVariants(blockETPlankFireproof, WoodBlockKind.PLANKS, plankTypes[finalI], true); + + for (EnumExtraTreeLog l : plankTypes[finalI].getAllowedValues()) { + BinnieCore.proxy.registermodel(plank, l.getMetadata() % BlockETPlanks.VARIANTS_PER_BLOCK, new ModelResourceLocation("extratrees:plank", "wood_type=" + l.getName())); + BinnieCore.proxy.registermodel(plankFireproof, l.getMetadata() % BlockETPlanks.VARIANTS_PER_BLOCK, new ModelResourceLocation("extratrees:plank", "wood_type=" + l.getName())); + + } + } + for (int i = 0; i < BlockETLog.GROUP_COUNT; i++) { int finalI = i; - BlockETLog block = new BlockETLog(finalI, false) { + BlockETLog blockETLog = new BlockETLog(finalI, false) { @Override public PropertyEnum getVariant() { return woodTypes[finalI]; } }; - GameRegistry.register(block); - Item wood = GameRegistry.register(new BlockETLog.LogItemBlock<>(block)); - WoodAccess.registerWithVariants(block, WoodBlockKind.LOG, woodTypes[finalI]); - ExtraTrees.proxy.setCustomStateMapper("log", block); + GameRegistry.register(blockETLog); + Item wood = GameRegistry.register(new BlockETLog.LogItemBlock<>(blockETLog)); + + WoodAccess.getInstance().registerWithVariants(blockETLog, WoodBlockKind.LOG, woodTypes[finalI], false); + ExtraTrees.proxy.setCustomStateMapper("log", blockETLog); //fireproof - BlockETLog block2 = new BlockETLog(i, true) { + BlockETLog blockETLogFireproof = new BlockETLog(i, true) { @Override public PropertyEnum getVariant() { return woodTypes[finalI]; } }; - GameRegistry.register(block2); - ExtraTrees.proxy.setCustomStateMapper("log", block2); - Item woodFireproof = GameRegistry.register(new BlockETLog.LogItemBlock<>(block2)); + GameRegistry.register(blockETLogFireproof); + ExtraTrees.proxy.setCustomStateMapper("log", blockETLogFireproof); + Item woodFireproof = GameRegistry.register(new BlockETLog.LogItemBlock<>(blockETLogFireproof)); for (EnumExtraTreeLog l : woodTypes[finalI].getAllowedValues()) { BinnieCore.proxy.registermodel(wood, l.getMetadata() % BlockETLog.VARIANTS_PER_BLOCK, new ModelResourceLocation("extratrees:log", "axis=y,wood_type=" + l.getName())); BinnieCore.proxy.registermodel(woodFireproof, l.getMetadata() % BlockETLog.VARIANTS_PER_BLOCK, new ModelResourceLocation("extratrees:log", "axis=y,wood_type=" + l.getName())); } + WoodAccess.getInstance().registerWithVariants(blockETLogFireproof, WoodBlockKind.LOG, woodTypes[finalI], true); } @@ -79,9 +116,9 @@ public class ModuleBlocks implements IInitializable { ExtraTrees.blockMultiFence = new BlockMultiFence(); ExtraTrees.blockSlab = new BlockETSlab(false); ExtraTrees.blockDoubleSlab = new BlockETSlab(true); - ExtraTrees.blockStairs = new BlockETStairs(ExtraTrees.blockPlanks); - GameRegistry.register(ExtraTrees.blockPlanks); - GameRegistry.register(new ItemMetadata(ExtraTrees.blockPlanks).setRegistryName(ExtraTrees.blockPlanks.getRegistryName())); +// ExtraTrees.blockStairs = new BlockETStairs(ExtraTrees.blockPlanks); +// GameRegistry.register(ExtraTrees.blockPlanks); +// GameRegistry.register(new ItemMetadata(ExtraTrees.blockPlanks).setRegistryName(ExtraTrees.blockPlanks.getRegistryName())); GameRegistry.register(ExtraTrees.blockFence); GameRegistry.register(new ItemMetadata(ExtraTrees.blockFence).setRegistryName(ExtraTrees.blockFence.getRegistryName())); GameRegistry.register(ExtraTrees.blockMultiFence); @@ -96,8 +133,8 @@ public class ModuleBlocks implements IInitializable { GameRegistry.register(new ItemETSlab(ExtraTrees.blockDoubleSlab).setRegistryName(ExtraTrees.blockDoubleSlab.getRegistryName())); GameRegistry.register(ExtraTrees.blockDoor); GameRegistry.register(new ItemETDoor(ExtraTrees.blockDoor).setRegistryName(ExtraTrees.blockDoor.getRegistryName())); - GameRegistry.register(ExtraTrees.blockStairs); - GameRegistry.register(new ItemETStairs(ExtraTrees.blockStairs).setRegistryName(ExtraTrees.blockStairs.getRegistryName())); +// GameRegistry.register(ExtraTrees.blockStairs); + // GameRegistry.register(new ItemETStairs(ExtraTrees.blockStairs).setRegistryName(ExtraTrees.blockStairs.getRegistryName())); //BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockStairs), new StairItemRenderer()); //BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockGate), new GateItemRenderer()); for (final EnumExtraTreeLog plank : EnumExtraTreeLog.values()) { @@ -134,11 +171,11 @@ public class ModuleBlocks implements IInitializable { for (final PlankType.ExtraTreePlanks plank : PlankType.ExtraTreePlanks.values()) { final ItemStack planks = plank.getStack(); final ItemStack slabs = TileEntityMetadata.getItemStack(ExtraTrees.blockSlab, plank.ordinal()); - final ItemStack stairs = TileEntityMetadata.getItemStack(ExtraTrees.blockStairs, plank.ordinal()); - stairs.stackSize = 4; - GameRegistry.addRecipe(stairs.copy(), "# ", "## ", "###", '#', planks.copy()); - slabs.stackSize = 6; - CraftingManager.getInstance().getRecipeList().add(0, new ShapedOreRecipe(slabs.copy(), "###", '#', planks.copy())); + //final ItemStack stairs = TileEntityMetadata.getItemStack(ExtraTrees.blockStairs, plank.ordinal()); + //stairs.stackSize = 4; + //GameRegistry.addRecipe(stairs.copy(), "# ", "## ", "###", '#', planks.copy()); + //slabs.stackSize = 6; + //CraftingManager.getInstance().getRecipeList().add(0, new ShapedOreRecipe(slabs.copy(), "###", '#', planks.copy())); } GameRegistry.addRecipe(new MultiFenceRecipeSize()); GameRegistry.addRecipe(new MultiFenceRecipeEmbedded()); diff --git a/src/main/java/binnie/extratrees/block/PlankType.java b/src/main/java/binnie/extratrees/block/PlankType.java index 5dd29c21..ce61d4f8 100644 --- a/src/main/java/binnie/extratrees/block/PlankType.java +++ b/src/main/java/binnie/extratrees/block/PlankType.java @@ -11,6 +11,7 @@ import forestry.api.arboriculture.WoodBlockKind; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.util.IStringSerializable; public class PlankType { public static final int MAX_PLANKS = 256; @@ -30,7 +31,7 @@ public class PlankType { } } - public enum ExtraTreePlanks implements IPlankType, IFenceProvider { + public enum ExtraTreePlanks implements IPlankType, IFenceProvider, IStringSerializable { Fir(12815444), Cedar(14181940), Hemlock(13088108), @@ -91,7 +92,7 @@ public class PlankType { @Override public ItemStack getStack() { - return TileEntityMetadata.getItemStack(ExtraTrees.blockPlanks, this.ordinal()); + return null; //TileEntityMetadata.getItemStack(ExtraTrees.blockPlanks, this.ordinal()); } // public IIcon loadIcon(final IIconRegister register) { diff --git a/src/main/java/binnie/extratrees/genetics/WoodAccess.java b/src/main/java/binnie/extratrees/genetics/WoodAccess.java index ad8613d8..2102a17d 100644 --- a/src/main/java/binnie/extratrees/genetics/WoodAccess.java +++ b/src/main/java/binnie/extratrees/genetics/WoodAccess.java @@ -12,19 +12,26 @@ import org.apache.commons.lang3.NotImplementedException; import java.util.HashMap; import java.util.List; +import java.util.Map; public class WoodAccess implements IWoodAccess { - private static HashMap woodMap = new HashMap<>(); + private WoodHolder wood = new WoodHolder(); + private WoodHolder woodFireproof= new WoodHolder(); + private static final WoodAccess instance = new WoodAccess(); public static WoodAccess getInstance() { return instance; } - public static & IWoodType> void registerWithVariants(T woodTyped, WoodBlockKind woodBlockKind, PropertyEnum property) { + public & IWoodType> void registerWithVariants(T woodTyped, WoodBlockKind woodBlockKind, PropertyEnum property, boolean fireproof) { for (V value : property.getAllowedValues()) { IBlockState blockState = woodTyped.getDefaultState().withProperty(property, value); - woodMap.put(value, blockState); + if(fireproof) { + wood.addWood(value, woodBlockKind, blockState); + }else { + woodFireproof.addWood(value, woodBlockKind, blockState); + } } } @@ -35,7 +42,7 @@ public class WoodAccess implements IWoodAccess { @Override public IBlockState getBlock(IWoodType woodType, WoodBlockKind kind, boolean fireproof) { - IBlockState state = woodMap.get(woodType); + IBlockState state = fireproof?woodFireproof.getWood(woodType, kind) : wood.getWood(woodType, kind); return state==null? TreeManager.woodAccess.getBlock(woodType, kind, fireproof) : state; } @@ -43,4 +50,22 @@ public class WoodAccess implements IWoodAccess { public List getRegisteredWoodTypes() { throw new NotImplementedException(""); } + + private class WoodHolder{ + private Map> woodMap = new HashMap<>(); + + public void addWood(IWoodType woodType, WoodBlockKind kind, IBlockState state){ + Map woodTypes = woodMap.get(kind); + if (woodTypes == null){ + woodTypes = new HashMap<>(); + woodMap.put(kind, woodTypes); + } + woodTypes.put(woodType, state); + } + + public IBlockState getWood(IWoodType woodType, WoodBlockKind kind){ + Map woodTypes = woodMap.get(kind); + return woodTypes!=null ? woodTypes.get(woodType) : null; + } + } } diff --git a/src/main/resources/assets/extratrees/blockstates/plank.json b/src/main/resources/assets/extratrees/blockstates/plank.json new file mode 100644 index 00000000..33c658fc --- /dev/null +++ b/src/main/resources/assets/extratrees/blockstates/plank.json @@ -0,0 +1,216 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "cube_all" + }, + + "variants": { + "wood_type":{ + "apple":{ + "textures": { + "all": "extratrees:blocks/planks/Apple" + } + }, + "fig": { + "textures": { + "all": "extratrees:blocks/planks/Fig" + } + }, + "butternut":{ + "textures": { + "all": "extratrees:blocks/planks/Butternut" + } + }, + "cherry":{ + "textures": { + "all": "extratrees:blocks/planks/Cherry" + } + }, + "whitebeam":{ + "textures": { + "all": "extratrees:blocks/planks/Whitebeam" + } + }, + "rowan":{ + "textures": { + "all": "extratrees:blocks/planks/Rowan" + } + }, + "hemlock":{ + "textures": { + "all": "extratrees:blocks/planks/Hemlock" + } + }, + "ash":{ + "textures": { + "all": "extratrees:blocks/planks/Ssh" + } + }, + "alder":{ + "textures": { + "all": "extratrees:blocks/planks/Alder" + } + }, + "beech":{ + "textures": { + "all": "extratrees:blocks/planks/Beech" + } + }, + "hawthorn":{ + "textures": { + "all": "extratrees:blocks/planks/Hawthorn" + } + }, + "banana":{ + "textures": { + "all": "extratrees:blocks/planks/Banana" + } + }, + "yew":{ + "textures": { + "all": "extratrees:blocks/planks/Yew" + } + }, + "cypress":{ + "textures": { + "all": "extratrees:blocks/planks/Cypress" + } + }, + "fir":{ + "textures": { + "all": "extratrees:blocks/planks/Fir" + } + }, + "hazel":{ + "textures": { + "all": "extratrees:blocks/planks/Hazel" + } + }, + "hickory":{ + "textures": { + "all": "extratrees:blocks/planks/Hickory" + } + }, + "elm":{ + "textures": { + "all": "extratrees:blocks/planks/Elm" + } + }, + "elder":{ + "textures": { + "all": "extratrees:blocks/planks/Elder" + } + }, + "holly":{ + "textures": { + "all": "extratrees:blocks/planks/Holly" + } + }, + "hornbeam":{ + "textures": { + "all": "extratrees:blocks/planks/Hornbeam" + } + }, + "cedar":{ + "textures": { + "all": "extratrees:blocks/planks/Cedar" + } + }, + "olive":{ + "textures": { + "all": "extratrees:blocks/planks/Olive" + } + }, + "sweetgum":{ + "textures": { + "all": "extratrees:blocks/planks/Sweetgum" + } + }, + "locust":{ + "textures": { + "all": "extratrees:blocks/planks/Locust" + } + }, + "pear":{ + "textures": { + "all": "extratrees:blocks/planks/Pear" + } + }, + "maclura":{ + "textures": { + "all": "extratrees:blocks/planks/Maclura" + } + }, + "brazilwood":{ + "textures": { + "all": "extratrees:blocks/planks/Brazilwood" + } + }, + "logwood":{ + "textures": { + "all": "extratrees:blocks/planks/Logwood" + } + }, + "rosewood":{ + "textures": { + "all": "extratrees:blocks/planks/Rosewood" + } + }, + "purpleheart":{ + "textures": { + "all": "extratrees:blocks/planks/Purpleheart" + } + }, + "iroko":{ + "textures": { + "all": "extratrees:blocks/planks/Iroko" + } + }, + "gingko":{ + "textures": { + "all": "extratrees:blocks/planks/Gingko" + } + }, + "eucalyptus":{ + "textures": { + "all": "extratrees:blocks/planks/Eucalyptus" + } + }, + "eucalyptus2":{ + "textures": { + "all": "extratrees:blocks/planks/Eucalyptus" + } + }, + "box":{ + "textures": { + "all": "extratrees:blocks/planks/Box" + } + }, + "syzgium":{ + "textures": { + "all": "extratrees:blocks/planks/Syzgium" + } + }, + "eucalyptus3":{ + "textures": { + "all": "extratrees:blocks/planks/Eucalyptus" + } + }, + "cinnamon": { + "textures": { + "all": "extratrees:blocks/planks/Cinnamon" + } + }, + "pinkivory":{ + "textures": { + "all": "extratrees:blocks/planks/Pinkivory" + } + }, + "empty":{ + "textures": { + "all": "extratrees:blocks/planks/Empty" + } + } + } + } +} \ No newline at end of file