From 5d568b5a83be2bc62d0ad9955e75a1255d821251 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Wed, 17 Apr 2013 09:34:18 +1000 Subject: [PATCH] Rough update to Forge 656, only thing that needs work is crashes due to block textures --- .../biomesoplenty/armor/ArmorAmethyst.java | 12 +- .../biomesoplenty/armor/ArmorMuddy.java | 12 +- .../blocks/BlockAcaciaLeaves.java | 3 +- .../blocks/BlockBOPColorizedLeaves.java | 2 +- .../blocks/BlockBOPColorizedSapling.java | 278 +++++++-------- .../biomesoplenty/blocks/BlockBOPFlower.java | 2 +- .../biomesoplenty/blocks/BlockBOPFoliage.java | 2 +- .../biomesoplenty/blocks/BlockBOPLeaves.java | 2 +- .../biomesoplenty/blocks/BlockBOPLog.java | 2 +- .../biomesoplenty/blocks/BlockBOPPetals.java | 198 +++++------ .../biomesoplenty/blocks/BlockBOPPlank.java | 2 +- .../biomesoplenty/blocks/BlockBOPPlant.java | 2 +- .../biomesoplenty/blocks/BlockBOPSapling.java | 332 +++++++++--------- .../biomesoplenty/blocks/BlockBOPSlab.java | 2 +- .../biomesoplenty/blocks/BlockBOPStairs.java | 2 +- .../biomesoplenty/blocks/BlockBOPVines.java | 12 +- .../biomesoplenty/blocks/BlockMoss.java | 2 +- .../blocks/renderers/FoliageRenderer.java | 88 ++--- .../blocks/renderers/PlantsRenderer.java | 88 ++--- .../helpers/TeleporterPromised.java | 18 +- .../biomesoplenty/items/ItemAncientStaff.java | 4 +- .../biomesoplenty/items/ItemBOP.java | 20 +- .../biomesoplenty/items/ItemBOPAxe.java | 8 +- .../items/ItemBOPColorizedSapling.java | 76 ++-- .../biomesoplenty/items/ItemBOPFlower.java | 2 +- .../biomesoplenty/items/ItemBOPFoliage.java | 2 +- .../biomesoplenty/items/ItemBOPHoe.java | 8 +- .../biomesoplenty/items/ItemBOPPetals.java | 54 +-- .../biomesoplenty/items/ItemBOPPickaxe.java | 8 +- .../biomesoplenty/items/ItemBOPPlant.java | 2 +- .../biomesoplenty/items/ItemBOPRecord.java | 4 +- .../biomesoplenty/items/ItemBOPRecordMud.java | 4 +- .../biomesoplenty/items/ItemBOPSapling.java | 76 ++-- .../biomesoplenty/items/ItemBOPSlab.java | 5 +- .../biomesoplenty/items/ItemBOPSpade.java | 8 +- .../biomesoplenty/items/ItemBOPSword.java | 8 +- .../biomesoplenty/items/ItemBamboo.java | 4 +- .../biomesoplenty/items/ItemBarley.java | 4 +- .../biomesoplenty/items/ItemBush.java | 4 +- .../biomesoplenty/items/ItemCattail.java | 4 +- .../biomesoplenty/items/ItemEnderporter.java | 4 +- .../biomesoplenty/items/ItemMediumGrass.java | 4 +- .../biomesoplenty/items/ItemShortGrass.java | 4 +- .../biomesoplenty/items/ItemShroomPowder.java | 4 +- .../biomesoplenty/items/ItemSprout.java | 4 +- .../worldgen/WorldGenBambooTree.java | 2 +- .../worldgen/WorldGenBambooTree2.java | 2 +- .../worldgen/WorldGenDeciduous.java | 2 +- .../biomesoplenty/worldgen/WorldGenHeath.java | 2 +- .../biomesoplenty/worldgen/WorldGenMoss.java | 2 +- .../worldgen/WorldGenRainforestTree1.java | 2 +- .../worldgen/WorldGenRedwoodTree.java | 2 +- .../worldgen/WorldGenRedwoodTree2.java | 2 +- 53 files changed, 702 insertions(+), 700 deletions(-) diff --git a/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java b/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java index 725a724e5..1c7371e86 100644 --- a/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java +++ b/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java @@ -28,12 +28,12 @@ public class ArmorAmethyst extends ItemArmor implements IArmorTextureProvider return null; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(textureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethysthelmet"); } - else if(textureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystchestplate"); } - else if(textureID==2){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystleggings"); } - else if(textureID==3){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystboots"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(textureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethysthelmet"); } + else if(textureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystchestplate"); } + else if(textureID==2){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystleggings"); } + else if(textureID==3){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystboots"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } } diff --git a/src/minecraft/biomesoplenty/armor/ArmorMuddy.java b/src/minecraft/biomesoplenty/armor/ArmorMuddy.java index 6b749eb08..12e00481e 100644 --- a/src/minecraft/biomesoplenty/armor/ArmorMuddy.java +++ b/src/minecraft/biomesoplenty/armor/ArmorMuddy.java @@ -28,12 +28,12 @@ public class ArmorMuddy extends ItemArmor implements IArmorTextureProvider return null; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(textureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudhelmet"); } - else if(textureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudchestplate"); } - else if(textureID==2){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudleggings"); } - else if(textureID==3){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudboots"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(textureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudhelmet"); } + else if(textureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudchestplate"); } + else if(textureID==2){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudleggings"); } + else if(textureID==3){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudboots"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } } diff --git a/src/minecraft/biomesoplenty/blocks/BlockAcaciaLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockAcaciaLeaves.java index 876e46655..ba1a8e35b 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockAcaciaLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockAcaciaLeaves.java @@ -48,8 +48,9 @@ public class BlockAcaciaLeaves extends BlockLeavesBase implements IShearable this.blockIcon[1] = par1IconRegister.registerIcon("BiomesOPlenty:acacialeaves2"); } + @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) + public Icon getIcon(int par1, int par2) { return blockIcon[(!isOpaqueCube() ? 0 : 1)]; } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java index b61eb3f39..5bbd938e0 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java @@ -91,7 +91,7 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { if (meta < 0 || meta >= textures[0].length) meta = 0; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java index 89332816c..4975cf68e 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java @@ -1,139 +1,139 @@ -package biomesoplenty.blocks; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockSapling; -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.World; -import net.minecraft.world.gen.feature.WorldGenerator; -import biomesoplenty.mod_BiomesOPlenty; -import biomesoplenty.worldgen.WorldGenAcacia; -import biomesoplenty.worldgen.WorldGenAutumn; -import biomesoplenty.worldgen.WorldGenAutumn2; -import biomesoplenty.worldgen.WorldGenBambooTree; -import biomesoplenty.worldgen.WorldGenBambooTree2; -import biomesoplenty.worldgen.WorldGenCherry1; -import biomesoplenty.worldgen.WorldGenCherry2; -import biomesoplenty.worldgen.WorldGenDeadTree2; -import biomesoplenty.worldgen.WorldGenMangrove; -import biomesoplenty.worldgen.WorldGenMaple; -import biomesoplenty.worldgen.WorldGenMystic2; -import biomesoplenty.worldgen.WorldGenOminous1; -import biomesoplenty.worldgen.WorldGenOminous2; -import biomesoplenty.worldgen.WorldGenOriginTree; -import biomesoplenty.worldgen.WorldGenPalmTree1; -import biomesoplenty.worldgen.WorldGenPalmTree3; -import biomesoplenty.worldgen.WorldGenPromisedTree; -import biomesoplenty.worldgen.WorldGenRedwoodTree2; -import biomesoplenty.worldgen.WorldGenTaiga9; -import biomesoplenty.worldgen.WorldGenWillow; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class BlockBOPColorizedSapling extends BlockSapling -{ - private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"}; - @SideOnly(Side.CLIENT) - private Icon[] textures; - private static final int TYPES = 15; - - public BlockBOPColorizedSapling(int par1) - { - super(par1); - setHardness(0.0F); - setStepSound(Block.soundGrassFootstep); - this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - textures = new Icon[saplings.length]; - - for (int i = 0; i < saplings.length; ++i) - textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling"); - - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) - { - if (meta < 0 || meta >= saplings.length) - meta = 0; - - return textures[meta]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { - for (int i = 0; i < saplings.length; ++i) - list.add(new ItemStack(blockID, 1, i)); - } - - @Override - public void growTree(World world, int x, int y, int z, Random random) - { - int meta = world.getBlockMetadata(x, y, z) & TYPES; - Object obj = null; - int rnd = random.nextInt(8); - - if (obj == null) - { - switch (meta) - { - case 0: // Acacia Tree - obj = new WorldGenAcacia(false); - break; - - case 1: // Mangrove Tree - obj = new WorldGenMangrove(false); - break; - - case 2: // Palm Tree - rnd = random.nextInt(4); - - if (rnd == 0) - obj = new WorldGenPalmTree1(); - else - obj = new WorldGenPalmTree3(); - break; - - case 3: // Redwood Tree - obj = new WorldGenRedwoodTree2(false); - break; - - case 4: // Willow Tree - obj = new WorldGenWillow(); - break; - } - } - - if (obj != null) - { - world.setBlockToAir(x, y, z); - - if (!((WorldGenerator)obj).generate(world, random, x, y, z)) - world.setBlock(x, y, z, this.blockID, meta, 2); - } - } - - @Override - public int damageDropped(int meta) - { - return meta & TYPES; - } - - @Override - public int getDamageValue(World world, int x, int y, int z) - { - return world.getBlockMetadata(x, y, z) & TYPES; - } -} +package biomesoplenty.blocks; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +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.World; +import net.minecraft.world.gen.feature.WorldGenerator; +import biomesoplenty.mod_BiomesOPlenty; +import biomesoplenty.worldgen.WorldGenAcacia; +import biomesoplenty.worldgen.WorldGenAutumn; +import biomesoplenty.worldgen.WorldGenAutumn2; +import biomesoplenty.worldgen.WorldGenBambooTree; +import biomesoplenty.worldgen.WorldGenBambooTree2; +import biomesoplenty.worldgen.WorldGenCherry1; +import biomesoplenty.worldgen.WorldGenCherry2; +import biomesoplenty.worldgen.WorldGenDeadTree2; +import biomesoplenty.worldgen.WorldGenMangrove; +import biomesoplenty.worldgen.WorldGenMaple; +import biomesoplenty.worldgen.WorldGenMystic2; +import biomesoplenty.worldgen.WorldGenOminous1; +import biomesoplenty.worldgen.WorldGenOminous2; +import biomesoplenty.worldgen.WorldGenOriginTree; +import biomesoplenty.worldgen.WorldGenPalmTree1; +import biomesoplenty.worldgen.WorldGenPalmTree3; +import biomesoplenty.worldgen.WorldGenPromisedTree; +import biomesoplenty.worldgen.WorldGenRedwoodTree2; +import biomesoplenty.worldgen.WorldGenTaiga9; +import biomesoplenty.worldgen.WorldGenWillow; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockBOPColorizedSapling extends BlockSapling +{ + private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"}; + @SideOnly(Side.CLIENT) + private Icon[] textures; + private static final int TYPES = 15; + + public BlockBOPColorizedSapling(int par1) + { + super(par1); + setHardness(0.0F); + setStepSound(Block.soundGrassFootstep); + this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[saplings.length]; + + for (int i = 0; i < saplings.length; ++i) + textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling"); + + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIcon(int side, int meta) + { + if (meta < 0 || meta >= saplings.length) + meta = 0; + + return textures[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { + for (int i = 0; i < saplings.length; ++i) + list.add(new ItemStack(blockID, 1, i)); + } + + @Override + public void growTree(World world, int x, int y, int z, Random random) + { + int meta = world.getBlockMetadata(x, y, z) & TYPES; + Object obj = null; + int rnd = random.nextInt(8); + + if (obj == null) + { + switch (meta) + { + case 0: // Acacia Tree + obj = new WorldGenAcacia(false); + break; + + case 1: // Mangrove Tree + obj = new WorldGenMangrove(false); + break; + + case 2: // Palm Tree + rnd = random.nextInt(4); + + if (rnd == 0) + obj = new WorldGenPalmTree1(); + else + obj = new WorldGenPalmTree3(); + break; + + case 3: // Redwood Tree + obj = new WorldGenRedwoodTree2(false); + break; + + case 4: // Willow Tree + obj = new WorldGenWillow(); + break; + } + } + + if (obj != null) + { + world.setBlockToAir(x, y, z); + + if (!((WorldGenerator)obj).generate(world, random, x, y, z)) + world.setBlock(x, y, z, this.blockID, meta, 2); + } + } + + @Override + public int damageDropped(int meta) + { + return meta & TYPES; + } + + @Override + public int getDamageValue(World world, int x, int y, int z) + { + return world.getBlockMetadata(x, y, z) & TYPES; + } +} diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java index b8e06ee52..2751b1396 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java @@ -51,7 +51,7 @@ public class BlockBOPFlower extends BlockFlower @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { if (meta < 0 || meta >= textures.length) meta = 0; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java index 62675e977..29f73ab2f 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java @@ -57,7 +57,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { if (meta >= textures.length) meta = 0; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java index 953798fd3..1f969e328 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java @@ -54,7 +54,7 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { if (meta < 0 || meta >= textures[0].length) meta = 0; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java b/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java index d1afba096..77c9b0f2c 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java @@ -55,7 +55,7 @@ public class BlockBOPLog extends Block @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { int pos = meta & 12; if (pos == 0 && (side == 1 || side == 0) || pos == 4 && (side == 5 || side == 4) || pos == 8 && (side == 2 || side == 3)) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java index e287bcf35..e1f4fafab 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java @@ -1,99 +1,99 @@ -package biomesoplenty.blocks; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import biomesoplenty.mod_BiomesOPlenty; -import biomesoplenty.api.Blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.BlockLeavesBase; -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.World; -import net.minecraftforge.common.IShearable; - -public class BlockBOPPetals extends BlockLeavesBase implements IShearable -{ - private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"}; - @SideOnly(Side.CLIENT) - private Icon[] textures; - - public BlockBOPPetals(int blockID) - { - super(blockID, Material.leaves, false); - setBurnProperties(this.blockID, 30, 60); - this.setTickRandomly(true); - setHardness(0.2F); - setLightOpacity(1); - setStepSound(Block.soundGrassFootstep); - this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - textures = new Icon[petals.length]; - - for (int i = 0; i < petals.length; ++i) - textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + petals[i]); - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) - { - if (meta < 0 || meta >= textures.length) - meta = 0; - - return textures[meta]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { - for (int i = 0; i < textures.length; ++i) - list.add(new ItemStack(blockID, 1, i)); - } - - @Override - public int idDropped(int par1, Random par2Random, int par3) - { - if (par1 == 0) - return Block.plantRed.blockID; - else - return Block.plantYellow.blockID; - } - - @Override - public int damageDropped(int meta) - { - return meta & 15; - } - - @Override - public int quantityDropped(Random random) - { - return random.nextInt(20) == 0 ? 1 : 0; - } - - @Override - public boolean isShearable(ItemStack item, World world, int x, int y, int z) - { - return true; - } - - @Override - public ArrayList onSheared(ItemStack item, World world, int x, int y, int z, int fortune) - { - ArrayList ret = new ArrayList(); - ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 15)); - return ret; - } -} +package biomesoplenty.blocks; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import biomesoplenty.mod_BiomesOPlenty; +import biomesoplenty.api.Blocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLeavesBase; +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.World; +import net.minecraftforge.common.IShearable; + +public class BlockBOPPetals extends BlockLeavesBase implements IShearable +{ + private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"}; + @SideOnly(Side.CLIENT) + private Icon[] textures; + + public BlockBOPPetals(int blockID) + { + super(blockID, Material.leaves, false); + setBurnProperties(this.blockID, 30, 60); + this.setTickRandomly(true); + setHardness(0.2F); + setLightOpacity(1); + setStepSound(Block.soundGrassFootstep); + this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[petals.length]; + + for (int i = 0; i < petals.length; ++i) + textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + petals[i]); + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIcon(int side, int meta) + { + if (meta < 0 || meta >= textures.length) + meta = 0; + + return textures[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { + for (int i = 0; i < textures.length; ++i) + list.add(new ItemStack(blockID, 1, i)); + } + + @Override + public int idDropped(int par1, Random par2Random, int par3) + { + if (par1 == 0) + return Block.plantRed.blockID; + else + return Block.plantYellow.blockID; + } + + @Override + public int damageDropped(int meta) + { + return meta & 15; + } + + @Override + public int quantityDropped(Random random) + { + return random.nextInt(20) == 0 ? 1 : 0; + } + + @Override + public boolean isShearable(ItemStack item, World world, int x, int y, int z) + { + return true; + } + + @Override + public ArrayList onSheared(ItemStack item, World world, int x, int y, int z, int fortune) + { + ArrayList ret = new ArrayList(); + ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 15)); + return ret; + } +} diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java index a02825eff..096a3c25b 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java @@ -39,7 +39,7 @@ public class BlockBOPPlank extends Block @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { if (meta < 0 || meta >= textures.length) meta = 0; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java index 460ffd5bc..e25dd57d1 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java @@ -53,7 +53,7 @@ public class BlockBOPPlant extends BlockFlower implements IShearable @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { if (meta < 0 || meta >= textures.length) meta = 0; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java index 600fc57f4..5ff24c647 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java @@ -1,166 +1,166 @@ -package biomesoplenty.blocks; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockSapling; -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.World; -import net.minecraft.world.gen.feature.WorldGenerator; -import biomesoplenty.mod_BiomesOPlenty; -import biomesoplenty.worldgen.WorldGenAutumn; -import biomesoplenty.worldgen.WorldGenAutumn2; -import biomesoplenty.worldgen.WorldGenBambooTree; -import biomesoplenty.worldgen.WorldGenBambooTree2; -import biomesoplenty.worldgen.WorldGenCherry1; -import biomesoplenty.worldgen.WorldGenCherry2; -import biomesoplenty.worldgen.WorldGenDeadTree2; -import biomesoplenty.worldgen.WorldGenMaple; -import biomesoplenty.worldgen.WorldGenMystic2; -import biomesoplenty.worldgen.WorldGenOminous1; -import biomesoplenty.worldgen.WorldGenOminous2; -import biomesoplenty.worldgen.WorldGenOriginTree; -import biomesoplenty.worldgen.WorldGenPromisedTree; -import biomesoplenty.worldgen.WorldGenTaiga9; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class BlockBOPSapling extends BlockSapling -{ - private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"}; - @SideOnly(Side.CLIENT) - private Icon[] textures; - private static final int TYPES = 15; - - public BlockBOPSapling(int par1) - { - super(par1); - setHardness(0.0F); - setStepSound(Block.soundGrassFootstep); - this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - textures = new Icon[saplings.length]; - - for (int i = 0; i < saplings.length; ++i) - textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling"); - - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) - { - if (meta < 0 || meta >= saplings.length) - meta = 0; - - return textures[meta]; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { - for (int i = 0; i < saplings.length; ++i) - list.add(new ItemStack(blockID, 1, i)); - } - - @Override - public void growTree(World world, int x, int y, int z, Random random) - { - int meta = world.getBlockMetadata(x, y, z) & TYPES; - Object obj = null; - int rnd = random.nextInt(8); - - if (obj == null) - { - switch (meta) - { - case 0: // Autumn Tree - obj = new WorldGenAutumn(false); - break; - - case 1: // Bamboo Tree - rnd = random.nextInt(8); - - if (rnd == 0) - obj = new WorldGenBambooTree(false); - else - obj = new WorldGenBambooTree2(false); - break; - - case 2: // Magic Tree - obj = new WorldGenMystic2(false); - break; - - case 3: // Dark Tree - rnd = random.nextInt(8); - - if (rnd == 0) - obj = new WorldGenOminous2(); - else - obj = new WorldGenOminous1(false); - break; - - case 4: // Dead Tree - obj = new WorldGenDeadTree2(false); - break; - - case 5: // Fir Tree - obj = new WorldGenTaiga9(false); - break; - - case 6: // Holy Tree - obj = new WorldGenPromisedTree(false); - break; - - case 7: // Autumn Tree - obj = new WorldGenAutumn2(false); - break; - - case 8: // Origin Tree - obj = new WorldGenOriginTree(false); - break; - - case 9: // Pink Cherry Tree - obj = new WorldGenCherry1(false); - break; - - case 10: // Maple Tree - obj = new WorldGenMaple(false); - break; - - case 11: // White Cherry Tree - obj = new WorldGenCherry2(false); - break; - } - } - - if (obj != null) - { - world.setBlockToAir(x, y, z); - - if (!((WorldGenerator)obj).generate(world, random, x, y, z)) - world.setBlock(x, y, z, this.blockID, meta, 2); - } - } - - @Override - public int damageDropped(int meta) - { - return meta & TYPES; - } - - @Override - public int getDamageValue(World world, int x, int y, int z) - { - return world.getBlockMetadata(x, y, z) & TYPES; - } -} +package biomesoplenty.blocks; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +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.World; +import net.minecraft.world.gen.feature.WorldGenerator; +import biomesoplenty.mod_BiomesOPlenty; +import biomesoplenty.worldgen.WorldGenAutumn; +import biomesoplenty.worldgen.WorldGenAutumn2; +import biomesoplenty.worldgen.WorldGenBambooTree; +import biomesoplenty.worldgen.WorldGenBambooTree2; +import biomesoplenty.worldgen.WorldGenCherry1; +import biomesoplenty.worldgen.WorldGenCherry2; +import biomesoplenty.worldgen.WorldGenDeadTree2; +import biomesoplenty.worldgen.WorldGenMaple; +import biomesoplenty.worldgen.WorldGenMystic2; +import biomesoplenty.worldgen.WorldGenOminous1; +import biomesoplenty.worldgen.WorldGenOminous2; +import biomesoplenty.worldgen.WorldGenOriginTree; +import biomesoplenty.worldgen.WorldGenPromisedTree; +import biomesoplenty.worldgen.WorldGenTaiga9; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockBOPSapling extends BlockSapling +{ + private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"}; + @SideOnly(Side.CLIENT) + private Icon[] textures; + private static final int TYPES = 15; + + public BlockBOPSapling(int par1) + { + super(par1); + setHardness(0.0F); + setStepSound(Block.soundGrassFootstep); + this.setCreativeTab(mod_BiomesOPlenty.tabBiomesOPlenty); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[saplings.length]; + + for (int i = 0; i < saplings.length; ++i) + textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling"); + + } + + @Override + @SideOnly(Side.CLIENT) + public Icon getIcon(int side, int meta) + { + if (meta < 0 || meta >= saplings.length) + meta = 0; + + return textures[meta]; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { + for (int i = 0; i < saplings.length; ++i) + list.add(new ItemStack(blockID, 1, i)); + } + + @Override + public void growTree(World world, int x, int y, int z, Random random) + { + int meta = world.getBlockMetadata(x, y, z) & TYPES; + Object obj = null; + int rnd = random.nextInt(8); + + if (obj == null) + { + switch (meta) + { + case 0: // Autumn Tree + obj = new WorldGenAutumn(false); + break; + + case 1: // Bamboo Tree + rnd = random.nextInt(8); + + if (rnd == 0) + obj = new WorldGenBambooTree(false); + else + obj = new WorldGenBambooTree2(false); + break; + + case 2: // Magic Tree + obj = new WorldGenMystic2(false); + break; + + case 3: // Dark Tree + rnd = random.nextInt(8); + + if (rnd == 0) + obj = new WorldGenOminous2(); + else + obj = new WorldGenOminous1(false); + break; + + case 4: // Dead Tree + obj = new WorldGenDeadTree2(false); + break; + + case 5: // Fir Tree + obj = new WorldGenTaiga9(false); + break; + + case 6: // Holy Tree + obj = new WorldGenPromisedTree(false); + break; + + case 7: // Autumn Tree + obj = new WorldGenAutumn2(false); + break; + + case 8: // Origin Tree + obj = new WorldGenOriginTree(false); + break; + + case 9: // Pink Cherry Tree + obj = new WorldGenCherry1(false); + break; + + case 10: // Maple Tree + obj = new WorldGenMaple(false); + break; + + case 11: // White Cherry Tree + obj = new WorldGenCherry2(false); + break; + } + } + + if (obj != null) + { + world.setBlockToAir(x, y, z); + + if (!((WorldGenerator)obj).generate(world, random, x, y, z)) + world.setBlock(x, y, z, this.blockID, meta, 2); + } + } + + @Override + public int damageDropped(int meta) + { + return meta & TYPES; + } + + @Override + public int getDamageValue(World world, int x, int y, int z) + { + return world.getBlockMetadata(x, y, z) & TYPES; + } +} diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java b/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java index 4a19a9771..ae7e6d984 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java @@ -69,7 +69,7 @@ public class BlockBOPSlab extends BlockHalfSlab @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { if (category == SlabCategory.STONE) return textures[getTypeFromMeta(meta)]; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPStairs.java b/src/minecraft/biomesoplenty/blocks/BlockBOPStairs.java index 36217808f..0a6188e0e 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPStairs.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPStairs.java @@ -42,7 +42,7 @@ public class BlockBOPStairs extends BlockStairs @Override @SideOnly(Side.CLIENT) - public Icon getBlockTextureFromSideAndMetadata(int side, int meta) + public Icon getIcon(int side, int meta) { return textures[category.ordinal()]; } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPVines.java b/src/minecraft/biomesoplenty/blocks/BlockBOPVines.java index 70d866422..be0306e97 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPVines.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPVines.java @@ -1,6 +1,6 @@ -package biomesoplenty.blocks; - -public class BlockBOPVines -{ - -} +package biomesoplenty.blocks; + +public class BlockBOPVines +{ + +} diff --git a/src/minecraft/biomesoplenty/blocks/BlockMoss.java b/src/minecraft/biomesoplenty/blocks/BlockMoss.java index 0643b148c..bc75be7da 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockMoss.java +++ b/src/minecraft/biomesoplenty/blocks/BlockMoss.java @@ -292,7 +292,7 @@ public class BlockMoss extends Block var9 = par1World.getBlockMetadata(par2, par3, par4); var10 = par1World.rand.nextInt(6); - var11 = Direction.vineGrowth[var10]; + var11 = Direction.facingToDirection[var10]; int var12; int var13; diff --git a/src/minecraft/biomesoplenty/blocks/renderers/FoliageRenderer.java b/src/minecraft/biomesoplenty/blocks/renderers/FoliageRenderer.java index 6fe9b2158..76cbdc9a4 100644 --- a/src/minecraft/biomesoplenty/blocks/renderers/FoliageRenderer.java +++ b/src/minecraft/biomesoplenty/blocks/renderers/FoliageRenderer.java @@ -1,44 +1,44 @@ -package biomesoplenty.blocks.renderers; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.world.IBlockAccess; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; - -public class FoliageRenderer implements ISimpleBlockRenderingHandler -{ - public static int render = RenderingRegistry.getNextAvailableRenderId(); - - @Override - public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) - { - // Doesn't render in inventory - } - - @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) - { - if (modelId == render) - { - int meta = world.getBlockMetadata(x, y, z); - if (meta == 0) - return renderer.renderBlockLilyPad(block, x, y, z); - else - return renderer.renderCrossedSquares(block, x, y, z); - } - return true; - } - - @Override - public boolean shouldRender3DInInventory() - { - return false; - } - - @Override - public int getRenderId() - { - return render; - } -} +package biomesoplenty.blocks.renderers; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; + +public class FoliageRenderer implements ISimpleBlockRenderingHandler +{ + public static int render = RenderingRegistry.getNextAvailableRenderId(); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) + { + // Doesn't render in inventory + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) + { + if (modelId == render) + { + int meta = world.getBlockMetadata(x, y, z); + if (meta == 0) + return renderer.renderBlockLilyPad(block, x, y, z); + else + return renderer.renderCrossedSquares(block, x, y, z); + } + return true; + } + + @Override + public boolean shouldRender3DInInventory() + { + return false; + } + + @Override + public int getRenderId() + { + return render; + } +} diff --git a/src/minecraft/biomesoplenty/blocks/renderers/PlantsRenderer.java b/src/minecraft/biomesoplenty/blocks/renderers/PlantsRenderer.java index d8f0f0c12..3f97cac89 100644 --- a/src/minecraft/biomesoplenty/blocks/renderers/PlantsRenderer.java +++ b/src/minecraft/biomesoplenty/blocks/renderers/PlantsRenderer.java @@ -1,44 +1,44 @@ -package biomesoplenty.blocks.renderers; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.world.IBlockAccess; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; - -public class PlantsRenderer implements ISimpleBlockRenderingHandler -{ - public static int render = RenderingRegistry.getNextAvailableRenderId(); - - @Override - public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) - { - // Doesn't render in inventory - } - - @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) - { - if (modelId == render) - { - int meta = world.getBlockMetadata(x, y, z); - if (meta > 5) - return renderer.renderBlockCrops(block, x, y, z); - else - return renderer.renderCrossedSquares(block, x, y, z); - } - return true; - } - - @Override - public boolean shouldRender3DInInventory() - { - return false; - } - - @Override - public int getRenderId() - { - return render; - } -} +package biomesoplenty.blocks.renderers; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; + +public class PlantsRenderer implements ISimpleBlockRenderingHandler +{ + public static int render = RenderingRegistry.getNextAvailableRenderId(); + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) + { + // Doesn't render in inventory + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) + { + if (modelId == render) + { + int meta = world.getBlockMetadata(x, y, z); + if (meta > 5) + return renderer.renderBlockCrops(block, x, y, z); + else + return renderer.renderCrossedSquares(block, x, y, z); + } + return true; + } + + @Override + public boolean shouldRender3DInInventory() + { + return false; + } + + @Override + public int getRenderId() + { + return render; + } +} diff --git a/src/minecraft/biomesoplenty/helpers/TeleporterPromised.java b/src/minecraft/biomesoplenty/helpers/TeleporterPromised.java index 285cbeb94..65c3a3855 100644 --- a/src/minecraft/biomesoplenty/helpers/TeleporterPromised.java +++ b/src/minecraft/biomesoplenty/helpers/TeleporterPromised.java @@ -193,7 +193,7 @@ public class TeleporterPromised extends Teleporter var12 = 1; var13 = 31; var14 = 0; - var20.field_85087_d = this.worldServerInstance.getTotalWorldTime(); + var20.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); var19 = false; } else @@ -264,11 +264,11 @@ public class TeleporterPromised extends Teleporter var50 = 1; } - int var30 = par1Entity.func_82148_at(); + int var30 = par1Entity.getTeleportDirection(); if (var50 > -1) { - int var31 = Direction.field_71578_g[var50]; + int var31 = Direction.rotateLeft[var50]; int var32 = Direction.offsetX[var50]; int var33 = Direction.offsetZ[var50]; int var34 = Direction.offsetX[var31]; @@ -278,8 +278,8 @@ public class TeleporterPromised extends Teleporter if (var36 && var37) { - var50 = Direction.footInvisibleFaceRemap[var50]; - var31 = Direction.footInvisibleFaceRemap[var31]; + var50 = Direction.rotateOpposite[var50]; + var31 = Direction.rotateOpposite[var31]; var32 = Direction.offsetX[var50]; var33 = Direction.offsetZ[var50]; var34 = Direction.offsetX[var31]; @@ -320,12 +320,12 @@ public class TeleporterPromised extends Teleporter var40 = 1.0F; var41 = 1.0F; } - else if (var50 == Direction.footInvisibleFaceRemap[var30]) + else if (var50 == Direction.rotateOpposite[var30]) { var40 = -1.0F; var41 = -1.0F; } - else if (var50 == Direction.enderEyeMetaToDirection[var30]) + else if (var50 == Direction.rotateRight[var30]) { var42 = 1.0F; var43 = -1.0F; @@ -783,7 +783,7 @@ public class TeleporterPromised extends Teleporter @SuppressWarnings("rawtypes") @Override - public void func_85189_a(long par1) + public void removeStalePortalLocations(long par1) { if (par1 % 100L == 0L) { @@ -795,7 +795,7 @@ public class TeleporterPromised extends Teleporter Long var6 = (Long) var3.next(); PortalPosition var7 = (PortalPosition) this.field_85191_c.getValueByKey(var6.longValue()); - if (var7 == null || var7.field_85087_d < var4) + if (var7 == null || var7.lastUpdateTime < var4) { var3.remove(); this.field_85191_c.remove(var6.longValue()); diff --git a/src/minecraft/biomesoplenty/items/ItemAncientStaff.java b/src/minecraft/biomesoplenty/items/ItemAncientStaff.java index df5aecbc7..8c0955e6a 100644 --- a/src/minecraft/biomesoplenty/items/ItemAncientStaff.java +++ b/src/minecraft/biomesoplenty/items/ItemAncientStaff.java @@ -22,9 +22,9 @@ public class ItemAncientStaff extends Item return true; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:ancientstaff"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:ancientstaff"); } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) diff --git a/src/minecraft/biomesoplenty/items/ItemBOP.java b/src/minecraft/biomesoplenty/items/ItemBOP.java index 47c5814a4..f79e5bf13 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOP.java +++ b/src/minecraft/biomesoplenty/items/ItemBOP.java @@ -19,17 +19,17 @@ public class ItemBOP extends Item boptextureid = texture; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(boptextureid==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } - else if(boptextureid==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudbrick"); } - else if(boptextureid==2){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:moss"); } - else if(boptextureid==3){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:ash"); } - else if(boptextureid==4){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethyst"); } - else if(boptextureid==5){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:staffhandle"); } - else if(boptextureid==6){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:staffpole"); } - else if(boptextureid==7){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:stafftopper"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(boptextureid==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + else if(boptextureid==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudbrick"); } + else if(boptextureid==2){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:moss"); } + else if(boptextureid==3){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:ash"); } + else if(boptextureid==4){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethyst"); } + else if(boptextureid==5){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:staffhandle"); } + else if(boptextureid==6){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:staffpole"); } + else if(boptextureid==7){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:stafftopper"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) diff --git a/src/minecraft/biomesoplenty/items/ItemBOPAxe.java b/src/minecraft/biomesoplenty/items/ItemBOPAxe.java index dcaf4ba7e..5dd810769 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPAxe.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPAxe.java @@ -14,10 +14,10 @@ public class ItemBOPAxe extends ItemAxe TextureID = texture; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudaxe"); } - else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystaxe"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudaxe"); } + else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystaxe"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPColorizedSapling.java b/src/minecraft/biomesoplenty/items/ItemBOPColorizedSapling.java index 0581bf104..9d5deb1e0 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPColorizedSapling.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPColorizedSapling.java @@ -1,38 +1,38 @@ -package biomesoplenty.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; - -public class ItemBOPColorizedSapling extends ItemBlock -{ - private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"}; - - public ItemBOPColorizedSapling(int par1) - { - super(par1); - setMaxDamage(0); - setHasSubtypes(true); - } - - @Override - public int getMetadata(int meta) - { - return meta & 15; - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString(); - } - - - - @Override - public Icon getIconFromDamage(int meta) - { - return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta); - } -} +package biomesoplenty.items; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBOPColorizedSapling extends ItemBlock +{ + private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"}; + + public ItemBOPColorizedSapling(int par1) + { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + @Override + public int getMetadata(int meta) + { + return meta & 15; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) + { + return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString(); + } + + + + @Override + public Icon getIconFromDamage(int meta) + { + return Block.blocksList[this.itemID].getIcon(0, meta); + } +} diff --git a/src/minecraft/biomesoplenty/items/ItemBOPFlower.java b/src/minecraft/biomesoplenty/items/ItemBOPFlower.java index d46061c72..d492c488d 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPFlower.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPFlower.java @@ -31,6 +31,6 @@ public class ItemBOPFlower extends ItemBlock @Override public Icon getIconFromDamage(int meta) { - return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta); + return Block.blocksList[this.itemID].getIcon(0, meta); } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java b/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java index ca27b1a4e..8a99f563a 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPFoliage.java @@ -24,7 +24,7 @@ public class ItemBOPFoliage extends ItemBlock } @SideOnly(Side.CLIENT) - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { textures = new Icon[foliageTypes.length - 1]; diff --git a/src/minecraft/biomesoplenty/items/ItemBOPHoe.java b/src/minecraft/biomesoplenty/items/ItemBOPHoe.java index fd5691847..a7077d3a8 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPHoe.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPHoe.java @@ -14,10 +14,10 @@ public class ItemBOPHoe extends ItemHoe TextureID = texture; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudhoe"); } - else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethysthoe"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudhoe"); } + else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethysthoe"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPPetals.java b/src/minecraft/biomesoplenty/items/ItemBOPPetals.java index bd172f3b2..ad032cbb7 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPPetals.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPPetals.java @@ -1,28 +1,28 @@ -package biomesoplenty.items; - -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemBOPPetals extends ItemBlock -{ - private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"}; - - public ItemBOPPetals(int par1) - { - super(par1); - setMaxDamage(0); - setHasSubtypes(true); - } - - @Override - public int getMetadata(int meta) - { - return meta & 15; - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - return (new StringBuilder()).append(petals[itemStack.getItemDamage()]).toString(); - } +package biomesoplenty.items; + +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +public class ItemBOPPetals extends ItemBlock +{ + private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"}; + + public ItemBOPPetals(int par1) + { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + @Override + public int getMetadata(int meta) + { + return meta & 15; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) + { + return (new StringBuilder()).append(petals[itemStack.getItemDamage()]).toString(); + } } \ No newline at end of file diff --git a/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java b/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java index 7aa86df73..835a2701e 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java @@ -14,10 +14,10 @@ public class ItemBOPPickaxe extends ItemPickaxe TextureID = texture; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudpickaxe"); } - else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystpickaxe"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudpickaxe"); } + else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystpickaxe"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPPlant.java b/src/minecraft/biomesoplenty/items/ItemBOPPlant.java index b0324bf26..48a0c08b2 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPPlant.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPPlant.java @@ -31,6 +31,6 @@ public class ItemBOPPlant extends ItemBlock @Override public Icon getIconFromDamage(int meta) { - return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta); + return Block.blocksList[this.itemID].getIcon(0, meta); } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPRecord.java b/src/minecraft/biomesoplenty/items/ItemBOPRecord.java index f4c42236c..8d6718c80 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPRecord.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPRecord.java @@ -36,9 +36,9 @@ public class ItemBOPRecord extends ItemRecord records.put(par2Str, this); } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:boprecord"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:boprecord"); } /** diff --git a/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java b/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java index 710f32173..d4f27566d 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java @@ -36,9 +36,9 @@ public class ItemBOPRecordMud extends ItemRecord records.put(par2Str, this); } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudrecord"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudrecord"); } /** diff --git a/src/minecraft/biomesoplenty/items/ItemBOPSapling.java b/src/minecraft/biomesoplenty/items/ItemBOPSapling.java index ab5a4f864..a696d6ce9 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPSapling.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPSapling.java @@ -1,38 +1,38 @@ -package biomesoplenty.items; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; - -public class ItemBOPSapling extends ItemBlock -{ -private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"}; - - public ItemBOPSapling(int par1) - { - super(par1); - setMaxDamage(0); - setHasSubtypes(true); - } - - @Override - public int getMetadata(int meta) - { - return meta & 15; - } - - @Override - public String getUnlocalizedName(ItemStack itemStack) - { - return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString(); - } - - - - @Override - public Icon getIconFromDamage(int meta) - { - return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(0, meta); - } -} +package biomesoplenty.items; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemBOPSapling extends ItemBlock +{ +private static final String[] saplings = new String[] {"yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"}; + + public ItemBOPSapling(int par1) + { + super(par1); + setMaxDamage(0); + setHasSubtypes(true); + } + + @Override + public int getMetadata(int meta) + { + return meta & 15; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) + { + return (new StringBuilder()).append(saplings[itemStack.getItemDamage()]).append("Sapling").toString(); + } + + + + @Override + public Icon getIconFromDamage(int meta) + { + return Block.blocksList[this.itemID].getIcon(0, meta); + } +} diff --git a/src/minecraft/biomesoplenty/items/ItemBOPSlab.java b/src/minecraft/biomesoplenty/items/ItemBOPSlab.java index 7abf0b953..f937f862f 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPSlab.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPSlab.java @@ -32,7 +32,8 @@ public class ItemBOPSlab extends ItemSlab @Override public String getUnlocalizedName(ItemStack itemStack) { - BlockBOPSlab slab = (BlockBOPSlab)Block.blocksList[itemStack.itemID]; - return (new StringBuilder()).append(slab.getFullSlabName(itemStack.getItemDamage())).toString(); + // BlockBOPSlab slab = (BlockBOPSlab)Block.blocksList[itemStack.itemID]; + // return (new StringBuilder()).append(slab.getFullSlabName(itemStack.getItemDamage())).toString(); + return itemStack.getItem().getUnlocalizedName(); } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPSpade.java b/src/minecraft/biomesoplenty/items/ItemBOPSpade.java index eb5bedd98..a614e5f14 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPSpade.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPSpade.java @@ -14,10 +14,10 @@ public class ItemBOPSpade extends ItemSpade TextureID = texture; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudshovel"); } - else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystshovel"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudshovel"); } + else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystshovel"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPSword.java b/src/minecraft/biomesoplenty/items/ItemBOPSword.java index d84dbbaad..f8a4d22fa 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPSword.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPSword.java @@ -14,10 +14,10 @@ public class ItemBOPSword extends ItemSword TextureID = texture; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - if(TextureID==0){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudsword"); } - else if(TextureID==1){ iconIndex = iconRegister.registerIcon("BiomesOPlenty:amethystsword"); } - else { iconIndex = iconRegister.registerIcon("BiomesOPlenty:mudball"); } + if(TextureID==0){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudsword"); } + else if(TextureID==1){ itemIcon = iconRegister.registerIcon("BiomesOPlenty:amethystsword"); } + else { itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball"); } } } diff --git a/src/minecraft/biomesoplenty/items/ItemBamboo.java b/src/minecraft/biomesoplenty/items/ItemBamboo.java index bd58b34de..4cf372563 100644 --- a/src/minecraft/biomesoplenty/items/ItemBamboo.java +++ b/src/minecraft/biomesoplenty/items/ItemBamboo.java @@ -18,9 +18,9 @@ public class ItemBamboo extends Item this.spawnID = par2Block.blockID; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:bamboo"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:bamboo"); } public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) diff --git a/src/minecraft/biomesoplenty/items/ItemBarley.java b/src/minecraft/biomesoplenty/items/ItemBarley.java index 220ba617c..9705bb36c 100644 --- a/src/minecraft/biomesoplenty/items/ItemBarley.java +++ b/src/minecraft/biomesoplenty/items/ItemBarley.java @@ -18,9 +18,9 @@ public class ItemBarley extends Item this.spawnID = par2Block.blockID; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:barley"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:barley"); } public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) diff --git a/src/minecraft/biomesoplenty/items/ItemBush.java b/src/minecraft/biomesoplenty/items/ItemBush.java index 37bc58c97..fceb6a7b0 100644 --- a/src/minecraft/biomesoplenty/items/ItemBush.java +++ b/src/minecraft/biomesoplenty/items/ItemBush.java @@ -19,9 +19,9 @@ public class ItemBush extends Item this.spawnID = par2Block.blockID; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:bush"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:bush"); } /** diff --git a/src/minecraft/biomesoplenty/items/ItemCattail.java b/src/minecraft/biomesoplenty/items/ItemCattail.java index 0f4f62f39..09bca0a84 100644 --- a/src/minecraft/biomesoplenty/items/ItemCattail.java +++ b/src/minecraft/biomesoplenty/items/ItemCattail.java @@ -19,9 +19,9 @@ public class ItemCattail extends Item this.spawnID = par2Block.blockID; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:cattail"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:cattail"); } /** diff --git a/src/minecraft/biomesoplenty/items/ItemEnderporter.java b/src/minecraft/biomesoplenty/items/ItemEnderporter.java index 1498b7bc3..53f9cfd3d 100644 --- a/src/minecraft/biomesoplenty/items/ItemEnderporter.java +++ b/src/minecraft/biomesoplenty/items/ItemEnderporter.java @@ -18,9 +18,9 @@ public class ItemEnderporter extends Item this.setMaxDamage(9); } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:enderporter"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:enderporter"); } public boolean hasEffect(ItemStack par1ItemStack) diff --git a/src/minecraft/biomesoplenty/items/ItemMediumGrass.java b/src/minecraft/biomesoplenty/items/ItemMediumGrass.java index 4d3094b41..f2c9cad4a 100644 --- a/src/minecraft/biomesoplenty/items/ItemMediumGrass.java +++ b/src/minecraft/biomesoplenty/items/ItemMediumGrass.java @@ -19,9 +19,9 @@ public class ItemMediumGrass extends Item this.spawnID = par2Block.blockID; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:mediumgrass"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:mediumgrass"); } /** diff --git a/src/minecraft/biomesoplenty/items/ItemShortGrass.java b/src/minecraft/biomesoplenty/items/ItemShortGrass.java index 7affc7988..7d8228263 100644 --- a/src/minecraft/biomesoplenty/items/ItemShortGrass.java +++ b/src/minecraft/biomesoplenty/items/ItemShortGrass.java @@ -19,9 +19,9 @@ public class ItemShortGrass extends Item this.spawnID = par2Block.blockID; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:shortgrass"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:shortgrass"); } /** diff --git a/src/minecraft/biomesoplenty/items/ItemShroomPowder.java b/src/minecraft/biomesoplenty/items/ItemShroomPowder.java index 36d27caac..d9336b898 100644 --- a/src/minecraft/biomesoplenty/items/ItemShroomPowder.java +++ b/src/minecraft/biomesoplenty/items/ItemShroomPowder.java @@ -10,8 +10,8 @@ public class ItemShroomPowder extends ItemFood super(par1, par2, par3, par4); } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:shroompowder"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:shroompowder"); } } diff --git a/src/minecraft/biomesoplenty/items/ItemSprout.java b/src/minecraft/biomesoplenty/items/ItemSprout.java index a1e5a8096..f58264f93 100644 --- a/src/minecraft/biomesoplenty/items/ItemSprout.java +++ b/src/minecraft/biomesoplenty/items/ItemSprout.java @@ -19,9 +19,9 @@ public class ItemSprout extends Item this.spawnID = par2Block.blockID; } - public void updateIcons(IconRegister iconRegister) + public void registerIcons(IconRegister iconRegister) { - iconIndex = iconRegister.registerIcon("BiomesOPlenty:sprout"); + itemIcon = iconRegister.registerIcon("BiomesOPlenty:sprout"); } /** diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree.java b/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree.java index 0b10001f9..91ab8686e 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree.java @@ -233,7 +233,7 @@ public class WorldGenBambooTree extends WorldGenerator if (par2Random.nextInt(4 - var11) == 0) { var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); + this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); } } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree2.java b/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree2.java index e1d978b07..cd3047990 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree2.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenBambooTree2.java @@ -233,7 +233,7 @@ public class WorldGenBambooTree2 extends WorldGenerator if (par2Random.nextInt(4 - var11) == 0) { var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, X + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], Y + var6 - 5 + var11, Z + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); + this.setBlockAndMetadata(par1World, X + Direction.offsetX[Direction.rotateOpposite[var12]], Y + var6 - 5 + var11, Z + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); } } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenDeciduous.java b/src/minecraft/biomesoplenty/worldgen/WorldGenDeciduous.java index b4bf1c862..8c5c29fc4 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenDeciduous.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenDeciduous.java @@ -231,7 +231,7 @@ public class WorldGenDeciduous extends WorldGenerator if (par2Random.nextInt(4 - var11) == 0) { var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); + this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); } } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java b/src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java index 680c86aed..55da00c76 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenHeath.java @@ -199,7 +199,7 @@ public class WorldGenHeath extends WorldGenerator if (par2Random.nextInt(4 - var11) == 0) { var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); + this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); } } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenMoss.java b/src/minecraft/biomesoplenty/worldgen/WorldGenMoss.java index 952426886..6ce2587ee 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenMoss.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenMoss.java @@ -23,7 +23,7 @@ public class WorldGenMoss extends WorldGenerator { if (BOPBlocks.moss.canPlaceBlockOnSide(par1World, par3, par4, par5, var8)) { - par1World.setBlock(par3, par4, par5, BOPBlocks.moss.blockID, 1 << Direction.vineGrowth[Facing.faceToSide[var8]], 2); + par1World.setBlock(par3, par4, par5, BOPBlocks.moss.blockID, 1 << Direction.facingToDirection[Facing.oppositeSide[var8]], 2); break; } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenRainforestTree1.java b/src/minecraft/biomesoplenty/worldgen/WorldGenRainforestTree1.java index 81ffe04de..3749c8868 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenRainforestTree1.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenRainforestTree1.java @@ -211,7 +211,7 @@ public class WorldGenRainforestTree1 extends WorldGenerator if (par2Random.nextInt(4 - var11) == 0) { var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); + this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); } } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree.java b/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree.java index 26337987f..cc6211d90 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree.java @@ -332,7 +332,7 @@ public class WorldGenRedwoodTree extends WorldGenerator if (par2Random.nextInt(4 - var11) == 0) { var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); + this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); } } } diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree2.java b/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree2.java index abe2d875c..45c50049c 100644 --- a/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree2.java +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenRedwoodTree2.java @@ -277,7 +277,7 @@ public class WorldGenRedwoodTree2 extends WorldGenerator if (par2Random.nextInt(4 - var11) == 0) { var13 = par2Random.nextInt(3); - this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.footInvisibleFaceRemap[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.footInvisibleFaceRemap[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); + this.setBlockAndMetadata(par1World, par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Block.cocoaPlant.blockID, var13 << 2 | var12); } } }