mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-17 02:55:13 +00:00
1 parent
ec790c9333
commit
5846f59d64
8 files changed
+37
-27
No files matched your search
@@ -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()) {
|
||||
|
||||
@@ -1216,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;
|
||||
@@ -1284,7 +1282,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLeafColour(ITree tree) {
|
||||
public int getLeafColor(ITree tree) {
|
||||
return color;
|
||||
}
|
||||
|
||||
@@ -1396,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,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());
|
||||
|
||||
@@ -15,18 +15,10 @@ public class WorldGenShrub extends WorldGenTree {
|
||||
width = 1.5f;
|
||||
}
|
||||
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(0.0f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(0.0f, h2, 0.0f), 0.8f * width, 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 >= 0.0f) {
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(0.0f, h3, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,4 +28,9 @@ public class WorldGenShrub extends WorldGenTree {
|
||||
height = determineHeight(1, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockType getLeaf() {
|
||||
return new BlockTypeLeaf(false);
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public abstract class WorldGenTree extends WorldGenerator {
|
||||
}
|
||||
|
||||
public BlockType getLeaf() {
|
||||
return new BlockTypeLeaf();
|
||||
return new BlockTypeLeaf(true);
|
||||
}
|
||||
|
||||
public BlockType getWood() {
|
||||
|
||||
Reference in new issue
Block a user