Compare commits

..
23 Commits
Author SHA1 Message Date
Alexander Kornilov f6e2eec09c Merge pull request #183 from KorDum/bugfix/locaization
[1.7.10] Added missing localization
2017-07-09 18:55:40 +03:00
kordum 031b077a4b Fix ru_RU lang 2017-07-09 18:52:30 +03:00
kordum 49f4c84b5d Added missing localization 2017-07-09 18:49:31 +03:00
Alexander Kornilov 09b4d5a207 Merge pull request #182 from KorDum/bugfix/weed-sound
[1.7.10] Fix weed sound on growth and break
2017-07-07 22:40:59 +03:00
kordum 68f226e07e Fix weed sound on growth and break 2017-07-07 22:36:55 +03:00
Alexander Kornilov da6ea7048a Merge pull request #179 from KorDum/bugfix/opengl
Fix 178
2017-07-06 15:36:34 +03:00
kordum d721a7e98f Fix wrong OpenGL in renderItem 2017-07-06 15:27:55 +03:00
Alexander Kornilov ce050eaa63 Merge pull request #177 from KorDum/feature/refactoring
Some small refactoring
2017-07-06 14:55:46 +03:00
kordum 0133d143f8 Some small refactoring 2017-07-06 14:35:41 +03:00
Alexander Kornilov 7cc917ae76 Merge pull request #176 from KorDum/bugfix/design-block-localization
Fix wrong wood design block localization
2017-07-06 14:33:34 +03:00
kordum 6f1d00e4f5 Fix wrong wood design block localization 2017-07-06 14:29:37 +03:00
Alexander Kornilov 2aa0b9bb8c Merge pull request #175 from KorDum/bugfix/issue-173
Fix #173
2017-07-06 13:43:59 +03:00
kordum d5d8885850 Fix #173
Fix Insulated Tube craft with shift+click stacks different tubes in one slot
2017-07-06 13:38:52 +03:00
Alexander Kornilov cb6cb3a01f Merge pull request #174 from KorDum/feature/soil-recipes
[1.7.10] Added shapeless recipe for dirt with loam, flowerbed, soil
2017-07-06 13:32:23 +03:00
kordum cd5c2b3406 Added shapeless recipe for dirt with loam, flowerbed, soil 2017-07-06 13:28:25 +03:00
Alexander Kornilov b1b06753ad Fix flower sound (#172) 2017-07-05 22:17:04 -07:00
Alexander Kornilov 5846f59d64 Fix decaying shrub leaves Fix #165 (#171) 2017-07-05 22:16:46 -07:00
Alexander Kornilov ec790c9333 Merge pull request #169 from KorDum/feature/refactoring
[1.7.10] Some code improvement
2017-07-04 19:21:42 +03:00
kordum 784fa0ad30 Some code improvement 2017-07-04 19:11:23 +03:00
Alexander Kornilov 3bd8c53273 Merge pull request #168 from KorDum/bugfix/issue-166
Fix #166
2017-07-04 11:57:57 +03:00
kordum bc10e65feb Fix wrong tree generators
Refactoring and code improvement of tree generators
2017-07-04 11:47:52 +03:00
Alexander Kornilov 3eaf99a4d1 Merge pull request #164 from 3TUSK/zh_cn_update_2nd
Update zh_CN.lang for extrabees, extratrees and genetics
2017-07-03 10:15:27 +03:00
3TUSK 7910cff956 Update zh_CN.lang for extrabees, extratrees and genetics 2017-07-03 13:20:59 +08:00
105 changed files with 2283 additions and 2864 deletions

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ buildscript {
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
apply plugin: 'forge'
version = "2.0.17"
version = "2.0.18"
if (System.getenv("BUILD_NUMBER") != null) {
version = version + "-" + System.getenv("BUILD_NUMBER")
}
@@ -68,7 +68,7 @@ public class CircuitGarden extends BinnieCircuit {
if (info.length() > 0) {
info = " (" + info + EnumChatFormatting.RESET + ")";
}
addTooltipString("Flowers" + info);
addTooltipString(I18N.localise("botany.circuit.flowers") + info);
}
@Override
@@ -36,6 +36,7 @@ public class BlockFlower extends BlockContainer {
setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, f * 3.0f, 0.5f + f);
setTickRandomly(true);
setBlockName("flower");
setStepSound(Block.soundTypeGrass);
}
@Override
@@ -22,6 +22,7 @@ public class ItemInsulatedTube extends Item {
icons = new IIcon[3];
setUnlocalizedName("insulatedTube");
setCreativeTab(CreativeTabBotany.instance);
setHasSubtypes(true);
}
public static ItemStack getInsulateStack(ItemStack stack) {
@@ -52,9 +53,9 @@ public class ItemInsulatedTube extends Item {
if (pass == 0) {
return 0xffffff;
}
return (pass == 1) ?
Material.get(stack.getItemDamage()).getColor() :
Insulate.get(stack.getItemDamage()).getColor();
return (pass == 1)
? Material.get(stack.getItemDamage()).getColor()
: Insulate.get(stack.getItemDamage()).getColor();
}
@Override
@@ -26,6 +26,7 @@ public class BlockPlant extends BlockBush {
setBlockName("plant");
setCreativeTab(CreativeTabBotany.instance);
setTickRandomly(true);
setStepSound(Block.soundTypeGrass);
}
public static boolean isWeed(IBlockAccess world, int x, int y, int z) {
@@ -111,7 +111,7 @@ public class ModuleGardening implements IInitializable {
if (fertilised) {
insulate += 3;
}
new CircuitGarden(moist, null, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 0 + 128 * insulate), icon);
new CircuitGarden(moist, null, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 128 * insulate), icon);
new CircuitGarden(moist, EnumAcidity.ACID, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 1 + 128 * insulate), icon);
new CircuitGarden(moist, EnumAcidity.NEUTRAL, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 2 + 128 * insulate), icon);
new CircuitGarden(moist, EnumAcidity.ALKALINE, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 3 + 128 * insulate), icon);
@@ -132,6 +132,13 @@ public class ModuleGardening implements IInitializable {
}
}
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.soil, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.loam, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.flowerbed, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.soilNoWeed, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.loamNoWeed, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.flowerbedNoWeed, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(
Botany.trowelWood,
new Object[]{
@@ -193,6 +200,7 @@ public class ModuleGardening implements IInitializable {
new ItemStack(Items.wheat_seeds),
new ItemStack(Items.wheat_seeds)
);
GameRegistry.addShapelessRecipe(BotanyItems.AshPowder.get(4), Mods.forestry.stack("ash"));
GameRegistry.addShapelessRecipe(BotanyItems.MulchPowder.get(4), Mods.forestry.stack("mulch"));
GameRegistry.addShapelessRecipe(BotanyItems.CompostPowder.get(4), Mods.forestry.stack("fertilizerBio"));
@@ -202,6 +210,7 @@ public class ModuleGardening implements IInitializable {
BotanyItems.SulphurPowder.get(4),
new Object[]{"dustSulphur"}
));
GameRegistry.addRecipe(new ShapelessOreRecipe(
new ItemStack(Botany.pigment, 2, EnumFlowerColor.BLACK.ordinal()),
new Object[]{
@@ -210,6 +219,7 @@ public class ModuleGardening implements IInitializable {
"dyeBlack"
}
));
ModuleGardening.queuedAcidFertilisers.put(BotanyItems.SulphurPowder.get(1), 1);
ModuleGardening.queuedAcidFertilisers.put(BotanyItems.MulchPowder.get(1), 1);
ModuleGardening.queuedAcidFertilisers.put(new ItemStack(GameRegistry.findItem("Forestry", "mulch")), 2);
@@ -245,6 +255,7 @@ public class ModuleGardening implements IInitializable {
'c', Items.clay_ball,
'g', Blocks.gravel
);
for (EnumFlowerColor c : EnumFlowerColor.values()) {
ItemStack clay = new ItemStack(Botany.clay, 1, c.ordinal());
ItemStack pigment = new ItemStack(Botany.pigment, 1, c.ordinal());
@@ -252,8 +263,14 @@ public class ModuleGardening implements IInitializable {
GameRegistry.addSmelting(clay, TileEntityMetadata.getItemStack(Botany.ceramic, c.ordinal()), 0.0f);
ItemStack glass = TileEntityMetadata.getItemStack(Botany.stained, c.ordinal());
glass.stackSize = 4;
GameRegistry.addShapedRecipe(glass, " g ", "gpg", " g ", 'g', Blocks.glass, 'p', pigment);
GameRegistry.addShapedRecipe(
glass,
" g ", "gpg", " g ",
'g', Blocks.glass,
'p', pigment
);
}
GameRegistry.addRecipe(new PigmentRecipe());
}
@@ -393,9 +393,9 @@ public class GuiCraftGUI extends GuiContainer {
if (rotating) {
GL11.glPopMatrix();
}
GuiScreen.itemRender.renderItemOverlayIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y(), null);
GL11.glDisable(GL11.GL_BLEND);
GuiScreen.itemRender.renderItemOverlayIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y(), null);
GL11.glClear(256);
RenderHelper.disableStandardItemLighting();
GL11.glPopAttrib();
}
@@ -24,13 +24,16 @@ public class MachineComponent implements INBTTagable {
@Override
public void readFromNBT(NBTTagCompound nbttagcompound) {
// ignored
}
@Override
public void writeToNBT(NBTTagCompound nbttagcompound) {
// ignored
}
public void onUpdate() {
// ignored
}
public Class[] getComponentInterfaces() {
@@ -38,6 +41,7 @@ public class MachineComponent implements INBTTagable {
}
public void onInventoryUpdate() {
// ignored
}
public MachinePayload getPayload() {
@@ -164,9 +164,9 @@ public class MachineUtil {
return machine.getInterface(IProcess.class);
}
public List<ItemStack> getNonNullStacks(int[] slotAcclimatiser) {
List<ItemStack> stacks = new ArrayList<ItemStack>();
for (ItemStack stack : getStacks(slotAcclimatiser)) {
public List<ItemStack> getNonNullStacks(int[] slot) {
List<ItemStack> stacks = new ArrayList<>();
for (ItemStack stack : getStacks(slot)) {
if (stack != null) {
stacks.add(stack);
}
@@ -25,10 +25,10 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
public ComponentProcessIndefinate(IMachine machine, float energyPerTick) {
super(machine);
this.energyPerTick = energyPerTick;
actionPauseProcess = 0.0f;
actionCancelTask = 0.0f;
clientEnergyPerSecond = 0;
this.energyPerTick = energyPerTick;
}
protected IPoweredMachine getPower() {
@@ -52,6 +52,7 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
} else if (isInProgress()) {
onCancelTask();
}
if (actionPauseProcess > 0.0f) {
actionPauseProcess--;
}
@@ -32,30 +32,32 @@ public enum BinnieCorePacketID implements IPacketID {
((INetworkedEntity) tile).readFromPacket(packet.payload);
}
} else if (this == BinnieCorePacketID.TileMetadata) {
MessageMetadata packet2 = new MessageMetadata(message);
TileEntity tile = packet2.getTileEntity(BinnieCore.proxy.getWorld());
MessageMetadata packet = new MessageMetadata(message);
TileEntity tile = packet.getTileEntity(BinnieCore.proxy.getWorld());
if (tile instanceof TileEntityMetadata) {
((TileEntityMetadata) tile).setTileMetadata(packet2.meta, true);
((TileEntityMetadata) tile).setTileMetadata(packet.meta, true);
}
} else if (this == BinnieCorePacketID.CraftGUIAction && context.side == Side.CLIENT) {
MessageCraftGUI packet3 = new MessageCraftGUI(message);
EntityPlayer player = BinnieCore.proxy.getPlayer();
if (player.openContainer instanceof ContainerCraftGUI && packet3.getTagCompound() != null) {
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.CLIENT, player, packet3.getTagCompound());
}
} else if (this == BinnieCorePacketID.CraftGUIAction && context.side == Side.SERVER && context.netHandler instanceof NetHandlerPlayServer) {
MessageCraftGUI packet3 = new MessageCraftGUI(message);
EntityPlayer player = ((NetHandlerPlayServer) context.netHandler).playerEntity;
if (player.openContainer instanceof ContainerCraftGUI && packet3.getTagCompound() != null) {
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.SERVER, player, packet3.getTagCompound());
} else if (this == BinnieCorePacketID.CraftGUIAction) {
if (context.side == Side.CLIENT) {
MessageCraftGUI packet = new MessageCraftGUI(message);
EntityPlayer player = BinnieCore.proxy.getPlayer();
if (player.openContainer instanceof ContainerCraftGUI && packet.getTagCompound() != null) {
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.CLIENT, player, packet.getTagCompound());
}
} else if (context.netHandler instanceof NetHandlerPlayServer) {
MessageCraftGUI packet = new MessageCraftGUI(message);
EntityPlayer player = ((NetHandlerPlayServer) context.netHandler).playerEntity;
if (player.openContainer instanceof ContainerCraftGUI && packet.getTagCompound() != null) {
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.SERVER, player, packet.getTagCompound());
}
}
} else if (this == BinnieCorePacketID.TileDescriptionSync && context.side == Side.CLIENT) {
MessageTileNBT packet4 = new MessageTileNBT(message);
TileEntity tile = packet4.getTarget(BinnieCore.proxy.getWorld());
if (tile != null && packet4.getTagCompound() != null) {
MessageTileNBT packet = new MessageTileNBT(message);
TileEntity tile = packet.getTarget(BinnieCore.proxy.getWorld());
if (tile != null && packet.getTagCompound() != null) {
IMachine machine = Machine.getMachine(tile);
if (machine != null && machine instanceof INetwork.TilePacketSync) {
((INetwork.TilePacketSync) machine).syncFromNBT(packet4.getTagCompound());
((INetwork.TilePacketSync) machine).syncFromNBT(packet.getTagCompound());
}
}
}
@@ -51,10 +51,10 @@ public class ExtraTrees extends AbstractMod {
public static Block blockLog;
public static BlockCarpentry blockCarpentry;
public static Block blockPlanks;
public static Block blockShrubLeaves;
public static Block blockMachine;
public static Block blockFence;
public static BlockCarpentry blockPanel;
public static Block blockKitchen;
public static Block blockSlab;
public static Block blockDoubleSlab;
public static Item itemHammer;
@@ -0,0 +1,15 @@
package binnie.extratrees.block;
import forestry.arboriculture.blocks.BlockForestryLeaves;
import net.minecraft.world.World;
public class BlockShrubLeaves extends BlockForestryLeaves {
public BlockShrubLeaves() {
super();
}
@Override
public void beginLeavesDecay(World world, int x, int y, int z) {
// ignored, no able decay
}
}
@@ -40,22 +40,26 @@ public class ModuleBlocks implements IInitializable {
ExtraTrees.blockPlanks = new BlockETPlanks();
ExtraTrees.blockFence = new BlockFence();
ExtraTrees.blockLog = new BlockETLog();
ExtraTrees.blockShrubLeaves = new BlockShrubLeaves();
ExtraTrees.blockGate = new BlockGate();
ExtraTrees.blockDoor = new BlockETDoor();
ExtraTrees.blockMultiFence = new BlockMultiFence();
ExtraTrees.blockSlab = new BlockETSlab(false);
ExtraTrees.blockDoubleSlab = new BlockETSlab(true);
ExtraTrees.blockStairs = new BlockETStairs(ExtraTrees.blockPlanks);
GameRegistry.registerBlock(ExtraTrees.blockPlanks, ItemMetadata.class, "planks");
GameRegistry.registerBlock(ExtraTrees.blockFence, ItemMetadata.class, "fence");
GameRegistry.registerBlock(ExtraTrees.blockMultiFence, ItemMetadata.class, "multifence");
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockMultiFence), new ItemMetadataRenderer());
GameRegistry.registerBlock(ExtraTrees.blockLog, ItemMetadata.class, "log");
GameRegistry.registerBlock(ExtraTrees.blockShrubLeaves, "shrubLeaves");
GameRegistry.registerBlock(ExtraTrees.blockGate, ItemMetadata.class, "gate");
GameRegistry.registerBlock(ExtraTrees.blockSlab, ItemETSlab.class, "slab");
GameRegistry.registerBlock(ExtraTrees.blockDoubleSlab, ItemETSlab.class, "doubleSlab");
GameRegistry.registerBlock(ExtraTrees.blockDoor, ItemETDoor.class, "door");
GameRegistry.registerBlock(ExtraTrees.blockStairs, ItemETStairs.class, "stairs");
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockStairs), new StairItemRenderer());
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockGate), new GateItemRenderer());
for (ILogType plank : ILogType.ExtraTreeLog.values()) {
@@ -135,7 +135,7 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
tooltip.add(I18N.localise(
"extratrees.block.tooltip.twoColors",
"extratrees.block.tooltip.twoMaterials",
block.getPrimaryMaterial().getName(),
block.getSecondaryMaterial().getName()
));
@@ -1,6 +1,7 @@
package binnie.extratrees.carpentry;
import binnie.botany.Botany;
import binnie.core.block.TileEntityMetadata;
import binnie.core.util.I18N;
import binnie.extratrees.api.IDesign;
import cpw.mods.fml.relauncher.Side;
@@ -11,6 +12,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import java.util.List;
import java.util.Random;
public class BlockStainedDesign extends BlockDesign {
@@ -60,4 +62,18 @@ public class BlockStainedDesign extends BlockDesign {
public String getBlockName(DesignBlock design) {
return I18N.localise("extratrees.block.stainedglass.name", design.getDesign().getName());
}
@Override
public void addBlockTooltip(ItemStack stack, List tooltip) {
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
tooltip.add(I18N.localise(
"extratrees.block.tooltip.twoColors",
block.getPrimaryMaterial().getName(),
block.getSecondaryMaterial().getName()
));
} else {
tooltip.add(block.getPrimaryMaterial().getName());
}
}
}
@@ -6,28 +6,64 @@ import binnie.core.util.I18N;
import binnie.extratrees.ExtraTrees;
import binnie.extratrees.block.ILogType;
import binnie.extratrees.worldgen.DefaultTreeGenerator;
import binnie.extratrees.worldgen.WorldGenAlder;
import binnie.extratrees.worldgen.WorldGenApple;
import binnie.extratrees.worldgen.WorldGenAsh;
import binnie.extratrees.worldgen.WorldGenAcornOak;
import binnie.extratrees.worldgen.WorldGenAspen;
import binnie.extratrees.worldgen.WorldGenBalsamFir;
import binnie.extratrees.worldgen.WorldGenBanana;
import binnie.extratrees.worldgen.WorldGenBeech;
import binnie.extratrees.worldgen.WorldGenConifer;
import binnie.extratrees.worldgen.WorldGenBox;
import binnie.extratrees.worldgen.WorldGenBrazilNut;
import binnie.extratrees.worldgen.WorldGenBrazilwood;
import binnie.extratrees.worldgen.WorldGenButternut;
import binnie.extratrees.worldgen.WorldGenCedar;
import binnie.extratrees.worldgen.WorldGenClove;
import binnie.extratrees.worldgen.WorldGenCoconut;
import binnie.extratrees.worldgen.WorldGenCoffee;
import binnie.extratrees.worldgen.WorldGenCommonAlder;
import binnie.extratrees.worldgen.WorldGenCommonAsh;
import binnie.extratrees.worldgen.WorldGenCommonBeech;
import binnie.extratrees.worldgen.WorldGenCopperBeech;
import binnie.extratrees.worldgen.WorldGenCypress;
import binnie.extratrees.worldgen.WorldGenDefault;
import binnie.extratrees.worldgen.WorldGenEucalyptus;
import binnie.extratrees.worldgen.WorldGenFir;
import binnie.extratrees.worldgen.WorldGenDouglasFir;
import binnie.extratrees.worldgen.WorldGenElder;
import binnie.extratrees.worldgen.WorldGenElm;
import binnie.extratrees.worldgen.WorldGenFloweringCrabapple;
import binnie.extratrees.worldgen.WorldGenGingko;
import binnie.extratrees.worldgen.WorldGenHawthorn;
import binnie.extratrees.worldgen.WorldGenHazel;
import binnie.extratrees.worldgen.WorldGenHolly;
import binnie.extratrees.worldgen.WorldGenJungle;
import binnie.extratrees.worldgen.WorldGenHornbeam;
import binnie.extratrees.worldgen.WorldGenIroko;
import binnie.extratrees.worldgen.WorldGenLazy;
import binnie.extratrees.worldgen.WorldGenMaple;
import binnie.extratrees.worldgen.WorldGenPalm;
import binnie.extratrees.worldgen.WorldGenPoplar;
import binnie.extratrees.worldgen.WorldGenLoblollyPine;
import binnie.extratrees.worldgen.WorldGenLocust;
import binnie.extratrees.worldgen.WorldGenLogwood;
import binnie.extratrees.worldgen.WorldGenMango;
import binnie.extratrees.worldgen.WorldGenMonkeyPuzzle;
import binnie.extratrees.worldgen.WorldGenOldFustic;
import binnie.extratrees.worldgen.WorldGenOlive;
import binnie.extratrees.worldgen.WorldGenOrchardApple;
import binnie.extratrees.worldgen.WorldGenOsangeOsange;
import binnie.extratrees.worldgen.WorldGenPear;
import binnie.extratrees.worldgen.WorldGenPecan;
import binnie.extratrees.worldgen.WorldGenPrairieCrabapple;
import binnie.extratrees.worldgen.WorldGenPurpleheart;
import binnie.extratrees.worldgen.WorldGenRainbowGum;
import binnie.extratrees.worldgen.WorldGenRedMaple;
import binnie.extratrees.worldgen.WorldGenRoseGum;
import binnie.extratrees.worldgen.WorldGenRosewood;
import binnie.extratrees.worldgen.WorldGenRowan;
import binnie.extratrees.worldgen.WorldGenSallow;
import binnie.extratrees.worldgen.WorldGenShrub;
import binnie.extratrees.worldgen.WorldGenSorbus;
import binnie.extratrees.worldgen.WorldGenSilverFir;
import binnie.extratrees.worldgen.WorldGenSwampGum;
import binnie.extratrees.worldgen.WorldGenSweetCrabapple;
import binnie.extratrees.worldgen.WorldGenSweetgum;
import binnie.extratrees.worldgen.WorldGenSycamore;
import binnie.extratrees.worldgen.WorldGenTree;
import binnie.extratrees.worldgen.WorldGenTree2;
import binnie.extratrees.worldgen.WorldGenTree3;
import binnie.extratrees.worldgen.WorldGenTropical;
import binnie.extratrees.worldgen.WorldGenWalnut;
import binnie.extratrees.worldgen.WorldGenWesternHemlock;
import binnie.extratrees.worldgen.WorldGenWhitebeam;
import binnie.extratrees.worldgen.WorldGenYew;
import binnie.genetics.genetics.AlleleHelper;
import com.mojang.authlib.GameProfile;
import cpw.mods.fml.relauncher.Side;
@@ -71,10 +107,10 @@ import java.util.Collection;
import java.util.Map;
public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGermlingIconProvider {
OrchardApple("malus", "domestica", 0x648830, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Apple, WorldGenApple.OrchardApple.class),
SweetCrabapple("malus", "coronaria", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.SweetCrabapple.class),
FloweringCrabapple("malus", "hopa", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.FloweringCrabapple.class),
PrairieCrabapple("malus", "ioensis", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.PrairieCrabapple.class),
OrchardApple("malus", "domestica", 0x648830, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Apple, WorldGenOrchardApple.class),
SweetCrabapple("malus", "coronaria", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenSweetCrabapple.class),
FloweringCrabapple("malus", "hopa", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenFloweringCrabapple.class),
PrairieCrabapple("malus", "ioensis", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenPrairieCrabapple.class),
Blackthorn("prunus", "spinosa ", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.Blackthorn),
CherryPlum("prunus", "cerasifera", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.CherryPlum),
Peach("prunus", "persica", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.Peach),
@@ -99,75 +135,75 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
Banana("musa", "sinensis", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.Banana, WorldGenBanana.class),
RedBanana("musa", "rubra", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.RedBanana, WorldGenBanana.class),
Plantain("musa", "paradisiaca", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.Plantain, WorldGenBanana.class),
Butternut("juglans", "cinerea", 0x82b58c, ILogType.ExtraTreeLog.Butternut, ExtraTreeFruitGene.Butternut, WorldGenWalnut.Butternut.class),
Rowan("sorbus", "aucuparia", 0x9ec79b, ILogType.ExtraTreeLog.Rowan, null, WorldGenSorbus.Rowan.class),
Hemlock("tsuga", "heterophylla", 0x5cac72, ILogType.ExtraTreeLog.Hemlock, null, WorldGenConifer.WesternHemlock.class),
Ash("fraxinus", "excelsior", 0x488e2b, ILogType.ExtraTreeLog.Ash, null, WorldGenAsh.CommonAsh.class),
Alder("alnus", "glutinosa", 0x698a33, ILogType.ExtraTreeLog.Alder, null, WorldGenAlder.CommonAlder.class),
Beech("fagus", "sylvatica", 0x83a04c, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenBeech.CommonBeech.class),
CopperBeech("fagus", "purpurea", 0x801318, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenBeech.CopperBeech.class),
Aspen("populus", "tremula", 0x8acc37, ILogType.ForestryLog.POPLAR, null, WorldGenPoplar.Aspen.class),
Yew("taxus", "baccata", 0x948a4d, ILogType.ExtraTreeLog.Yew, null, WorldGenConifer.Yew.class),
Cypress("chamaecyparis", "lawsoniana", 0x89c9a7, ILogType.ExtraTreeLog.Cypress, null, WorldGenConifer.Cypress.class),
DouglasFir("pseudotsuga", "menziesii", 0x99b582, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.DouglasFir.class),
Hazel("Corylus", "avellana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenTree3.Hazel.class),
Sycamore("ficus", "sycomorus", 0xa0a52f, ILogType.ExtraTreeLog.Fig, ExtraTreeFruitGene.Fig, WorldGenTree3.Sycamore.class),
Whitebeam("sorbus", "aria", 0xbace99, ILogType.ExtraTreeLog.Whitebeam, null, WorldGenSorbus.Whitebeam.class),
Hawthorn("crataegus", "monogyna", 0x6ba84a, ILogType.ExtraTreeLog.Hawthorn, null, WorldGenTree3.Hawthorn.class),
Pecan("carya", "illinoinensis", 0x85b674, ILogType.ExtraTreeLog.Hickory, ExtraTreeFruitGene.Pecan, WorldGenTree3.Pecan.class),
Elm("ulmus", "procera", 0x7c9048, ILogType.ExtraTreeLog.Elm, null, WorldGenTree3.Elm.class),
Elder("sambucus", "nigra", 0xaeb873, ILogType.ExtraTreeLog.Elder, ExtraTreeFruitGene.Elderberry, WorldGenTree3.Elder.class),
Holly("ilex", "aquifolium", 0x254b4c, ILogType.ExtraTreeLog.Holly, null, WorldGenHolly.Holly.class),
Hornbeam("carpinus", "betulus", 0x96a71b, ILogType.ExtraTreeLog.Hornbeam, null, WorldGenTree3.Hornbeam.class),
Sallow("salix", "caprea", 0xaeb323, ILogType.ForestryLog.WILLOW, null, WorldGenTree3.Sallow.class),
AcornOak("quercus", "robur", 0x66733e, ILogType.VanillaLog.Oak, ExtraTreeFruitGene.Acorn, WorldGenTree3.AcornOak.class),
Fir("abies", "alba", 0x6f7c20, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.SilverFir.class),
Cedar("cedrus", "libani", 0x95a370, ILogType.ExtraTreeLog.Cedar, null, WorldGenConifer.Cedar.class),
Olive("olea", "europaea", 0x3c4834, ILogType.ExtraTreeLog.Olive, ExtraTreeFruitGene.Olive, WorldGenTree2.Olive.class),
RedMaple("acer", "ubrum", 0xe82e17, ILogType.ForestryLog.MAPLE, null, WorldGenMaple.RedMaple.class),
BalsamFir("abies", "balsamea", 0x74a07c, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.BalsamFir.class),
LoblollyPine("pinus", "taeda", 0x6f8a47, ILogType.ForestryLog.PINE, null, WorldGenConifer.LoblollyPine.class),
Sweetgum("liquidambar", "styraciflua", 0x8b8762, ILogType.ExtraTreeLog.Sweetgum, null, WorldGenTree2.Sweetgum.class),
Locust("robinia", "pseudoacacia", 0x887300, ILogType.ExtraTreeLog.Locust, null, WorldGenTree2.Locust.class),
Pear("pyrus", "communis", 0x5e8826, ILogType.ExtraTreeLog.Pear, ExtraTreeFruitGene.Pear, WorldGenTree2.Pear.class),
OsangeOsange("maclura", "pomifera", 0x687a50, ILogType.ExtraTreeLog.Maclura, ExtraTreeFruitGene.OsangeOsange, WorldGenJungle.OsangeOsange.class),
OldFustic("maclura", "tinctoria", 0x687a50, ILogType.ExtraTreeLog.Maclura, null, WorldGenJungle.OldFustic.class),
Brazilwood("caesalpinia", "echinata", 0x607459, ILogType.ExtraTreeLog.Brazilwood, null, WorldGenJungle.Brazilwood.class),
Logwood("haematoxylum", "campechianum", 0x889f6b, ILogType.ExtraTreeLog.Logwood, null, WorldGenJungle.Logwood.class),
Rosewood("dalbergia", "latifolia", 0x879b22, ILogType.ExtraTreeLog.Rosewood, null, WorldGenJungle.Rosewood.class),
Purpleheart("peltogyne", "spp.", 0x778f55, ILogType.ExtraTreeLog.Purpleheart, null, WorldGenJungle.Purpleheart.class),
Iroko("milicia", "excelsa", 0xafc86c, ILogType.ExtraTreeLog.Iroko, null, WorldGenTree2.Iroko.class),
Gingko("ginkgo", "biloba", 0x719651, ILogType.ExtraTreeLog.Gingko, ExtraTreeFruitGene.GingkoNut, WorldGenTree2.Gingko.class),
Brazilnut("bertholletia", "excelsa", 0x7c8f7b, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.BrazilNut, WorldGenJungle.BrazilNut.class),
RoseGum("eucalyptus", "grandis", 0x9ca258, ILogType.ExtraTreeLog.Eucalyptus, null, WorldGenEucalyptus.RoseGum.class),
SwampGum("eucalyptus", "grandis", 0xa2c686, ILogType.ExtraTreeLog.Eucalyptus2, null, WorldGenEucalyptus.SwampGum.class),
Box("boxus", "sempervirens", 0x72996d, ILogType.ExtraTreeLog.Box, null, WorldGenTree2.Box.class),
Clove("syzygium", "aromaticum", 0x7a821f, ILogType.ExtraTreeLog.Syzgium, ExtraTreeFruitGene.Clove, WorldGenTree2.Clove.class),
Coffee("coffea", "arabica", 0x6f9065, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coffee, WorldGenJungle.Coffee.class),
MonkeyPuzzle("araucaria", "araucana", 0x576158, ILogType.ForestryLog.PINE, null, WorldGenConifer.MonkeyPuzzle.class),
RainbowGum("eucalyptus", "deglupta", 0xb7f025, ILogType.ExtraTreeLog.Eucalyptus3, null, WorldGenEucalyptus.RainbowGum.class),
Butternut("juglans", "cinerea", 0x82b58c, ILogType.ExtraTreeLog.Butternut, ExtraTreeFruitGene.Butternut, WorldGenButternut.class),
Rowan("sorbus", "aucuparia", 0x9ec79b, ILogType.ExtraTreeLog.Rowan, null, WorldGenRowan.class),
Hemlock("tsuga", "heterophylla", 0x5cac72, ILogType.ExtraTreeLog.Hemlock, null, WorldGenWesternHemlock.class),
Ash("fraxinus", "excelsior", 0x488e2b, ILogType.ExtraTreeLog.Ash, null, WorldGenCommonAsh.class),
Alder("alnus", "glutinosa", 0x698a33, ILogType.ExtraTreeLog.Alder, null, WorldGenCommonAlder.class),
Beech("fagus", "sylvatica", 0x83a04c, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenCommonBeech.class),
CopperBeech("fagus", "purpurea", 0x801318, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenCopperBeech.class),
Aspen("populus", "tremula", 0x8acc37, ILogType.ForestryLog.POPLAR, null, WorldGenAspen.class),
Yew("taxus", "baccata", 0x948a4d, ILogType.ExtraTreeLog.Yew, null, WorldGenYew.class),
Cypress("chamaecyparis", "lawsoniana", 0x89c9a7, ILogType.ExtraTreeLog.Cypress, null, WorldGenCypress.class),
DouglasFir("pseudotsuga", "menziesii", 0x99b582, ILogType.ExtraTreeLog.Fir, null, WorldGenDouglasFir.class),
Hazel("Corylus", "avellana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenHazel.class),
Sycamore("ficus", "sycomorus", 0xa0a52f, ILogType.ExtraTreeLog.Fig, ExtraTreeFruitGene.Fig, WorldGenSycamore.class),
Whitebeam("sorbus", "aria", 0xbace99, ILogType.ExtraTreeLog.Whitebeam, null, WorldGenWhitebeam.class),
Hawthorn("crataegus", "monogyna", 0x6ba84a, ILogType.ExtraTreeLog.Hawthorn, null, WorldGenHawthorn.class),
Pecan("carya", "illinoinensis", 0x85b674, ILogType.ExtraTreeLog.Hickory, ExtraTreeFruitGene.Pecan, WorldGenPecan.class),
Elm("ulmus", "procera", 0x7c9048, ILogType.ExtraTreeLog.Elm, null, WorldGenElm.class),
Elder("sambucus", "nigra", 0xaeb873, ILogType.ExtraTreeLog.Elder, ExtraTreeFruitGene.Elderberry, WorldGenElder.class),
Holly("ilex", "aquifolium", 0x254b4c, ILogType.ExtraTreeLog.Holly, null, WorldGenHolly.class),
Hornbeam("carpinus", "betulus", 0x96a71b, ILogType.ExtraTreeLog.Hornbeam, null, WorldGenHornbeam.class),
Sallow("salix", "caprea", 0xaeb323, ILogType.ForestryLog.WILLOW, null, WorldGenSallow.class),
AcornOak("quercus", "robur", 0x66733e, ILogType.VanillaLog.Oak, ExtraTreeFruitGene.Acorn, WorldGenAcornOak.class),
Fir("abies", "alba", 0x6f7c20, ILogType.ExtraTreeLog.Fir, null, WorldGenSilverFir.class),
Cedar("cedrus", "libani", 0x95a370, ILogType.ExtraTreeLog.Cedar, null, WorldGenCedar.class),
Olive("olea", "europaea", 0x3c4834, ILogType.ExtraTreeLog.Olive, ExtraTreeFruitGene.Olive, WorldGenOlive.class),
RedMaple("acer", "ubrum", 0xe82e17, ILogType.ForestryLog.MAPLE, null, WorldGenRedMaple.class),
BalsamFir("abies", "balsamea", 0x74a07c, ILogType.ExtraTreeLog.Fir, null, WorldGenBalsamFir.class),
LoblollyPine("pinus", "taeda", 0x6f8a47, ILogType.ForestryLog.PINE, null, WorldGenLoblollyPine.class),
Sweetgum("liquidambar", "styraciflua", 0x8b8762, ILogType.ExtraTreeLog.Sweetgum, null, WorldGenSweetgum.class),
Locust("robinia", "pseudoacacia", 0x887300, ILogType.ExtraTreeLog.Locust, null, WorldGenLocust.class),
Pear("pyrus", "communis", 0x5e8826, ILogType.ExtraTreeLog.Pear, ExtraTreeFruitGene.Pear, WorldGenPear.class),
OsangeOsange("maclura", "pomifera", 0x687a50, ILogType.ExtraTreeLog.Maclura, ExtraTreeFruitGene.OsangeOsange, WorldGenOsangeOsange.class),
OldFustic("maclura", "tinctoria", 0x687a50, ILogType.ExtraTreeLog.Maclura, null, WorldGenOldFustic.class),
Brazilwood("caesalpinia", "echinata", 0x607459, ILogType.ExtraTreeLog.Brazilwood, null, WorldGenBrazilwood.class),
Logwood("haematoxylum", "campechianum", 0x889f6b, ILogType.ExtraTreeLog.Logwood, null, WorldGenLogwood.class),
Rosewood("dalbergia", "latifolia", 0x879b22, ILogType.ExtraTreeLog.Rosewood, null, WorldGenRosewood.class),
Purpleheart("peltogyne", "spp.", 0x778f55, ILogType.ExtraTreeLog.Purpleheart, null, WorldGenPurpleheart.class),
Iroko("milicia", "excelsa", 0xafc86c, ILogType.ExtraTreeLog.Iroko, null, WorldGenIroko.class),
Gingko("ginkgo", "biloba", 0x719651, ILogType.ExtraTreeLog.Gingko, ExtraTreeFruitGene.GingkoNut, WorldGenGingko.class),
Brazilnut("bertholletia", "excelsa", 0x7c8f7b, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.BrazilNut, WorldGenBrazilNut.class),
RoseGum("eucalyptus", "grandis", 0x9ca258, ILogType.ExtraTreeLog.Eucalyptus, null, WorldGenRoseGum.class),
SwampGum("eucalyptus", "grandis", 0xa2c686, ILogType.ExtraTreeLog.Eucalyptus2, null, WorldGenSwampGum.class),
Box("boxus", "sempervirens", 0x72996d, ILogType.ExtraTreeLog.Box, null, WorldGenBox.class),
Clove("syzygium", "aromaticum", 0x7a821f, ILogType.ExtraTreeLog.Syzgium, ExtraTreeFruitGene.Clove, WorldGenClove.class),
Coffee("coffea", "arabica", 0x6f9065, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coffee, WorldGenCoffee.class),
MonkeyPuzzle("araucaria", "araucana", 0x576158, ILogType.ForestryLog.PINE, null, WorldGenMonkeyPuzzle.class),
RainbowGum("eucalyptus", "deglupta", 0xb7f025, ILogType.ExtraTreeLog.Eucalyptus3, null, WorldGenRainbowGum.class),
PinkIvory("berchemia", "zeyheri", 0x7c9159, ILogType.ExtraTreeLog.PinkIvory, null, WorldGenTree.class),
Blackcurrant("ribes", "nigrum", 0xa6da5c, null, ExtraTreeFruitGene.Blackcurrant, WorldGenShrub.Shrub.class),
Redcurrant("ribes", "rubrum", 0x74ac00, null, ExtraTreeFruitGene.Redcurrant, WorldGenShrub.Shrub.class),
Blackberry("rubus", "fruticosus", 0x92c15b, null, ExtraTreeFruitGene.Blackberry, WorldGenShrub.Shrub.class),
Raspberry("rubus", "idaeus", 0x83b96e, null, ExtraTreeFruitGene.Raspberry, WorldGenShrub.Shrub.class),
Blueberry("vaccinium", "corymbosum", 0x72c750, null, ExtraTreeFruitGene.Blueberry, WorldGenShrub.Shrub.class),
Cranberry("vaccinium", "oxycoccos", 0x96d179, null, ExtraTreeFruitGene.Cranberry, WorldGenShrub.Shrub.class),
Juniper("juniperus", "communis", 0x90b149, null, ExtraTreeFruitGene.Juniper, WorldGenShrub.Shrub.class),
Gooseberry("ribes", "grossularia", 0x79bb00, null, ExtraTreeFruitGene.Gooseberry, WorldGenShrub.Shrub.class),
GoldenRaspberry("rubus", "occidentalis", 0x83b96e, null, ExtraTreeFruitGene.GoldenRaspberry, WorldGenShrub.Shrub.class),
Cinnamon("cinnamomum", "cassia", 0x738e0b, ILogType.ExtraTreeLog.Cinnamon, null, WorldGenLazy.Tree.class),
Coconut("cocous", "nucifera", 0x649923, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coconut, WorldGenPalm.Coconut.class),
Cashew("anacardium", "occidentale", 0xabb962, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Cashew, WorldGenLazy.Tree.class),
Avacado("persea", "americana", 0x96a375, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Avacado, WorldGenLazy.Tree.class),
Nutmeg("myristica", "fragrans", 0x488d4c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Nutmeg, WorldGenLazy.Tree.class),
Allspice("pimenta", "dioica", 0x7c9724, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Allspice, WorldGenLazy.Tree.class),
Chilli("capsicum", "annuum", 0x2a9f01, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Chilli, WorldGenLazy.Tree.class),
StarAnise("illicium", "verum", 0x7fc409, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.StarAnise, WorldGenLazy.Tree.class),
Mango("mangifera", "indica", 0x87b574, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Mango, WorldGenTropical.Mango.class),
Starfruit("averrhoa", "carambola", 0x6da92d, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Starfruit, WorldGenLazy.Tree.class),
Candlenut("aleurites", "moluccana", 0x8aa36c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Candlenut, WorldGenLazy.Tree.class),
DwarfHazel("Corylus", "americana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenShrub.Shrub.class);
Blackcurrant("ribes", "nigrum", 0xa6da5c, null, ExtraTreeFruitGene.Blackcurrant, WorldGenShrub.class),
Redcurrant("ribes", "rubrum", 0x74ac00, null, ExtraTreeFruitGene.Redcurrant, WorldGenShrub.class),
Blackberry("rubus", "fruticosus", 0x92c15b, null, ExtraTreeFruitGene.Blackberry, WorldGenShrub.class),
Raspberry("rubus", "idaeus", 0x83b96e, null, ExtraTreeFruitGene.Raspberry, WorldGenShrub.class),
Blueberry("vaccinium", "corymbosum", 0x72c750, null, ExtraTreeFruitGene.Blueberry, WorldGenShrub.class),
Cranberry("vaccinium", "oxycoccos", 0x96d179, null, ExtraTreeFruitGene.Cranberry, WorldGenShrub.class),
Juniper("juniperus", "communis", 0x90b149, null, ExtraTreeFruitGene.Juniper, WorldGenShrub.class),
Gooseberry("ribes", "grossularia", 0x79bb00, null, ExtraTreeFruitGene.Gooseberry, WorldGenShrub.class),
GoldenRaspberry("rubus", "occidentalis", 0x83b96e, null, ExtraTreeFruitGene.GoldenRaspberry, WorldGenShrub.class),
Cinnamon("cinnamomum", "cassia", 0x738e0b, ILogType.ExtraTreeLog.Cinnamon, null, WorldGenLazy.class),
Coconut("cocous", "nucifera", 0x649923, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coconut, WorldGenCoconut.class),
Cashew("anacardium", "occidentale", 0xabb962, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Cashew, WorldGenLazy.class),
Avacado("persea", "americana", 0x96a375, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Avacado, WorldGenLazy.class),
Nutmeg("myristica", "fragrans", 0x488d4c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Nutmeg, WorldGenLazy.class),
Allspice("pimenta", "dioica", 0x7c9724, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Allspice, WorldGenLazy.class),
Chilli("capsicum", "annuum", 0x2a9f01, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Chilli, WorldGenLazy.class),
StarAnise("illicium", "verum", 0x7fc409, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.StarAnise, WorldGenLazy.class),
Mango("mangifera", "indica", 0x87b574, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Mango, WorldGenMango.class),
Starfruit("averrhoa", "carambola", 0x6da92d, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Starfruit, WorldGenLazy.class),
Candlenut("aleurites", "moluccana", 0x8aa36c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Candlenut, WorldGenLazy.class),
DwarfHazel("Corylus", "americana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenShrub.class);
public ILogType wood;
@@ -1169,6 +1205,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
try {
return gen.getConstructor(ITreeGenData.class).newInstance(tree);
} catch (Exception ex) {
ex.printStackTrace();
// ignored
}
}
@@ -1179,11 +1216,9 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
leafType = type;
if (leafType == LeafType.CONIFER) {
saplingType = SaplingType.CONIFER;
}
if (leafType == LeafType.JUNGLE) {
} else if (leafType == LeafType.JUNGLE) {
saplingType = SaplingType.JUNGLE;
}
if (leafType == LeafType.PALM) {
} else if (leafType == LeafType.PALM) {
saplingType = SaplingType.PALM;
}
return this;
@@ -1247,7 +1282,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
return this;
}
public int getLeafColour(ITree tree) {
public int getLeafColor(ITree tree) {
return color;
}
@@ -1359,14 +1394,14 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
public int getGermlingColour(EnumGermlingType type, int renderPass) {
if (type == EnumGermlingType.SAPLING) {
if (renderPass == 0) {
return getLeafColour(null);
return getLeafColor(null);
}
if (getLog() == null) {
return 0xffffff;
}
return getLog().getColour();
}
return getLeafColour(null);
return getLeafColor(null);
}
@Override
@@ -1,12 +1,13 @@
package binnie.extratrees.worldgen;
import binnie.core.Mods;
import binnie.extratrees.ExtraTrees;
import forestry.api.world.ITreeGenData;
import net.minecraft.world.World;
public class BlockTypeLeaf extends BlockType {
public BlockTypeLeaf() {
super(Mods.forestry.block("leaves"), 0);
public BlockTypeLeaf(boolean decay) {
super(decay ? Mods.forestry.block("leaves") : ExtraTrees.blockShrubLeaves, 0);
}
@Override
@@ -24,8 +24,9 @@ public class DefaultTreeGenerator implements ITreeGenerator {
@Override
public void setLogBlock(ITreeGenome genome, World world, int x, int y, int z, ForgeDirection direction) {
if (extraTreeSpecies.wood != null)
if (extraTreeSpecies.wood != null) {
extraTreeSpecies.wood.placeBlock(world, x, y, z);
}
}
@Override
@@ -0,0 +1,34 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenAcornOak extends WorldGenTree {
public WorldGenAcornOak(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 3.0f;
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.4f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.7f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.2f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,47 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenAlder {
public static class CommonAlder extends WorldGenTree {
public CommonAlder(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.4f, 0.45f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.4f, 1, leaf, false);
}
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -1,103 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenApple {
public static class OrchardApple extends WorldGenTree {
public OrchardApple(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
while (leafSpawn > 2) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(3, 6);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class SweetCrabapple extends WorldGenTree {
public SweetCrabapple(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 4);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class FloweringCrabapple extends WorldGenTree {
public FloweringCrabapple(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.0f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(3, 6);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class PrairieCrabapple extends WorldGenTree {
public PrairieCrabapple(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 4);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -1,39 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenAsh {
public static class CommonAsh extends WorldGenTree {
public CommonAsh(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.35f, 0.45f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenAspen extends WorldGenTree {
public WorldGenAspen(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(height / 2, height / 2 + 1) + 1;
float width = height * randBetween(0.25f, 0.35f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.5f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,35 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenBalsamFir extends WorldGenTree {
public WorldGenBalsamFir(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = 1.0f;
float width = height / randBetween(2.0f, 2.5f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= width;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -13,10 +13,10 @@ public class WorldGenBanana extends WorldGenTree {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
float width = height / randBetween(1.8f, 2.0f);
int bottom = randBetween(3, 4);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.9f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.9f * width, 1, leaf, false);
}
@Override
@@ -1,47 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
public class WorldGenBeech {
public static class CommonBeech extends WorldGenTree {
public CommonBeech(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.47f, 0.5f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.5f, 1, leaf, false);
}
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 1.0f, 1, leaf, false);
}
}
public static class CopperBeech extends CommonBeech {
public CopperBeech(ITree tree) {
super(tree);
}
}
}
@@ -0,0 +1,26 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenBox extends WorldGenTree {
public WorldGenBox(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 0.0f;
float width = 1.5f;
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(3, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenBrazilNut extends WorldGenTree {
public WorldGenBrazilNut(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = height - 3;
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,31 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenBrazilwood extends WorldGenTree {
public WorldGenBrazilwood(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 1.0f;
float width = height * randBetween(0.15f, 0.2f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.8f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(4, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,32 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenButternut extends WorldGenTree {
public WorldGenButternut(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
}
if (rand.nextBoolean()) {
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 4.0f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(6, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,60 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCedar extends WorldGenTree {
public WorldGenCedar(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 3;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.7f, 0.75f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), girth, 1, leaf, false);
}
for (leafSpawn = height + 3; leafSpawn > bottom; leafSpawn += 1 + rand.nextInt(2)) {
float cone = 1.0f - (leafSpawn - bottom) / coneHeight;
cone *= 2.0f - cone;
float radius = (0.7f + rand.nextFloat() * 0.3f) * width;
radius *= cone;
if (radius < 2.0f) {
radius = 2.0f;
}
float xOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
xOffset *= cone;
if (xOffset > radius / 2.0f) {
xOffset = radius / 2.0f;
}
float yOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
yOffset *= cone;
if (yOffset > radius / 2.0f) {
yOffset = radius / 2.0f;
}
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), 0.7f * radius, 1, leaf, false);
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), radius, 1, leaf, false);
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), 0.5f * radius, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenClove extends WorldGenTree {
public WorldGenClove(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 2.0f;
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.6f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.4f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,27 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCoconut extends WorldGenTree {
public WorldGenCoconut(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float width = height * randBetween(0.35f, 0.4f);
if (width < 1.2) {
width = 1.55f;
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.6f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,32 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCoffee extends WorldGenTree {
public WorldGenCoffee(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 1.0f;
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.3f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(3, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCommonAlder extends WorldGenTree {
public WorldGenCommonAlder(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.4f, 0.45f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.3f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,30 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCommonAsh extends WorldGenTree {
public WorldGenCommonAsh(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.35f, 0.45f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,27 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCommonBeech extends WorldGenTree {
public WorldGenCommonBeech(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.47f, 0.5f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.0f, 1, leaf, false);
}
}
@@ -1,273 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenConifer {
public static class WesternHemlock extends WorldGenTree {
public WesternHemlock(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 6;
float bottom = randBetween(2, 3);
float width = height / randBetween(2.0f, 2.5f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Cypress extends WorldGenTree {
public Cypress(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = 1.0f;
float width = height * randBetween(0.15f, 0.2f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= width - 1.0f;
++radius;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Yew extends WorldGenTree {
public Yew(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.7f, 0.75f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= 2.0f - radius;
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Cedar extends WorldGenTree {
public Cedar(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 3;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.7f, 0.75f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), girth, 1, leaf, false);
}
for (leafSpawn = height + 3; leafSpawn > bottom; leafSpawn += 1 + rand.nextInt(2)) {
float cone = 1.0f - (leafSpawn - bottom) / coneHeight;
float radius = (0.7f + rand.nextFloat() * 0.3f) * width;
float xOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
float yOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
cone *= 2.0f - cone;
xOffset *= cone;
yOffset *= cone;
radius *= cone;
if (radius < 2.0f) {
radius = 2.0f;
}
if (xOffset > radius / 2.0f) {
xOffset = radius / 2.0f;
}
if (yOffset > radius / 2.0f) {
yOffset = radius / 2.0f;
}
float f2 = xOffset;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, yOffset), 0.7f * radius, 1, leaf, false);
float f3 = xOffset;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, yOffset), radius, 1, leaf, false);
float f4 = xOffset;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, yOffset), 0.5f * radius, 1, leaf, false);
}
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class LoblollyPine extends WorldGenTree {
public LoblollyPine(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = height * randBetween(0.65f, 0.7f);
float width = height * randBetween(0.25f, 0.3f);
if (width > 7.0f) {
width = 7.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.6f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class MonkeyPuzzle extends WorldGenTree {
public MonkeyPuzzle(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.4f, 0.45f);
if (width > 7.0f) {
width = 7.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.35f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.55f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.75f * width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.9f * width, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 1.0f * width, 1, leaf, false);
float f6 = 0.0f;
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateCylinder(new Vector(f6, h6, 0.0f), 0.5f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(9, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,9 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCopperBeech extends WorldGenCommonBeech {
public WorldGenCopperBeech(ITreeGenData tree) {
super(tree);
}
}
@@ -0,0 +1,35 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCypress extends WorldGenTree {
public WorldGenCypress(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = 1.0f;
float width = height * randBetween(0.15f, 0.2f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = (1.0f - (leafSpawn - bottom) / coneHeight) * (width - 1.0f) + 1;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -24,11 +24,6 @@ public class WorldGenDefault extends WorldGenTree {
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
@Override
public BlockType getLeaf() {
return new BlockTypeLeaf();
}
@Override
public BlockType getWood() {
return new BlockTypeLog(((ExtraTreeSpecies) treeGen.getGenome().getPrimary()).getLog());
@@ -0,0 +1,40 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenDouglasFir extends WorldGenTree {
public WorldGenDouglasFir(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float patchyBottom = height / 2;
float bottom = randBetween(3, 4);
float width = height * randBetween(0.35f, 0.4f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
bushiness = 0.1f;
while (leafSpawn > patchyBottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
}
bushiness = 0.5f;
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.7f, 1.0f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.3f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,34 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenElder extends WorldGenTree {
public WorldGenElder(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 3.0f;
float width = height * randBetween(0.55f, 0.6f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenElm extends WorldGenTree {
public WorldGenElm(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,151 +0,0 @@
package binnie.extratrees.worldgen;
import binnie.extratrees.block.ILogType;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenEucalyptus {
public static class SwampGum extends WorldGenTree {
public SwampGum(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float weakerBottm = randBetween(0.5f, 0.6f) * height;
float bottom = randBetween(0.4f, 0.5f) * height;
float width = height * randBetween(0.15f, 0.2f);
if (width > 7.0f) {
width = 7.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
bushiness = 0.3f;
while (leafSpawn > weakerBottm) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.9f, 1.0f) * width, 1, leaf, false);
}
bushiness = 0.6f;
while (leafSpawn > bottom) {
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), randBetween(0.8f, 0.9f) * width, 1, leaf, false);
}
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 0.5f * width, 1, leaf, false);
for (int i = 0; i < 5; ++i) {
float f6 = randBetween(-1, 1);
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateSphere(new Vector(f6, h6, randBetween(-1, 1)), randBetween(1, 2), leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(14, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class RoseGum extends WorldGenTree {
public RoseGum(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int offset = (girth - 1) / 2;
for (int x = 0; x < girth; ++x) {
for (int y = 0; y < girth; ++y) {
for (int i = 0; i < 2; ++i) {
addBlock(x - offset, i, y - offset, new BlockTypeLog(ILogType.ExtraTreeLog.Eucalyptus2), true);
}
}
}
float leafSpawn = height + 2;
float bottom = randBetween(0.4f, 0.5f) * height;
float width = height * randBetween(0.05f, 0.1f);
if (width < 1.5f) {
width = 1.5f;
}
bushiness = 0.5f;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
while (leafSpawn > bottom) {
bushiness = 0.1f;
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(9, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class RainbowGum extends WorldGenTree {
public RainbowGum(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(0.5f, 0.6f) * height;
float width = height * randBetween(0.15f, 0.2f);
if (width < 1.5f) {
width = 1.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.5f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -1,137 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenFir {
public static class DouglasFir extends WorldGenTree {
public DouglasFir(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float patchyBottom = height / 2;
float bottom = randBetween(3, 4);
float width = height * randBetween(0.35f, 0.4f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
bushiness = 0.1f;
while (leafSpawn > patchyBottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
}
bushiness = 0.5f;
while (leafSpawn > bottom) {
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), randBetween(0.7f, 1.0f) * width, 1, leaf, false);
}
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 0.7f * width, 1, leaf, false);
float f6 = 0.0f;
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateCylinder(new Vector(f6, h6, 0.0f), 0.3f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class SilverFir extends WorldGenTree {
public SilverFir(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(2, 3);
float width = height / randBetween(2.5f, 3.0f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class BalsamFir extends WorldGenTree {
public BalsamFir(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = 1.0f;
float width = height / randBetween(2.0f, 2.5f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,29 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenFloweringCrabapple extends WorldGenTree {
public WorldGenFloweringCrabapple(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.0f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(3, 6);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,42 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenGingko extends WorldGenTree {
public WorldGenGingko(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = 2.0f;
float width = height * randBetween(0.55f, 0.6f);
if (width > 7.0f) {
width = 7.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 2.0f, 1, leaf, false);
while (leafSpawn > bottom * 2.0f + 1.0f) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.9f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.9f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenHawthorn extends WorldGenTree {
public WorldGenHawthorn(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.4f, 0.45f);
if (width < 1.5f) {
width = 1.5f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,34 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenHazel extends WorldGenTree {
public WorldGenHazel(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 3.0f;
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.5f) {
width = 2.5f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.3f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.6f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.2f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -2,45 +2,34 @@ package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenHolly {
public static class Holly extends WorldGenTree {
public Holly(ITreeGenData tree) {
super(tree);
public class WorldGenHolly extends WorldGenTree {
public WorldGenHolly(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 1.0f;
float width = height * randBetween(0.4f, 0.45f);
if (width < 1.5f) {
width = 1.5f;
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 1.0f;
float width = height * randBetween(0.4f, 0.45f);
if (width < 1.5f) {
width = 1.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width = 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 1.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,32 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenHornbeam extends WorldGenTree {
public WorldGenHornbeam(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.55f, 0.6f);
if (width < 1.5f) {
width = 1.5f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.3f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,31 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenIroko extends WorldGenTree {
public WorldGenIroko(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.5f) {
width = 2.5f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.25f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.7f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,341 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenJungle {
public static class Brazilwood extends WorldGenTree {
public Brazilwood(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 1.0f;
float width = height * randBetween(0.15f, 0.2f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 0.8f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(4, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Logwood extends WorldGenTree {
public Logwood(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.7f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(4, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Rosewood extends WorldGenTree {
public Rosewood(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.2f, 0.25f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.5f, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.7f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Purpleheart extends WorldGenTree {
public Purpleheart(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = height - 3;
float width = height * randBetween(0.2f, 0.25f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.5f, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.7f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class OsangeOsange extends WorldGenTree {
public OsangeOsange(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.2f, 0.25f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.6f, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class OldFustic extends WorldGenTree {
public OldFustic(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 0.7f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.5f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Coffee extends WorldGenTree {
public Coffee(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 1.0f;
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 0.5f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.3f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(3, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class BrazilNut extends WorldGenTree {
public BrazilNut(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = height - 3;
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.5f, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Shrub15 extends WorldGenTree {
public Shrub15(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 1.0f;
float width = height * randBetween(0.15f, 0.2f);
if (width < 1.5f) {
width = 1.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 0.8f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -2,39 +2,28 @@ package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenLazy {
public static class Tree extends WorldGenTree {
public Tree(ITreeGenData tree) {
super(tree);
public class WorldGenLazy extends WorldGenTree {
public WorldGenLazy(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float width = height * randBetween(0.35f, 0.4f);
if (width < 1.2) {
width = 1.55f;
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = height / 2 - 1;
float width = height * randBetween(0.35f, 0.4f);
if (width < 1.2) {
width = 1.55f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.5f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,34 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenLoblollyPine extends WorldGenTree {
public WorldGenLoblollyPine(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = height * randBetween(0.65f, 0.7f);
float width = height * randBetween(0.25f, 0.3f);
if (width > 7.0f) {
width = 7.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.6f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,36 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenLocust extends WorldGenTree {
public WorldGenLocust(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.35f, 0.4f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom + 1.0f) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.3f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.7f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.4f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,32 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenLogwood extends WorldGenTree {
public WorldGenLogwood(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.7f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(4, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,37 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenMango extends WorldGenTree {
public WorldGenMango(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float width = height * randBetween(0.7f, 0.75f);
float bottom = 2.0f;
if (width < 1.2) {
width = 1.55f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.3f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.7f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.8f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.9f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,57 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenMaple {
public static class RedMaple extends WorldGenTree {
public RedMaple(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(1, 2);
float bottom2 = (height + bottom) / 2.0f;
float width = 2.0f;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
while (leafSpawn > bottom2) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.4f, 1, leaf, false);
}
width += 0.6;
while (leafSpawn > bottom) {
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 0.4f, 1, leaf, false);
}
if (leafSpawn == bottom) {
float f6 = 0.0f;
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateCylinder(new Vector(f6, h6, 0.0f), width - 0.6f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,32 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenMonkeyPuzzle extends WorldGenTree {
public WorldGenMonkeyPuzzle(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float width = height * randBetween(0.4f, 0.45f);
if (width > 7.0f) {
width = 7.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.35f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.55f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.75f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.9f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.0f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.5f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(9, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,32 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenOldFustic extends WorldGenTree {
public WorldGenOldFustic(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.7f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,29 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenOlive extends WorldGenTree {
public WorldGenOlive(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float width = height * randBetween(0.35f, 0.4f);
if (width < 1.2) {
width = 1.55f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,28 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenOrchardApple extends WorldGenTree {
public WorldGenOrchardApple(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
while (leafSpawn > 2) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(3, 6);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,32 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenOsangeOsange extends WorldGenTree {
public WorldGenOsangeOsange(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.2f, 0.25f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.6f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,29 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenPalm {
public static class Coconut extends WorldGenTree {
public Coconut(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float width = height * randBetween(0.35f, 0.4f);
if (width < 1.2) {
width = 1.55f;
}
generateCylinder(new Vector(0, leafSpawn, 0.0f), width - 0.6f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,31 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenPear extends WorldGenTree {
public WorldGenPear(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(3, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -2,24 +2,29 @@ package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenPrune extends WorldGenTree {
public WorldGenPrune(ITreeGenData tree) {
public class WorldGenPecan extends WorldGenTree {
public WorldGenPecan(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
float width = height / randBetween(1.7f, 2.1f);
int bottom = randBetween(2, 3);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.6f, 0.65f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.3f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.6f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.9f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.6f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.3f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.6f * width, 1, leaf, false);
}
@Override
@@ -1,46 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenPoplar {
public static class Aspen extends WorldGenTree {
public Aspen(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(height / 2, height / 2 + 1) + 1;
float width = height * randBetween(0.25f, 0.35f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.5f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.8f * width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,30 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenPrairieCrabapple extends WorldGenTree {
public WorldGenPrairieCrabapple(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 4);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,30 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenPurpleheart extends WorldGenTree {
public WorldGenPurpleheart(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float width = height * randBetween(0.2f, 0.25f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.7f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -2,29 +2,33 @@ package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenCitrus extends WorldGenTree {
public WorldGenCitrus(ITreeGenData tree) {
public class WorldGenRainbowGum extends WorldGenTree {
public WorldGenRainbowGum(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
float width = height / randBetween(1.1f, 1.5f);
int bottom = randBetween(1, 2);
float leafSpawn = height + 2;
float bottom = randBetween(0.5f, 0.6f) * height;
float width = height * randBetween(0.15f, 0.2f);
if (width < 1.5f) {
width = 1.5f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
minHeight = randBetween(2, 3);
height = determineHeight(6, 1);
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,41 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenRedMaple extends WorldGenTree {
public WorldGenRedMaple(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(1, 2);
float bottom2 = (height + bottom) / 2.0f;
float width = 2.0f;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
while (leafSpawn > bottom2) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
}
width += 0.6;
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
}
if (leafSpawn == bottom) {
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.6f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,45 @@
package binnie.extratrees.worldgen;
import binnie.extratrees.block.ILogType;
import forestry.api.world.ITreeGenData;
public class WorldGenRoseGum extends WorldGenTree {
public WorldGenRoseGum(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int offset = (girth - 1) / 2;
for (int x = 0; x < girth; ++x) {
for (int y = 0; y < girth; ++y) {
for (int i = 0; i < 2; ++i) {
addBlock(x - offset, i, y - offset, new BlockTypeLog(ILogType.ExtraTreeLog.Eucalyptus2), true);
}
}
}
float leafSpawn = height + 2;
float bottom = randBetween(0.4f, 0.5f) * height;
float width = height * randBetween(0.05f, 0.1f);
if (width < 1.5f) {
width = 1.5f;
}
bushiness = 0.5f;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
while (leafSpawn > bottom) {
bushiness = 0.1f;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(9, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenRosewood extends WorldGenTree {
public WorldGenRosewood(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.2f, 0.25f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.7f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,23 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenRowan extends WorldGenTree {
public WorldGenRowan(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.5f, 0.6f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.5f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
}
@@ -0,0 +1,35 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenSallow extends WorldGenTree {
public WorldGenSallow(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.6f, 0.65f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.3f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.6f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.9f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.6f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,41 +1,36 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenShrub {
public static class Shrub extends WorldGenTree {
public Shrub(ITree tree) {
super(tree);
public class WorldGenShrub extends WorldGenTree {
public WorldGenShrub(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
float leafSpawn = height;
float width = height * randBetween(0.7f, 0.9f);
if (width < 1.5f) {
width = 1.5f;
}
@Override
public void generate() {
float leafSpawn = height;
float width = height * randBetween(0.7f, 0.9f);
if (width < 1.5f) {
width = 1.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn >= 0.0f) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
minHeight = 1;
height = determineHeight(1, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn >= 0.0f) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
minHeight = 1;
height = determineHeight(1, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
@Override
public BlockType getLeaf() {
return new BlockTypeLeaf(false);
}
}
@@ -0,0 +1,36 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenSilverFir extends WorldGenTree {
public WorldGenSilverFir(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(2, 3);
float width = height / randBetween(2.5f, 3.0f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= width;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,70 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenSorbus {
public static class Whitebeam extends WorldGenTree {
public Whitebeam(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.5f, 0.6f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.6f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
}
}
public static class Rowan extends WorldGenTree {
public Rowan(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.5f, 0.6f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.5f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
}
}
public static class ServiceTree extends WorldGenTree {
public ServiceTree(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
while (leafSpawn > 2) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.4f + rand.nextFloat() * 0.7f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.9f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(8, 6);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -1,151 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenSpruce {
public static class GiantSpruce extends WorldGenTree {
public GiantSpruce(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 3;
float bottom = randBetween(3, 4);
float width = height / randBetween(2.5f, 3.0f);
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius = 0.15f + 0.85f * radius;
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(15, 4);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class AlpineSpruce extends WorldGenTree {
public AlpineSpruce(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 5;
float bottom = randBetween(2, 3);
float width = height / randBetween(2.0f, 2.5f);
float coneHeight = leafSpawn - bottom;
leafSpawn -= 2.0f;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= radius;
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class WhiteSpruce extends WorldGenTree {
public WhiteSpruce(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(2, 3);
float width = height / randBetween(2.2f, 2.5f);
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius = (float) Math.sqrt(radius);
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class BlackSpruce extends WorldGenTree {
public BlackSpruce(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(2, 3);
float width = height / randBetween(2.2f, 2.5f);
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius = (float) Math.sqrt(radius);
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,45 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenSwampGum extends WorldGenTree {
public WorldGenSwampGum(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float weakerBottm = randBetween(0.5f, 0.6f) * height;
float bottom = randBetween(0.4f, 0.5f) * height;
float width = height * randBetween(0.15f, 0.2f);
if (width > 7.0f) {
width = 7.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
bushiness = 0.3f;
while (leafSpawn > weakerBottm) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.9f, 1.0f) * width, 1, leaf, false);
}
bushiness = 0.6f;
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.8f, 0.9f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.5f * width, 1, leaf, false);
for (int i = 0; i < 5; ++i) {
generateSphere(new Vector(randBetween(-1, 1), leafSpawn--, randBetween(-1, 1)), randBetween(1, 2), leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(14, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,30 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenSweetCrabapple extends WorldGenTree {
public WorldGenSweetCrabapple(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 1.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 4);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,36 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenSweetgum extends WorldGenTree {
public WorldGenSweetgum(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.7f, 0.75f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= 2.0f - radius;
radius *= width;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,33 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenSycamore extends WorldGenTree {
public WorldGenSycamore(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.35f, 0.4f);
if (width < 2.0f) {
width = 2.0f;
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.3f, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.6f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.8f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -1,132 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenTilia {
public static class Basswood extends WorldGenTree {
public Basswood(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.4f, 0.5f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.7f * width, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class WhiteBasswood extends WorldGenTree {
public WhiteBasswood(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.4f, 0.5f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.7f * width, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class CommonLime extends WorldGenTree {
public CommonLime(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.45f, 0.55f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.7f * width, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 4);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -36,9 +36,7 @@ public abstract class WorldGenTree extends WorldGenerator {
air = new BlockTypeVoid();
bushiness = 0.0f;
spawnPods = tree.allowsFruitBlocks();
if (tree instanceof ITreeGenData) {
treeGen = tree;
}
treeGen = tree;
}
protected int randBetween(int a, int b) {
@@ -71,18 +69,13 @@ public abstract class WorldGenTree extends WorldGenerator {
return base;
}
protected int modifyByHeight(int val, int min, int max) {
int determined = Math.round(val * treeGen.getHeightModifier());
return (determined < min) ? min : ((determined > max) ? max : determined);
}
protected int determineHeight(int required, int variation) {
int determined = Math.round((required + rand.nextInt(variation)) * treeGen.getHeightModifier());
return (determined < minHeight) ? minHeight : ((determined > maxHeight) ? maxHeight : determined);
}
public BlockType getLeaf() {
return new BlockTypeLeaf();
return new BlockTypeLeaf(true);
}
public BlockType getWood() {
@@ -106,7 +99,7 @@ public abstract class WorldGenTree extends WorldGenerator {
if (!force && !canGrow()) {
return false;
}
int offset = (girth - 1) / 2;
for (int x2 = 0; x2 < girth; ++x2) {
for (int y2 = 0; y2 < girth; ++y2) {
addBlock(x2, 0, y2, new BlockTypeVoid(), true);
@@ -116,10 +109,6 @@ public abstract class WorldGenTree extends WorldGenerator {
return true;
}
public Vector getStartVector() {
return new Vector(startX, startY, startZ);
}
protected void generateTreeTrunk(int height, int width) {
generateTreeTrunk(height, width, 0.0f);
}
@@ -162,31 +151,6 @@ public abstract class WorldGenTree extends WorldGenerator {
}
}
protected void generateSupportStems(int height, int girth, float chance, float maxHeight) {
for (int offset = 1, x = -offset; x < girth + offset; ++x) {
for (int z = -offset; z < girth + offset; ++z) {
if (x != -offset || z != -offset) {
if (x != girth + offset || z != girth + offset) {
if (x != -offset || z != girth + offset) {
if (x != girth + offset || z != -offset) {
int stemHeight = rand.nextInt(Math.round(height * maxHeight));
if (rand.nextFloat() < chance) {
for (int i = 0; i < stemHeight; ++i) {
addWood(x, i, z, true);
}
}
}
}
}
}
}
}
}
protected void clearBlock(int x, int y, int z) {
air.setBlock(world, treeGen, startX + x, startY + y, startZ + z);
}
protected void addBlock(int x, int y, int z, BlockType type, boolean doReplace) {
if (doReplace || world.isAirBlock(startX + x, startY + y, startZ + z)) {
type.setBlock(world, treeGen, startX + x, startY + y, startZ + z);
@@ -197,24 +161,10 @@ public abstract class WorldGenTree extends WorldGenerator {
addBlock(x, y, z, wood, doReplace);
}
protected void addLeaf(int x, int y, int z, boolean doReplace) {
addBlock(x, y, z, leaf, doReplace);
}
protected void addVine(int x, int y, int z) {
addBlock(x, y, z, vine, false);
}
protected void generateCuboid(Vector start, Vector area, BlockType block, boolean doReplace) {
for (int x = (int) start.x; x < (int) start.x + area.x; ++x) {
for (int y = (int) start.y; y < (int) start.y + area.y; ++y) {
for (int z = (int) start.z; z < (int) start.z + area.z; ++z) {
addBlock(x, y, z, block, doReplace);
}
}
}
}
protected void generateCylinder(Vector center2, float radius, int height, BlockType block, boolean doReplace) {
float centerOffset = (girth - 1) / 2.0f;
Vector center3 = new Vector(center2.x + centerOffset, center2.y, center2.z + centerOffset);
@@ -233,29 +183,6 @@ public abstract class WorldGenTree extends WorldGenerator {
}
}
protected void generateCircle(Vector center, float radius, int width, int height, BlockType block, boolean doReplace) {
generateCircle(center, radius, width, height, block, 1.0f, doReplace);
}
protected void generateCircle(Vector center2, float radius, int width, int height, BlockType block, float chance, boolean doReplace) {
float centerOffset = (girth % 2 == 0) ? 0.5f : 0.0f;
Vector center3 = new Vector(center2.x + centerOffset, center2.y, center2.z + centerOffset);
Vector start = new Vector(center3.x - radius, center3.y, center3.z - radius);
Vector area = new Vector(radius * 2.0f + 1.0f, height, radius * 2.0f + 1.0f);
for (int x = (int) start.x; x < (int) start.x + area.x; ++x) {
for (int y = (int) start.y; y < (int) start.y + area.y; ++y) {
for (int z = (int) start.z; z < (int) start.z + area.z; ++z) {
if (rand.nextFloat() <= chance) {
double distance = Vector.distance(new Vector(x, y, z), new Vector(center3.x, y, center3.z));
if (radius - width - 0.01 < distance && distance <= radius + 0.01) {
addBlock(x, y, z, block, doReplace);
}
}
}
}
}
}
protected void generateSphere(Vector center2, int radius, BlockType block, boolean doReplace) {
float centerOffset = (girth - 1) / 2.0f;
Vector center3 = new Vector(center2.x + centerOffset, center2.y, center2.z + centerOffset);
@@ -1,321 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenTree2 {
public static class Olive extends WorldGenTree {
public Olive(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.35f, 0.4f);
if (width < 1.2) {
width = 1.55f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Sweetgum extends WorldGenTree {
public Sweetgum(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.7f, 0.75f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= 2.0f - radius;
radius *= width;
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
}
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Locust extends WorldGenTree {
public Locust(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.35f, 0.4f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom + 1.0f) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.3f, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.7f, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 0.4f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Pear extends WorldGenTree {
public Pear(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(3, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Iroko extends WorldGenTree {
public Iroko(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.5f) {
width = 2.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width * 0.25f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width * 0.5f, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width * 0.7f, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 2.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Gingko extends WorldGenTree {
public Gingko(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = 2.0f;
float width = height * randBetween(0.55f, 0.6f);
if (width > 7.0f) {
width = 7.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 2.0f, 1, leaf, false);
while (leafSpawn > bottom * 2.0f + 1.0f) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 1.5f, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.9f, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width, 1, leaf, false);
while (leafSpawn > bottom) {
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 0.9f, 1, leaf, false);
float f6 = 0.0f;
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateCylinder(new Vector(f6, h6, 0.0f), width, 1, leaf, false);
}
float f7 = 0.0f;
float h7 = leafSpawn;
leafSpawn = h7 - 1.0f;
generateCylinder(new Vector(f7, h7, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Box extends WorldGenTree {
public Box(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 0.0f;
float width = 1.5f;
while (leafSpawn > bottom) {
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(3, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Clove extends WorldGenTree {
public Clove(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = 2.0f;
float width = height * randBetween(0.25f, 0.3f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.6f, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.4f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -1,399 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
import forestry.api.world.ITreeGenData;
public class WorldGenTree3 {
public static class Hazel extends WorldGenTree {
public Hazel(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 3.0f;
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.5f) {
width = 2.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.3f, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.6f, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 1.2f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Sycamore extends WorldGenTree {
public Sycamore(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.35f, 0.4f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.3f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.6f, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.8f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Hawthorn extends WorldGenTree {
public Hawthorn(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.4f, 0.45f);
if (width < 1.5f) {
width = 1.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.5f, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Pecan extends WorldGenTree {
public Pecan(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.6f, 0.65f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.6f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.8f * width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.9f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width, 1, leaf, false);
}
float f6 = 0.0f;
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateCylinder(new Vector(f6, h6, 0.0f), 0.6f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Elm extends WorldGenTree {
public Elm(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.5f, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Elder extends WorldGenTree {
public Elder(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 3.0f;
float width = height * randBetween(0.55f, 0.6f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width - 1.0f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width - 0.4f, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.4f, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 1.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Hornbeam extends WorldGenTree {
public Hornbeam(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.55f, 0.6f);
if (width < 1.5f) {
width = 1.5f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Sallow extends WorldGenTree {
public Sallow(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 2.0f;
float width = height * randBetween(0.6f, 0.65f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), 0.6f * width, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.8f * width, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), 0.9f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width, 1, leaf, false);
}
float f6 = 0.0f;
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateCylinder(new Vector(f6, h6, 0.0f), 0.6f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(4, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class AcornOak extends WorldGenTree {
public AcornOak(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = 3.0f;
float width = height * randBetween(0.45f, 0.5f);
if (width < 2.0f) {
width = 2.0f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width * 0.4f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width * 0.7f, 1, leaf, false);
while (leafSpawn > bottom) {
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width - 0.2f, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width, 1, leaf, false);
}
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width - 0.5f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(6, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -1,58 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenTropical {
public static class Mango extends WorldGenTree {
public Mango(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height;
float width = height * randBetween(0.7f, 0.75f);
float bottom = 2.0f;
if (width < 1.2) {
width = 1.55f;
}
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), width * 0.3f, 1, leaf, false);
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), width * 0.5f, 1, leaf, false);
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), width * 0.7f, 1, leaf, false);
float f4 = 0.0f;
float h4 = leafSpawn;
leafSpawn = h4 - 1.0f;
generateCylinder(new Vector(f4, h4, 0.0f), width * 0.8f, 1, leaf, false);
float f5 = 0.0f;
float h5 = leafSpawn;
leafSpawn = h5 - 1.0f;
generateCylinder(new Vector(f5, h5, 0.0f), width * 0.9f, 1, leaf, false);
while (leafSpawn > bottom) {
float f6 = 0.0f;
float h6 = leafSpawn;
leafSpawn = h6 - 1.0f;
generateCylinder(new Vector(f6, h6, 0.0f), width, 1, leaf, false);
}
float f7 = 0.0f;
float h7 = leafSpawn;
leafSpawn = h7 - 1.0f;
generateCylinder(new Vector(f7, h7, 0.0f), width - 1.0f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -1,58 +0,0 @@
package binnie.extratrees.worldgen;
import forestry.api.arboriculture.ITree;
public class WorldGenWalnut {
public static class BlackWalnut extends WorldGenTree {
public BlackWalnut(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.6f, 1, leaf, false);
while (leafSpawn > randBetween(3, 4)) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.8f, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.7f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.8f, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(9, 6);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
public static class Butternut extends WorldGenTree {
public Butternut(ITree tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.5f, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
while (leafSpawn > 3) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
}
if (rand.nextBoolean()) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.0f, 1, leaf, false);
}
}
@Override
public void preGenerate() {
height = determineHeight(6, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}
@@ -0,0 +1,35 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenWesternHemlock extends WorldGenTree {
public WorldGenWesternHemlock(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 6;
float bottom = randBetween(2, 3);
float width = height / randBetween(2.0f, 2.5f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = (1.0f - (leafSpawn - bottom) / coneHeight) * width;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(7, 3);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -0,0 +1,25 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenWhitebeam extends WorldGenTree {
public WorldGenWhitebeam(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
int leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.5f, 0.6f);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.6f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
}
}
@@ -0,0 +1,35 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenYew extends WorldGenTree {
public WorldGenYew(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 2;
float bottom = randBetween(1, 2);
float width = height * randBetween(0.7f, 0.75f);
if (width > 7.0f) {
width = 7.0f;
}
float coneHeight = leafSpawn - bottom;
while (leafSpawn > bottom) {
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
radius *= (2.0f - radius) * width;
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
}
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
@@ -65,14 +65,16 @@ public class AcclimatiserComponentLogic extends ComponentProcessIndefinate {
ItemStack acc = acclms.get(getUtil().getRandom().nextInt(acclms.size()));
ItemStack acclimed = Acclimatiser.acclimatise(getUtil().getStack(Acclimatiser.SLOT_TARGET), acc);
if (acclimed != null) {
getUtil().setStack(Acclimatiser.SLOT_TARGET, acclimed);
boolean removed = false;
for (int i : Acclimatiser.SLOT_ACCLIMATISER) {
if (!removed && getUtil().getStack(i) != null && getUtil().getStack(i).isItemEqual(acc)) {
getUtil().decreaseStack(i, 1);
removed = true;
}
if (acclimed == null) {
return;
}
getUtil().setStack(Acclimatiser.SLOT_TARGET, acclimed);
boolean removed = false;
for (int i : Acclimatiser.SLOT_ACCLIMATISER) {
if (!removed && getUtil().getStack(i) != null && getUtil().getStack(i).isItemEqual(acc)) {
getUtil().decreaseStack(i, 1);
removed = true;
}
}
}
@@ -9,6 +9,8 @@ public class Genepool {
public static final int RF_COST = 8000;
public static final int TIME_PERIOD = 400;
public static final float ENZYME_PER_PROCESS = 0.25f;
public static final float ETHANOL_PER_PROCESS = 50.0f;
public static final int ETHANOL_PER_TICK = 1;
public static final int POWER_CAPACITY = 1600;
public static final int TANK_DNA_CAPACITY = 2000;
public static final int TANK_ETHANOL_CAPACITY = 1000;
}
@@ -22,7 +22,7 @@ public class GenepoolComponentLogic extends ComponentProcessSetCost implements I
@Override
public ErrorState canWork() {
if (getUtil().isSlotEmpty(0)) {
if (getUtil().isSlotEmpty(Genepool.SLOT_BEE)) {
return new ErrorState.NoItem(
I18N.localise("genetics.machine.genepool.error.noIndividual"),
Genepool.SLOT_BEE
@@ -39,7 +39,7 @@ public class GenepoolComponentLogic extends ComponentProcessSetCost implements I
Genepool.TANK_DNA
);
}
if (!getUtil().liquidInTank(1, 1)) {
if (!getUtil().liquidInTank(Genepool.TANK_ETHANOL, 1)) {
return new ErrorState.InsufficientLiquid(
I18N.localise("genetics.machine.genepool.error.noEthanol"),
Genepool.TANK_ETHANOL
@@ -64,9 +64,9 @@ public class GenepoolComponentLogic extends ComponentProcessSetCost implements I
private int getDNAAmount(ItemStack stack) {
ISpeciesRoot root = AlleleManager.alleleRegistry.getSpeciesRoot(stack);
if (root == null
|| root != Binnie.Genetics.getBeeRoot()
|| Binnie.Genetics.getBeeRoot().isDrone(stack)) {
if (root == null ||
root != Binnie.Genetics.getBeeRoot() ||
Binnie.Genetics.getBeeRoot().isDrone(stack)) {
return 10;
}
@@ -80,7 +80,7 @@ public class GenepoolComponentLogic extends ComponentProcessSetCost implements I
protected void onTickTask() {
ethanolDrain += getDNAAmount(getUtil().getStack(Genepool.TANK_DNA)) * 1.2f * getProgressPerTick() / 100.0f;
if (ethanolDrain >= 1.0f) {
getUtil().drainTank(Genepool.TANK_ETHANOL, 1);
getUtil().drainTank(Genepool.TANK_ETHANOL, Genepool.ETHANOL_PER_TICK);
ethanolDrain--;
}
@@ -44,10 +44,10 @@ public class GenepoolPackage extends PackageGeneticBase implements IMachineInfor
}
ComponentTankContainer tanks = new ComponentTankContainer(machine);
TankSlot dnaSlot = tanks.addTank(Genepool.TANK_DNA, "output", 2000);
TankSlot dnaSlot = tanks.addTank(Genepool.TANK_DNA, "output", Genepool.TANK_DNA_CAPACITY);
dnaSlot.setReadOnly();
TankSlot ethanolSlot = tanks.addTank(Genepool.TANK_ETHANOL, "input", 1000);
TankSlot ethanolSlot = tanks.addTank(Genepool.TANK_ETHANOL, "input", Genepool.TANK_ETHANOL_CAPACITY);
ethanolSlot.forbidExtraction();
ethanolSlot.setValidator(new EthanolTankValidator());
@@ -314,6 +314,7 @@ botany.colour.yellowgreen=Yellow-Green
botany.effect.none=None
botany.circuit.flowers=Flowers
for.binnie.circuit.garden.dry.manual.fert=Fert. Garden (Dry)
for.binnie.circuit.garden.dry.acid.manual.fert=Fert. Garden (Dry, Acidic)
for.binnie.circuit.garden.dry.neutral.manual.fert=Fert. Garden (Dry, Neutral)
@@ -375,6 +376,58 @@ botany.tube.insulate.hardenedClay=Hardened Clay
botany.tube.insulate.smoothStone=Smooth Stone
botany.tube.insulate.sandstone=Sandstone
binnie.circuit.garden.normal=Managed Garden (Normal)
binnie.circuit.garden.normal.fert=Managed Fert. Garden (Normal)
binnie.circuit.garden.normal.neutral=Managed Garden (Normal, Neutral)
binnie.circuit.garden.normal.neutral.fert=Managed Fert. Garden (Normal)
binnie.circuit.garden.normal.acid=Managed Garden (Normal, Acidic)
binnie.circuit.garden.normal.acid.fert=Managed Fert. Garden (Normal, Acidic)
binnie.circuit.garden.normal.alkaline.fert=Managed Fert. Garden (Alkaline)
binnie.circuit.garden.normal.alkaline=Managed Garden (Alkaline)
binnie.circuit.garden.damp=Managed Garden (Damp)
binnie.circuit.garden.damp.fert=Managed Fert. Garden (Damp)
binnie.circuit.garden.damp.acid=Managed Garden (Damp, Acidic)
binnie.circuit.garden.damp.acid.fert=Managed Fert. Garden (Damp, Acidic)
binnie.circuit.garden.damp.alkaline=Managed Garden (Damp, Alkaline)
binnie.circuit.garden.damp.alkaline.fert=Managed Fert. Garden (Damp, Alkaline)
binnie.circuit.garden.damp.neutral=Managed Garden (Damp, Neutral)
binnie.circuit.garden.damp.neutral.fert=Managed Fert. Garden (Damp, Neutral)
binnie.circuit.garden.dry=Managed Garden (Dry)
binnie.circuit.garden.dry.fert=Managed Fert. Garden (Dry)
binnie.circuit.garden.dry.acid=Managed Garden (Dry, Acidic)
binnie.circuit.garden.dry.acid.fert=Managed Fert. Garden (Dry, Acidic)
binnie.circuit.garden.dry.alkaline=Managed Garden (Dry, Alkaline)
binnie.circuit.garden.dry.alkaline.fert=Managed Fert. Garden (Dry, Alkaline)
binnie.circuit.garden.dry.neutral=Managed Garden (Dry, Neutral)
binnie.circuit.garden.dry.neutral.fert=Managed Fert. Garden (Dry, Neutral)
binnie.circuit.garden.neutral.fert=Managed Fert. Garden (Neutral)
binnie.circuit.garden.normal.manual=Manual Garden (Normal)
binnie.circuit.garden.normal.manual.fert=Manual Fert. Garden (Normal)
binnie.circuit.garden.normal.neutral.manual=Manual Garden (Normal, Neutral)
binnie.circuit.garden.normal.neutral.manual.fert=Manual Fert. Garden (Normal)
binnie.circuit.garden.normal.acid.manual=Manual Garden (Normal, Acidic)
binnie.circuit.garden.normal.acid.manual.fert=Manual Fert. Garden (Normal, Acidic)
binnie.circuit.garden.normal.alkaline.manual=Manual Garden (Alkaline)
binnie.circuit.garden.normal.alkaline.manual.fert=Manual Fert. Garden (Alkaline)
binnie.circuit.garden.damp.manual=Manual Garden (Damp)
binnie.circuit.garden.damp.manual.fert=Manual Fert. Garden (Damp)
binnie.circuit.garden.damp.acid.manual=Manual Garden (Damp, Acidic)
binnie.circuit.garden.damp.acid.manual.fert=Manual Fert. Garden (Damp, Acidic)
binnie.circuit.garden.damp.alkaline.manual=Manual Garden (Damp, Alkaline)
binnie.circuit.garden.damp.alkaline.manual.fert=Manual Fert. Garden (Damp, Alkaline)
binnie.circuit.garden.damp.neutral.manual=Manual Garden (Damp, Neutral)
binnie.circuit.garden.damp.neutral.manual.fert=Manual Fert. Garden (Damp, Neutral)
binnie.circuit.garden.dry.manual=Manual Garden (Dry)
binnie.circuit.garden.dry.manual.fert=Manual Fert. Garden (Dry)
binnie.circuit.garden.dry.acid.manual=Manual Garden (Dry, Acidic)
binnie.circuit.garden.dry.acid.manual.fert=Manual Fert. Garden (Dry, Acidic)
binnie.circuit.garden.dry.alkaline.manual=Manual Garden (Dry, Alkaline)
binnie.circuit.garden.dry.alkaline.manual.fert=Manual Fert. Garden (Dry, Alkaline)
binnie.circuit.garden.dry.neutral.manual=Manual Garden (Dry, Neutral)
binnie.circuit.garden.dry.neutral.manual.fert=Manual Fert. Garden (Dry, Neutral)
binnie.circuit.garden.neutral.manual.fert=Manual Fert. Garden (Neutral)
botany.gui.controls.colorMixSymbol.chance=Current Chance - %f%%
botany.gui.controls.pageSpeciesFurtherTitle=Resultant Mixes
botany.gui.controls.pageColorFurtherTitle=Further Mixes
Loaded 100 of 105 files, more files were not shown because too many files have changed in this diff. Show more