diff --git a/README.md b/README.md index 3e47a4b61..54ac03f79 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ +Version 0.4.8 '31-3-2013' +- fixed smoldering grass texture +- fixed flower achievement? +- fixed Giant red flower texture + Version 0.4.7 '30-3-2013' - updated to minecraft 1.5.1 diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/appleleaves3.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/appleleaves3.png new file mode 100644 index 000000000..7bfc00860 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/appleleaves3.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/appleleaves4.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/appleleaves4.png new file mode 100644 index 000000000..8443041e7 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/appleleaves4.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/autumnleaves1.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/autumnleaves1.png index 0c738dedd..badf7256a 100644 Binary files a/src/minecraft/mods/BiomesOPlenty/textures/blocks/autumnleaves1.png and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/autumnleaves1.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/bigflowerred.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/bigflowerred.png index 5adf240cb..82bd7ca3f 100644 Binary files a/src/minecraft/mods/BiomesOPlenty/textures/blocks/bigflowerred.png and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/bigflowerred.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/brownsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/brownsapling.png new file mode 100644 index 000000000..47aee006c Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/brownsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/darksapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/darksapling.png new file mode 100644 index 000000000..943985a1f Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/darksapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/desertgrass.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/desertgrass.png new file mode 100644 index 000000000..44e0a3f11 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/desertgrass.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/firsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/firsapling.png new file mode 100644 index 000000000..3a900b161 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/firsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/holysapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/holysapling.png new file mode 100644 index 000000000..57918c583 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/holysapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/logTopBottum.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/logTopBottum.png new file mode 100644 index 000000000..e926b0a69 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/logTopBottum.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/magicsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/magicsapling.png new file mode 100644 index 000000000..699e58c9b Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/magicsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/mangrovesapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/mangrovesapling.png new file mode 100644 index 000000000..52b89f735 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/mangrovesapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/orangesapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/orangesapling.png new file mode 100644 index 000000000..97508348a Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/orangesapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/originsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/originsapling.png new file mode 100644 index 000000000..28df09475 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/originsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/palmsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/palmsapling.png new file mode 100644 index 000000000..a3727a41c Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/palmsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/pinksapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/pinksapling.png new file mode 100644 index 000000000..90b2d5d95 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/pinksapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/redsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/redsapling.png new file mode 100644 index 000000000..b290027bf Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/redsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/redwoodsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/redwoodsapling.png new file mode 100644 index 000000000..339774141 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/redwoodsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/smolderinggrass2.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/smolderinggrass2.png new file mode 100644 index 000000000..46c0ab0c5 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/smolderinggrass2.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/stemTopBottum.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/stemTopBottum.png new file mode 100644 index 000000000..4f54d9abd Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/stemTopBottum.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/whitesapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/whitesapling.png new file mode 100644 index 000000000..6b6a84546 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/whitesapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/willowsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/willowsapling.png new file mode 100644 index 000000000..8e5ffadf0 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/willowsapling.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/yellowsapling.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/yellowsapling.png new file mode 100644 index 000000000..c53598c48 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/yellowsapling.png differ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLeaves.java index f45be060e..0c104bd5d 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockAcaciaLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"acacia"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockAcaciaLeaves(int par1) { @@ -34,6 +36,18 @@ public class BlockAcaciaLeaves extends BlockLeavesBase this.setTickRandomly(true); this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); } + + @Override + public void registerIcons(IconRegister par1IconRegister) + { + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves2"); + } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } public int getBlockColor() { @@ -300,14 +314,9 @@ public class BlockAcaciaLeaves extends BlockLeavesBase } @Override - public boolean isOpaqueCube() { - return Block.leaves.isOpaqueCube(); - } - - @Override - public void registerIcons(IconRegister par1IconRegister) + public boolean isOpaqueCube() { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves2") : par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves1")); + return Block.leaves.isOpaqueCube(); } public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLog.java index 647e35c99..72c84a401 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaLog.java @@ -9,18 +9,15 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================================== -//============================================================== -//============================================================== -//============================================================== - public class BlockAcaciaLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"acacia"}; + private Icon[] blockIcon = new Icon[2]; public BlockAcaciaLog(int par1) { @@ -32,8 +29,21 @@ public class BlockAcaciaLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:acacialog"); - } + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:acacialog"); + } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block @@ -117,16 +127,6 @@ public class BlockAcaciaLog extends Block return var10 | var11; } - /** - * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata - */ - /*public int getBlockTextureFromSideAndMetadata(int par1, int par2) - { - int var3 = par2 & 12; - int var4 = par2 & 3; - return var3 == 0 && (par1 == 1 || par1 == 0) ? 255 : (var3 == 4 && (par1 == 5 || par1 == 4) ? 255 : (var3 == 8 && (par1 == 2 || par1 == 3) ? 255 : (var4 == 1 ? 116 : (var4 == 2 ? 117 : (var4 == 3 ? 153 : 44))))); - }*/ - /** * Determines the damage on the item the block drops. Used in cloth and wood. */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSapling.java index dd1f09fe7..86977defc 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSapling.java @@ -19,15 +19,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenAcacia; import net.minecraft.util.AxisAlignedBB; - -//============================================================== -//============================================================== -//============================================================== -//============================================================== +import net.minecraft.util.Icon; public class BlockAcaciaSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"acacia"}; + private Icon[] blockIcon = new Icon[1]; public BlockAcaciaSapling(int par1) { @@ -40,9 +37,14 @@ public class BlockAcaciaSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:acaciasapling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:acaciasapling"); } + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } + /** * Ticks the block if it's been scheduled */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSlab.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSlab.java index 39c4f4b39..63bf70e6c 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSlab.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaSlab.java @@ -14,10 +14,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================================== -//============================================================== -//============================================================== -//============================================================== public class BlockAcaciaSlab extends BlockHalfSlab { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaStairs.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaStairs.java index 97decac61..9bf95a5fe 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaStairs.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAcaciaStairs.java @@ -8,10 +8,6 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.world.IBlockAccess; -//============================================================== -//============================================================== -//============================================================== -//============================================================== public class BlockAcaciaStairs extends BlockStairs { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeaves.java index ab5741919..9da1e5ed9 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockAppleLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"apple"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockAppleLeaves(int par1) { @@ -37,8 +39,14 @@ public class BlockAppleLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:appleleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:appleleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:appleleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:appleleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeavesFruitless.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeavesFruitless.java index 987a92fbb..969126c63 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeavesFruitless.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleLeavesFruitless.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockAppleLeavesFruitless extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"apple"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockAppleLeavesFruitless(int par1) { @@ -33,6 +35,18 @@ public class BlockAppleLeavesFruitless extends BlockLeavesBase this.setTickRandomly(true); this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); } + + @Override + public void registerIcons(IconRegister par1IconRegister) + { + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:appleleaves3"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:appleleaves4"); + } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate @@ -269,12 +283,6 @@ public class BlockAppleLeavesFruitless extends BlockLeavesBase return Block.leaves.isOpaqueCube(); } - @Override - public void registerIcons(IconRegister par1IconRegister) - { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:appleLeavesFruitlessOpaque") : par1IconRegister.registerIcon("BiomesOPlenty:appleLeavesFruitless")); - } - public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { return true; diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleSapling.java index 208b76375..bc3f462e1 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAppleSapling.java @@ -18,15 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenApple; import net.minecraft.util.AxisAlignedBB; - -//============================================================== -//============================================================== -//============================================================== -//============================================================== +import net.minecraft.util.Icon; public class BlockAppleSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"apple"}; + private Icon[] blockIcon = new Icon[1]; public BlockAppleSapling(int par1) { @@ -39,8 +36,13 @@ public class BlockAppleSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:applesapling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:applesapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAutumnLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAutumnLeaves.java index dd8ede68d..6c47452f1 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAutumnLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockAutumnLeaves.java @@ -13,14 +13,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================================== -//============================================================== -//============================================================== -//============================================================== public class BlockAutumnLeaves extends BlockLeavesBase { @@ -31,6 +28,7 @@ public class BlockAutumnLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"autumn"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockAutumnLeaves(int par1) { @@ -43,8 +41,14 @@ public class BlockAutumnLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:autumnleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:autumnleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:autumnleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:autumnleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBambooLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBambooLeaves.java index 17dd3080c..2e2107c22 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBambooLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBambooLeaves.java @@ -13,14 +13,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================================== -//============================================================== -//============================================================== -//============================================================== public class BlockBambooLeaves extends BlockLeavesBase { @@ -31,6 +28,7 @@ public class BlockBambooLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"bamboo"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockBambooLeaves(int par1) { @@ -39,12 +37,18 @@ public class BlockBambooLeaves extends BlockLeavesBase this.setBurnProperties(this.blockID, 30, 60); this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); } - + @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:bambooleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:bambooleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:bambooleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:bambooleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBlueLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBlueLeaves.java index b40196ee3..b98f269fe 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBlueLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBlueLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockBlueLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"magic"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockBlueLeaves(int par1) { @@ -38,8 +40,14 @@ public class BlockBlueLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:blueleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:blueleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:blueleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:blueleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBrownSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBrownSapling.java index 222821799..fe16891f3 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBrownSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockBrownSapling.java @@ -18,15 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenDeadTree2; import net.minecraft.util.AxisAlignedBB; - -//============================================================== -//============================================================== -//============================================================== -//============================================================== +import net.minecraft.util.Icon; public class BlockBrownSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"brown"}; + private Icon[] blockIcon = new Icon[1]; public BlockBrownSapling(int par1) { @@ -39,9 +36,14 @@ public class BlockBrownSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:brownsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:brownsapling"); } + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } + /** * Ticks the block if it's been scheduled */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockCherryLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockCherryLog.java index c69f5b693..65ba8e28a 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockCherryLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockCherryLog.java @@ -9,18 +9,15 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================================== -//============================================================== -//============================================================== -//============================================================== - public class BlockCherryLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"cherry"}; + private Icon[] blockIcon = new Icon[2]; public BlockCherryLog(int par1) { @@ -32,8 +29,21 @@ public class BlockCherryLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:cherrylog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:cherrylog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLeaves.java index 307aee12b..30b96cf04 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLeaves.java @@ -13,15 +13,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================================== -//============================================================== -//============================================================== -//============================================================== - public class BlockDarkLeaves extends BlockLeavesBase { /** @@ -31,6 +27,7 @@ public class BlockDarkLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"dark"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockDarkLeaves(int par1) { @@ -43,8 +40,14 @@ public class BlockDarkLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:darkleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:darkleaves1")); - } + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:darkleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:darkleaves2"); + } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLog.java index b0d1932ac..e5864079d 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkLog.java @@ -9,18 +9,15 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================================== -//============================================================== -//============================================================== -//============================================================== - public class BlockDarkLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"dark"}; + private Icon[] blockIcon = new Icon[2]; public BlockDarkLog(int par1) { @@ -32,8 +29,21 @@ public class BlockDarkLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:darklog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:darklog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSapling.java index 568d8a5b9..9c3051d39 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSapling.java @@ -19,15 +19,12 @@ import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenOminous1; import tdwp_ftw.biomesop.worldgen.WorldGenOminous2; import net.minecraft.util.AxisAlignedBB; - -//============================================================== -//============================================================== -//============================================================== -//============================================================== +import net.minecraft.util.Icon; public class BlockDarkSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"dark"}; + private Icon[] blockIcon = new Icon[1]; public BlockDarkSapling(int par1) { @@ -40,8 +37,13 @@ public class BlockDarkSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:darksappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:darksapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSlab.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSlab.java index 1b91cfda7..17335fd9f 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSlab.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDarkSlab.java @@ -17,12 +17,7 @@ public class BlockDarkSlab extends BlockHalfSlab { /** The type of tree this slab came from. */ public static final String[] woodType = new String[] {"dark"}; - - //============================================================== - //============================================================== - //============================================================== - //============================================================== - + public BlockDarkSlab(int par1, boolean par2) { super(par1, par2, Material.wood); diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLeaves.java index c2ef8003c..bab50ffcb 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockDeadLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"dead"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockDeadLeaves(int par1) { @@ -38,8 +40,14 @@ public class BlockDeadLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves2") : par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:deadleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:deadleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLog.java index b08b80bd7..c5474d5d0 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDeadLog.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,9 +17,8 @@ public class BlockDeadLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"dead"}; + private Icon[] blockIcon = new Icon[2]; - //=================================== - public BlockDeadLog(int par1) { super(par1, Material.wood); @@ -29,8 +29,21 @@ public class BlockDeadLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:deadlog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:deadlog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDesertGrass.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDesertGrass.java index 8000bb3c0..29ffd2219 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDesertGrass.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockDesertGrass.java @@ -6,6 +6,7 @@ import tdwp_ftw.biomesop.mod_BiomesOPlenty; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -25,6 +26,12 @@ public class BlockDesertGrass extends Block this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, 0.8F, 0.5F + var3); this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); } + + @Override + public void registerIcons(IconRegister par1IconRegister) + { + this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:desertgrass"); + } public BlockDesertGrass(int par1) { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLeaves.java index 580f218a3..e2125df4b 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockFirLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"fir"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockFirLeaves(int par1) { @@ -37,8 +39,14 @@ public class BlockFirLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:firleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:firleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:firleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:firleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLog.java index 1ea6af067..c3d0e87c4 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirLog.java @@ -9,15 +9,15 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//======================================= - public class BlockFirLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"fir"}; + private Icon[] blockIcon = new Icon[2]; public BlockFirLog(int par1) { @@ -29,8 +29,21 @@ public class BlockFirLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:firlog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:firlog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSapling.java index a76ae871c..507d8d759 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSapling.java @@ -18,12 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenTaiga9; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockFirSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"fir"}; - - //======================================== + private Icon[] blockIcon = new Icon[1]; public BlockFirSapling(int par1) { @@ -36,8 +36,13 @@ public class BlockFirSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:firsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:firsapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSlab.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSlab.java index c6b48f541..ba4cb138d 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSlab.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockFirSlab.java @@ -13,7 +13,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -//============================================== public class BlockFirSlab extends BlockHalfSlab { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockGiantFlowerStem.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockGiantFlowerStem.java index 5bb175981..cb419e581 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockGiantFlowerStem.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockGiantFlowerStem.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,8 +17,7 @@ public class BlockGiantFlowerStem extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"giantstem"}; - - //=========================================== + private Icon[] blockIcon = new Icon[2]; public BlockGiantFlowerStem(int par1) { @@ -29,8 +29,21 @@ public class BlockGiantFlowerStem extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:bigflowerstem"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:stemTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:bigflowerstem"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block @@ -114,16 +127,6 @@ public class BlockGiantFlowerStem extends Block return var10 | var11; } - /** - * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata - */ - /*public int getBlockTextureFromSideAndMetadata(int par1, int par2) - { - int var3 = par2 & 12; - int var4 = par2 & 3; - return var3 == 0 && (par1 == 1 || par1 == 0) ? 254 : (var3 == 4 && (par1 == 5 || par1 == 4) ? 254 : (var3 == 8 && (par1 == 2 || par1 == 3) ? 254 : (var4 == 1 ? 116 : (var4 == 2 ? 117 : (var4 == 3 ? 153 : 48))))); - }*/ - /** * Determines the damage on the item the block drops. Used in cloth and wood. */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyGrass.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyGrass.java index b154090ff..fefad9f76 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyGrass.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyGrass.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -15,6 +16,8 @@ import net.minecraft.world.World; public class BlockHolyGrass extends Block { + private Icon[] blockIcon = new Icon[6]; + public BlockHolyGrass(int par1) { super(par1, Material.grass); @@ -25,16 +28,21 @@ public class BlockHolyGrass extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:holygrass1"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:holystone"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:holygrass1"); + this.blockIcon[2] = par1IconRegister.registerIcon("BiomesOPlenty:holygrass2"); + this.blockIcon[3] = par1IconRegister.registerIcon("BiomesOPlenty:holygrass2"); + this.blockIcon[4] = par1IconRegister.registerIcon("BiomesOPlenty:holygrass2"); + this.blockIcon[5] = par1IconRegister.registerIcon("BiomesOPlenty:holygrass2"); } /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ - /*public int getBlockTextureFromSideAndMetadata(int par1, int par2) + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) { - return par1 == 1 ? 29 : (par1 == 0 ? 27 : 28); - }*/ + return blockIcon[par1]; + } /** * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLeaves.java index 503feff55..14e53a9e8 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockHolyLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"holy"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockHolyLeaves(int par1) { @@ -38,8 +40,14 @@ public class BlockHolyLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:holyleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:holyleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:holyleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:holyleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLog.java index 1e0b912ad..70ec86e5b 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolyLog.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,6 +17,7 @@ public class BlockHolyLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"holy"}; + private Icon[] blockIcon = new Icon[2]; public BlockHolyLog(int par1) { @@ -27,8 +29,21 @@ public class BlockHolyLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:holylog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:holylog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolySapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolySapling.java index 22a8551c9..824ea4035 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolySapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockHolySapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenPromisedTree; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockHolySapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"holy"}; + private Icon[] blockIcon = new Icon[1]; public BlockHolySapling(int par1) { @@ -34,7 +36,12 @@ public class BlockHolySapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:holysappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:holysapling"); + } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; } /** diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicLog.java index beb5a19de..6f26a1855 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicLog.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,6 +17,7 @@ public class BlockMagicLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"magic"}; + private Icon[] blockIcon = new Icon[2]; public BlockMagicLog(int par1) { @@ -26,8 +28,21 @@ public class BlockMagicLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:magiclog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:magiclog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicSapling.java index 2316ca3f4..ec622e194 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMagicSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenMystic2; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockMagicSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"magic"}; + private Icon[] blockIcon = new Icon[1]; public BlockMagicSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockMagicSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:magicsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:magicsapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLeaves.java index b380c3e33..027a45406 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockMangroveLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"mangrove"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockMangroveLeaves(int par1) { @@ -38,8 +40,14 @@ public class BlockMangroveLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:mangroveleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:mangroveleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:mangroveleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:mangroveleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } public int getBlockColor() { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLog.java index ba77991d0..9cdbe3d6c 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveLog.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,6 +17,7 @@ public class BlockMangroveLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"mangrove"}; + private Icon[] blockIcon = new Icon[2]; public BlockMangroveLog(int par1) { @@ -27,9 +29,22 @@ public class BlockMangroveLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:mangrovelog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:mangrovelog"); } + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } + /** * The type of render function that is called for this block */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveSapling.java index 80b776bfb..2347a0aa7 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockMangroveSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenMangrove; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockMangroveSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"mangrove"}; + private Icon[] blockIcon = new Icon[1]; public BlockMangroveSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockMangroveSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:mangrovesappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:mangrovesapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeLeaves.java index 85af1cdd7..a12c9e9e6 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockOrangeLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"orange"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockOrangeLeaves(int par1) { @@ -37,9 +39,15 @@ public class BlockOrangeLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:orangeleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:orangeleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:orangeleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:orangeleaves2"); } + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } + /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeSapling.java index 5b8e43f2b..7c25a3570 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOrangeSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenAutumn2; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockOrangeSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"orange"}; + private Icon[] blockIcon = new Icon[1]; public BlockOrangeSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockOrangeSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves2"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:orangesapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginGrass.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginGrass.java index ab577d892..781413e4f 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginGrass.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginGrass.java @@ -8,11 +8,14 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockOriginGrass extends Block { + private Icon[] blockIcon = new Icon[6]; + public BlockOriginGrass(int par1) { super(par1, Material.grass); @@ -23,16 +26,21 @@ public class BlockOriginGrass extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:origingrass1"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:origingrass3"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:origingrass1"); + this.blockIcon[2] = par1IconRegister.registerIcon("BiomesOPlenty:origingrass2"); + this.blockIcon[3] = par1IconRegister.registerIcon("BiomesOPlenty:origingrass2"); + this.blockIcon[4] = par1IconRegister.registerIcon("BiomesOPlenty:origingrass2"); + this.blockIcon[5] = par1IconRegister.registerIcon("BiomesOPlenty:origingrass2"); } /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ - /*public int getBlockTextureFromSideAndMetadata(int par1, int par2) + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) { - return par1 == 1 ? 32 : (par1 == 0 ? 34 : 33); - }*/ + return blockIcon[par1]; + } /** * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginLeaves.java index fbdd2ec22..ad1678a1f 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockOriginLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"origin"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockOriginLeaves(int par1) { @@ -37,8 +39,14 @@ public class BlockOriginLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:originleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:originleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:originleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:originleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginSapling.java index 19916adf4..ae538c9b1 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockOriginSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenOriginTree; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockOriginSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"origin"}; + private Icon[] blockIcon = new Icon[1]; public BlockOriginSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockOriginSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:originsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:originsapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLeaves.java index 7e8cbc64a..70a6d67f6 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockPalmLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"palm"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockPalmLeaves(int par1) { @@ -38,8 +40,14 @@ public class BlockPalmLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:palmleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:palmleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:palmleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:palmleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } public int getBlockColor() { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLog.java index 71c47c576..bfc6f8652 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmLog.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,6 +17,7 @@ public class BlockPalmLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"palm"}; + private Icon[] blockIcon = new Icon[2]; public BlockPalmLog(int par1) { @@ -27,8 +29,21 @@ public class BlockPalmLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:palmlog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:palmlog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmSapling.java index 74db92bb1..60b5688ee 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPalmSapling.java @@ -19,10 +19,12 @@ import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenPalmTree1; import tdwp_ftw.biomesop.worldgen.WorldGenPalmTree3; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockPalmSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"palm"}; + private Icon[] blockIcon = new Icon[1]; public BlockPalmSapling(int par1) { @@ -35,8 +37,13 @@ public class BlockPalmSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:palmsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:palmsapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkLeaves.java index acb1c1145..f88f2d171 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockPinkLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"pink"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockPinkLeaves(int par1) { @@ -37,8 +39,14 @@ public class BlockPinkLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:pinkleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:pinkleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:pinkleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:pinkleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkSapling.java index 04d86a23e..05075c85b 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPinkSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenCherry1; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockPinkSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"cherry"}; + private Icon[] blockIcon = new Icon[1]; public BlockPinkSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockPinkSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:pinksappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:pinksapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedLeaves.java index 1f082b64b..96c42da57 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockRedLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"red"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockRedLeaves(int par1) { @@ -37,8 +39,14 @@ public class BlockRedLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:redleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:redleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:redleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:redleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedSapling.java index 333b1cd59..26c547088 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenMaple; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockRedSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"maple"}; + private Icon[] blockIcon = new Icon[1]; public BlockRedSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockRedSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:redsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:redsapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLeaves.java index de63aa73c..30a7c6ce4 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockRedwoodLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"redwood"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockRedwoodLeaves(int par1) { @@ -38,8 +40,14 @@ public class BlockRedwoodLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:redwoodleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:redwoodleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:redwoodleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:redwoodleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } public int getBlockColor() { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLog.java index 570a9cc3a..a3267f396 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodLog.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,6 +17,7 @@ public class BlockRedwoodLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"redwood"}; + private Icon[] blockIcon = new Icon[2]; public BlockRedwoodLog(int par1) { @@ -27,8 +29,21 @@ public class BlockRedwoodLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:redwoodlog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:redwoodlog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodSapling.java index 21e931c6c..1fdd813ff 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockRedwoodSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenRedwoodTree2; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockRedwoodSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"redwood"}; + private Icon[] blockIcon = new Icon[1]; public BlockRedwoodSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockRedwoodSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:redwoodsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:redwoodsapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockSmolderingGrass.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockSmolderingGrass.java index 699a34fc6..930763d05 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockSmolderingGrass.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockSmolderingGrass.java @@ -8,11 +8,14 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockSmolderingGrass extends Block { + private Icon[] blockIcon = new Icon[6]; + public BlockSmolderingGrass(int par1) { super(par1, Material.grass); @@ -23,8 +26,18 @@ public class BlockSmolderingGrass extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:smolderinggrass1"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:smolderinggrass3"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:smolderinggrass1"); + this.blockIcon[2] = par1IconRegister.registerIcon("BiomesOPlenty:smolderinggrass2"); + this.blockIcon[3] = par1IconRegister.registerIcon("BiomesOPlenty:smolderinggrass2"); + this.blockIcon[4] = par1IconRegister.registerIcon("BiomesOPlenty:smolderinggrass2"); + this.blockIcon[5] = par1IconRegister.registerIcon("BiomesOPlenty:smolderinggrass2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[par1]; + } /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteLeaves.java index 645b34069..51cdb2877 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -25,6 +26,7 @@ public class BlockWhiteLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"white"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockWhiteLeaves(int par1) { @@ -37,8 +39,14 @@ public class BlockWhiteLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:whiteleaves2") : par1IconRegister.registerIcon("BiomesOPlenty:whiteleaves1")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:whiteleaves1"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:whiteleaves2"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteSapling.java index 5fbbf0891..e7f169717 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWhiteSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenCherry2; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockWhiteSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"white"}; + private Icon[] blockIcon = new Icon[1]; public BlockWhiteSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockWhiteSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:whitesappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:whitesapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLeaves.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLeaves.java index 53e92f53e..fdcbb072f 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLeaves.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLeaves.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; +import net.minecraft.util.Icon; import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class BlockWillowLeaves extends BlockLeavesBase private int baseIndexInPNG; public static final String[] LEAF_TYPES = new String[] {"willow"}; int[] adjacentTreeBlocks; + private Icon[] blockIcon = new Icon[2]; public BlockWillowLeaves(int par1) { @@ -38,8 +40,14 @@ public class BlockWillowLeaves extends BlockLeavesBase @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = (isOpaqueCube() ? par1IconRegister.registerIcon("BiomesOPlenty:willowleaves4") : par1IconRegister.registerIcon("BiomesOPlenty:willowleaves3")); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:willowleaves3"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:willowleaves4"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return blockIcon[(!isOpaqueCube() ? 0 : 1)]; + } public int getBlockColor() { diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLog.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLog.java index 7a5dc99bc..25292ee89 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLog.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowLog.java @@ -9,6 +9,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -16,6 +17,7 @@ public class BlockWillowLog extends Block { /** The type of tree this log came from. */ public static final String[] woodType = new String[] {"willow"}; + private Icon[] blockIcon = new Icon[2]; public BlockWillowLog(int par1) { @@ -27,8 +29,21 @@ public class BlockWillowLog extends Block @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:willowlog"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:logTopBottum"); + this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:willowlog"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + if(par1 == 0 || par1 == 1) + { + return blockIcon[0]; + } + else + { + return blockIcon[1]; + } + } /** * The type of render function that is called for this block diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowSapling.java index eb2e0b2c2..fa2c17853 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockWillowSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenWillow; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockWillowSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"willow"}; + private Icon[] blockIcon = new Icon[1]; public BlockWillowSapling(int par1) { @@ -34,9 +36,14 @@ public class BlockWillowSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:willowsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:willowsapling"); } + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } + /** * Ticks the block if it's been scheduled */ diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockYellowSapling.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockYellowSapling.java index 6c71ada27..a8154400a 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockYellowSapling.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockYellowSapling.java @@ -18,10 +18,12 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import tdwp_ftw.biomesop.worldgen.WorldGenAutumn; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; public class BlockYellowSapling extends BlockSapling { public static final String[] WOOD_TYPES = new String[] {"yellow"}; + private Icon[] blockIcon = new Icon[1]; public BlockYellowSapling(int par1) { @@ -34,8 +36,13 @@ public class BlockYellowSapling extends BlockSapling @Override public void registerIcons(IconRegister par1IconRegister) { - this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:yellowsappling"); + this.blockIcon[0] = par1IconRegister.registerIcon("BiomesOPlenty:yellowsapling"); } + + public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + { + return this.blockIcon[0]; + } /** * Ticks the block if it's been scheduled diff --git a/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java b/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java index 0b404cd5a..31878b394 100644 --- a/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java +++ b/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java @@ -58,7 +58,7 @@ import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; -@Mod(modid="BiomesOPlenty", name="Biomes O' Plenty", version="0.4.7") +@Mod(modid="BiomesOPlenty", name="Biomes O' Plenty", version="0.4.8") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class mod_BiomesOPlenty { @@ -676,18 +676,18 @@ public class mod_BiomesOPlenty bootsAmethyst = (new ArmorAmethyst(bootsAmethystID, EnumArmorMaterialAmethyst, proxy.addArmor("amethyst"), 3)).setCreativeTab(tabBiomesOPlenty).setUnlocalizedName("bootsAmethyst"); // Achievement declaration - achFlower = (new Achievement(3047, "achFlower", 0, 0, Block.plantRed, (Achievement)null)).registerAchievement(); - achRedRock = (new Achievement(3048, "achRedRock", -1, 2, redRock, achFlower)).registerAchievement(); - achThorn = (new Achievement(3049, "achThorn", 2, 1, thorn, achFlower)).registerAchievement(); - achAsh = (new Achievement(3050, "achAsh", 1, 3, ashes, achFlower)).registerAchievement(); - achOrigin = (new Achievement(3051, "achOrigin", 0, 5, originGrass, achFlower)).setSpecial().registerAchievement(); - achPromised = (new Achievement(3052, "achPromised", 0, -5, holyGrass, achFlower)).setSpecial().registerAchievement(); - achMud = (new Achievement(3053, "achMud", -2, -1, mudBall, achFlower)).registerAchievement(); - achShroom = (new Achievement(3054, "achShroom", 1, -2, toadstool, achFlower)).registerAchievement(); - achBarley = (new Achievement(3055, "achBarley", -2, 4, barleyItem, achFlower)).registerAchievement(); - achMoss = (new Achievement(3056, "achMoss", -1, -3, mossItem, achFlower)).registerAchievement(); + achFlower2 = (new Achievement(3057, "achFlower2", 0, 0, Block.plantRed, (Achievement)null)).registerAchievement(); + achRedRock2 = (new Achievement(3058, "achRedRock2", -1, 2, redRock, achFlower2)).registerAchievement(); + achThorn2 = (new Achievement(3059, "achThorn2", 2, 1, thorn, achFlower2)).registerAchievement(); + achAsh2 = (new Achievement(3060, "achAsh2", 1, 3, ashes, achFlower2)).registerAchievement(); + achOrigin2 = (new Achievement(3061, "achOrigin2", 0, 5, originGrass, achFlower2)).setSpecial().registerAchievement(); + achPromised2 = (new Achievement(3062, "achPromised2", 0, -5, holyGrass, achFlower2)).setSpecial().registerAchievement(); + achMud2 = (new Achievement(3063, "achMud2", -2, -1, mudBall, achFlower2)).registerAchievement(); + achShroom2 = (new Achievement(3064, "achShroom2", 1, -2, toadstool, achFlower2)).registerAchievement(); + achBarley2 = (new Achievement(3065, "achBarley2", -2, 4, barleyItem, achFlower2)).registerAchievement(); + achMoss2 = (new Achievement(3066, "achMoss2", -1, -3, mossItem, achFlower2)).registerAchievement(); - pageBOP = new AchievementPage("Biomes O\' Plenty", achFlower, achRedRock, achThorn, achAsh, achOrigin, achPromised, achMud, achShroom, achBarley, achMoss); + pageBOP = new AchievementPage("Biomes O\' Plenty", achFlower2, achRedRock2, achThorn2, achAsh2, achOrigin2, achPromised2, achMud2, achShroom2, achBarley2, achMoss2); AchievementPage.registerAchievementPage(pageBOP); // Add block names @@ -1218,16 +1218,16 @@ public class mod_BiomesOPlenty GameRegistry.addSmelting(tinyCactus.blockID, new ItemStack(Item.dyePowder, 1, 2), 0.2F); // Add Achievement registration - addAchievementDesc("achFlower", "Flower Child", "Pick some flowers!"); - addAchievementDesc("achRedRock", "Red Rocky Mountain High", "Dig out some red rocks."); - addAchievementDesc("achThorn", "Rather Thorny...", "Don\'t get cut!"); - addAchievementDesc("achAsh", "Ash-ievement", "Get it? \'Cause it\'s ash."); - addAchievementDesc("achOrigin", "Alpha...", "Get some grass from the Origin Valley."); - addAchievementDesc("achPromised", "...Omega", "Welcome to the Promised Land!"); - addAchievementDesc("achMud", "Sticky Situation", "I just had these boots cleaned!"); - addAchievementDesc("achShroom", "Trippin\'", "Don\'t try this at home, kids!"); - addAchievementDesc("achBarley", "Fields Of Gold", "Upon the fields of barley."); - addAchievementDesc("achMoss", "Mossman", "Mothman's long-lost cousin."); + addAchievementDesc("achFlower2", "Flower Child", "Pick some flowers!"); + addAchievementDesc("achRedRock2", "Red Rocky Mountain High", "Dig out some red rocks."); + addAchievementDesc("achThorn2", "Rather Thorny...", "Don\'t get cut!"); + addAchievementDesc("achAsh2", "Ash-ievement", "Get it? \'Cause it\'s ash."); + addAchievementDesc("achOrigin2", "Alpha...", "Get some grass from the Origin Valley."); + addAchievementDesc("achPromised2", "...Omega", "Welcome to the Promised Land!"); + addAchievementDesc("achMud2", "Sticky Situation", "I just had these boots cleaned!"); + addAchievementDesc("achShroom2", "Trippin\'", "Don\'t try this at home, kids!"); + addAchievementDesc("achBarley2", "Fields Of Gold", "Upon the fields of barley."); + addAchievementDesc("achMoss2", "Mossman", "Mothman's long-lost cousin."); LanguageRegistry.instance().addStringLocalization("generator.BIOMESOP", "en_US", "Biomes O\' Plenty"); @@ -2140,16 +2140,16 @@ public class mod_BiomesOPlenty public static Item bootsAmethyst; // Achievement declaration - public static Achievement achFlower; - public static Achievement achRedRock; - public static Achievement achThorn; - public static Achievement achAsh; - public static Achievement achOrigin; - public static Achievement achPromised; - public static Achievement achMud; - public static Achievement achShroom; - public static Achievement achBarley; - public static Achievement achMoss; + public static Achievement achFlower2; + public static Achievement achRedRock2; + public static Achievement achThorn2; + public static Achievement achAsh2; + public static Achievement achOrigin2; + public static Achievement achPromised2; + public static Achievement achMud2; + public static Achievement achShroom2; + public static Achievement achBarley2; + public static Achievement achMoss2; // Biome declaration public static BiomeGenBase alps; @@ -2807,43 +2807,43 @@ public class mod_BiomesOPlenty { if (item.itemID == glowFlower.blockID || item.itemID == orangeFlower.blockID || item.itemID == blueFlower.blockID || item.itemID == purpleFlower.blockID || item.itemID == pinkFlower.blockID || item.itemID == whiteFlower.blockID || item.itemID == tinyFlower.blockID || item.itemID == deathbloom.blockID || item.itemID == hydrangea.blockID || item.itemID == violet.blockID || item.itemID == Block.plantRed.blockID || item.itemID == Block.plantYellow.blockID) { - player.addStat(achFlower, 1); + player.addStat(achFlower2, 1); } if (item.itemID == redRockCobble.blockID) { - player.addStat(achRedRock, 1); + player.addStat(achRedRock2, 1); } if (item.itemID == thorn.blockID) { - player.addStat(achThorn, 1); + player.addStat(achThorn2, 1); } if (item.itemID == ashes.itemID) { - player.addStat(achAsh, 1); + player.addStat(achAsh2, 1); } if (item.itemID == originGrass.blockID) { - player.addStat(achOrigin, 1); + player.addStat(achOrigin2, 1); } if (item.itemID == holyGrass.blockID || item.itemID == holyStone.blockID) { - player.addStat(achPromised, 1); + player.addStat(achPromised2, 1); } if (item.itemID == mudBall.itemID) { - player.addStat(achMud, 1); + player.addStat(achMud2, 1); } if (item.itemID == toadstool.blockID) { - player.addStat(achShroom, 1); + player.addStat(achShroom2, 1); } if (item.itemID == barleyItem.itemID) { - player.addStat(achBarley, 1); + player.addStat(achBarley2, 1); } if (item.itemID == mossItem.itemID) { - player.addStat(achMoss, 1); + player.addStat(achMoss2, 1); } }