diff --git a/src/minecraft/biomesoplenty/ClientProxy.java b/src/minecraft/biomesoplenty/ClientProxy.java index 15a82151e..2b8237da4 100644 --- a/src/minecraft/biomesoplenty/ClientProxy.java +++ b/src/minecraft/biomesoplenty/ClientProxy.java @@ -1,16 +1,15 @@ package biomesoplenty; -import biomesoplenty.blocks.renderers.FoliageRenderer; -import biomesoplenty.blocks.renderers.PlantsRenderer; -import biomesoplenty.configuration.BOPItems; -import biomesoplenty.items.projectiles.EntityMudball; - import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityBreakingFX; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; +import biomesoplenty.api.Items; +import biomesoplenty.blocks.renderers.FoliageRenderer; +import biomesoplenty.blocks.renderers.PlantsRenderer; +import biomesoplenty.items.projectiles.EntityMudball; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { @@ -25,7 +24,7 @@ public class ClientProxy extends CommonProxy { MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST1_PNG); MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST2_PNG); - RenderingRegistry.registerEntityRenderingHandler(EntityMudball.class, new RenderSnowball(BOPItems.mudBall)); + RenderingRegistry.registerEntityRenderingHandler(EntityMudball.class, new RenderSnowball(Items.miscItems.get(), 0)); RenderingRegistry.registerBlockHandler(new FoliageRenderer()); RenderingRegistry.registerBlockHandler(new PlantsRenderer()); @@ -36,7 +35,7 @@ public class ClientProxy extends CommonProxy { { EntityFX entityfx = null; - entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, BOPItems.mudBall, mc.renderEngine); + entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.miscItems.get(), mc.renderEngine); mc.effectRenderer.addEffect(entityfx); } diff --git a/src/minecraft/biomesoplenty/api/Entities.java b/src/minecraft/biomesoplenty/api/Entities.java index 8dcdb6174..67a996229 100644 --- a/src/minecraft/biomesoplenty/api/Entities.java +++ b/src/minecraft/biomesoplenty/api/Entities.java @@ -1,11 +1,5 @@ package biomesoplenty.api; -import net.minecraft.entity.Entity; -import net.minecraft.world.biome.BiomeGenBase; - -import com.google.common.base.Optional; - -import cpw.mods.fml.common.Loader; public class Entities { diff --git a/src/minecraft/biomesoplenty/api/Items.java b/src/minecraft/biomesoplenty/api/Items.java new file mode 100644 index 000000000..133136bc6 --- /dev/null +++ b/src/minecraft/biomesoplenty/api/Items.java @@ -0,0 +1,36 @@ +package biomesoplenty.api; + +import net.minecraft.item.Item; + +import com.google.common.base.Optional; + +public class Items +{ + public static Optional bopDisc = Optional.absent(); + public static Optional bopDiscMud = Optional.absent(); + + public static Optional swordMud = Optional.absent(); + public static Optional shovelMud = Optional.absent(); + public static Optional pickaxeMud = Optional.absent(); + public static Optional axeMud = Optional.absent(); + public static Optional hoeMud = Optional.absent(); + public static Optional helmetMud = Optional.absent(); + public static Optional chestplateMud = Optional.absent(); + public static Optional leggingsMud = Optional.absent(); + public static Optional bootsMud = Optional.absent(); + + public static Optional swordAmethyst = Optional.absent(); + public static Optional shovelAmethyst = Optional.absent(); + public static Optional pickaxeAmethyst = Optional.absent(); + public static Optional axeAmethyst = Optional.absent(); + public static Optional hoeAmethyst = Optional.absent(); + public static Optional helmetAmethyst = Optional.absent(); + public static Optional chestplateAmethyst = Optional.absent(); + public static Optional leggingsAmethyst = Optional.absent(); + public static Optional bootsAmethyst = Optional.absent(); + + public static Optional ancientStaff = Optional.absent(); + public static Optional enderporter = Optional.absent(); + public static Optional shroomPowder = Optional.absent(); + public static Optional miscItems = Optional.absent(); +} diff --git a/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java b/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java index 1c7371e86..e5b066c88 100644 --- a/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java +++ b/src/minecraft/biomesoplenty/armor/ArmorAmethyst.java @@ -1,13 +1,13 @@ package biomesoplenty.armor; -import biomesoplenty.CommonProxy; -import biomesoplenty.configuration.BOPItems; - import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IArmorTextureProvider; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.CommonProxy; +import biomesoplenty.api.Items; public class ArmorAmethyst extends ItemArmor implements IArmorTextureProvider { @@ -16,13 +16,14 @@ public class ArmorAmethyst extends ItemArmor implements IArmorTextureProvider public ArmorAmethyst(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); textureID = par4; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public String getArmorTextureFile(ItemStack par1) { - if(par1.itemID == BOPItems.helmetAmethyst.itemID||par1.itemID == BOPItems.chestplateAmethyst.itemID||par1.itemID == BOPItems.bootsAmethyst.itemID){ + if(par1.itemID == Items.helmetAmethyst.get().itemID||par1.itemID == Items.chestplateAmethyst.get().itemID||par1.itemID == Items.bootsAmethyst.get().itemID){ return CommonProxy.ARMOR_AMETHYST1_PNG; } - if(par1.itemID == BOPItems.leggingsAmethyst.itemID){ + if(par1.itemID == Items.leggingsAmethyst.get().itemID){ return CommonProxy.ARMOR_AMETHYST2_PNG; } return null; diff --git a/src/minecraft/biomesoplenty/armor/ArmorMuddy.java b/src/minecraft/biomesoplenty/armor/ArmorMuddy.java index 12e00481e..4b42cf750 100644 --- a/src/minecraft/biomesoplenty/armor/ArmorMuddy.java +++ b/src/minecraft/biomesoplenty/armor/ArmorMuddy.java @@ -1,13 +1,13 @@ package biomesoplenty.armor; -import biomesoplenty.CommonProxy; -import biomesoplenty.configuration.BOPItems; - import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IArmorTextureProvider; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.CommonProxy; +import biomesoplenty.api.Items; public class ArmorMuddy extends ItemArmor implements IArmorTextureProvider { @@ -16,13 +16,14 @@ public class ArmorMuddy extends ItemArmor implements IArmorTextureProvider public ArmorMuddy(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); textureID = par4; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public String getArmorTextureFile(ItemStack par1) { - if(par1.itemID == BOPItems.helmetMud.itemID||par1.itemID == BOPItems.chestplateMud.itemID||par1.itemID == BOPItems.bootsMud.itemID){ + if(par1.itemID == Items.helmetMud.get().itemID||par1.itemID == Items.chestplateMud.get().itemID||par1.itemID == Items.bootsMud.get().itemID){ return CommonProxy.ARMOR_MUD1_PNG; } - if(par1.itemID == BOPItems.leggingsMud.itemID){ + if(par1.itemID == Items.leggingsMud.get().itemID){ return CommonProxy.ARMOR_MUD2_PNG; } return null; diff --git a/src/minecraft/biomesoplenty/blocks/BlockAsh.java b/src/minecraft/biomesoplenty/blocks/BlockAsh.java index 580715ebb..a33bbedbb 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockAsh.java +++ b/src/minecraft/biomesoplenty/blocks/BlockAsh.java @@ -2,15 +2,14 @@ package biomesoplenty.blocks; import java.util.Random; -import biomesoplenty.BiomesOPlenty; -import biomesoplenty.configuration.BOPItems; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Items; public class BlockAsh extends Block { @@ -63,7 +62,13 @@ public class BlockAsh extends Block */ public int idDropped(int par1, Random par2Random, int par3) { - return BOPItems.ashes.itemID; + return Items.miscItems.get().itemID; + } + + @Override + public int damageDropped(int meta) + { + return 1; } /** diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java index bbbd810f8..1b2798c21 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPAppleLeaves.java @@ -67,6 +67,7 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { list.add(new ItemStack(blockID, 1, 0)); } diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java index 89229e0f3..1f7fc51e0 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedLeaves.java @@ -114,6 +114,7 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < textures[0].length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java index d456028a3..67c03f142 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPColorizedSapling.java @@ -13,24 +13,10 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import biomesoplenty.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; @@ -73,6 +59,7 @@ public class BlockBOPColorizedSapling extends BlockSapling @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < saplings.length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java index a42c60c17..ec4157bb1 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFlower.java @@ -2,10 +2,6 @@ package biomesoplenty.blocks; import java.util.List; -import biomesoplenty.BiomesOPlenty; -import biomesoplenty.api.Blocks; -import biomesoplenty.blocks.renderers.FoliageRenderer; - import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; @@ -17,6 +13,8 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.blocks.renderers.FoliageRenderer; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -101,6 +99,7 @@ public class BlockBOPFlower extends BlockFlower @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < plants.length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java index c86955b51..a9e09952a 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java @@ -4,10 +4,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import biomesoplenty.BiomesOPlenty; -import biomesoplenty.api.Blocks; -import biomesoplenty.blocks.renderers.FoliageRenderer; - import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; @@ -21,6 +17,8 @@ import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.blocks.renderers.FoliageRenderer; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -68,6 +66,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs par2CreativeTabs, List list) { for (int i = 0; i < GRASSTOP; ++i) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPGeneric.java b/src/minecraft/biomesoplenty/blocks/BlockBOPGeneric.java index 2d19d0b38..98efc897b 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPGeneric.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPGeneric.java @@ -2,16 +2,16 @@ package biomesoplenty.blocks; import java.util.Random; -import biomesoplenty.BiomesOPlenty; -import biomesoplenty.configuration.BOPItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPGeneric extends Block { @@ -146,7 +146,13 @@ public class BlockBOPGeneric extends Block @Override public int idDropped(int par1, Random par2Random, int par3) { - return type == BlockType.AMETHYST_ORE ? BOPItems.amethyst.itemID : this.blockID; + return type == BlockType.AMETHYST_ORE ? Items.miscItems.get().itemID : this.blockID; + } + + @Override + public int damageDropped(int meta) + { + return type == BlockType.AMETHYST_ORE ? 2 : 0; } @Override diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java index 5c66ebf12..4687ac0a8 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPLeaves.java @@ -72,6 +72,7 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < 8; ++i) if (category != LeafCategory.CAT2 || i < 4) diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java b/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java index 6b1bf984e..8b25497ce 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPLog.java @@ -68,6 +68,7 @@ public class BlockBOPLog extends Block @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < 4; ++i) list.add(new ItemStack(this, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java index 063bd8a05..f4691ebe6 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java @@ -4,10 +4,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import biomesoplenty.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; @@ -17,6 +13,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; +import biomesoplenty.BiomesOPlenty; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPPetals extends BlockLeavesBase implements IShearable { @@ -57,6 +56,7 @@ public class BlockBOPPetals extends BlockLeavesBase implements IShearable @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < textures.length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java index a510f5625..1c0ef7e60 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPlank.java @@ -49,6 +49,7 @@ public class BlockBOPPlank extends Block @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < woodTypes.length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java index a3cceed8e..a5ca64270 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java @@ -20,7 +20,6 @@ import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; import biomesoplenty.blocks.renderers.PlantsRenderer; -import biomesoplenty.configuration.BOPBlocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -86,6 +85,7 @@ public class BlockBOPPlant extends BlockFlower implements IShearable @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < plants.length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPRedRock.java b/src/minecraft/biomesoplenty/blocks/BlockBOPRedRock.java index 2f5c3e6f3..71317af89 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPRedRock.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPRedRock.java @@ -54,6 +54,7 @@ public class BlockBOPRedRock extends Block @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < types.length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java index 06e816670..b3b08838e 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPSapling.java @@ -68,6 +68,7 @@ public class BlockBOPSapling extends BlockSapling @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { for (int i = 0; i < saplings.length; ++i) list.add(new ItemStack(blockID, 1, i)); diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java b/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java index 3f9509fd9..51b36ba47 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPSlab.java @@ -79,6 +79,7 @@ public class BlockBOPSlab extends BlockHalfSlab @Override @SideOnly(Side.CLIENT) + @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { int max = 0; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBamboo.java b/src/minecraft/biomesoplenty/blocks/BlockBamboo.java index daf0e9fa2..2a0f7b59e 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBamboo.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBamboo.java @@ -2,8 +2,6 @@ package biomesoplenty.blocks; import java.util.Random; -import biomesoplenty.configuration.BOPItems; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; diff --git a/src/minecraft/biomesoplenty/blocks/BlockMoss.java b/src/minecraft/biomesoplenty/blocks/BlockMoss.java index 0e70052ad..42e850f23 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockMoss.java +++ b/src/minecraft/biomesoplenty/blocks/BlockMoss.java @@ -12,7 +12,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; -import biomesoplenty.configuration.BOPItems; public class BlockMoss extends Block { diff --git a/src/minecraft/biomesoplenty/blocks/BlockMud.java b/src/minecraft/biomesoplenty/blocks/BlockMud.java index 0d13fa56d..dcb49e371 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockMud.java +++ b/src/minecraft/biomesoplenty/blocks/BlockMud.java @@ -2,15 +2,14 @@ package biomesoplenty.blocks; import java.util.Random; -import biomesoplenty.BiomesOPlenty; -import biomesoplenty.configuration.BOPItems; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Items; public class BlockMud extends Block { @@ -40,7 +39,13 @@ public class BlockMud extends Block public int idDropped(int par1, Random par2Random, int par3) { - return BOPItems.mudBall.itemID; + return Items.miscItems.get().itemID; + } + + @Override + public int damageDropped(int meta) + { + return 0; } public int quantityDropped(Random par1Random) diff --git a/src/minecraft/biomesoplenty/blocks/BlockOriginGrass.java b/src/minecraft/biomesoplenty/blocks/BlockOriginGrass.java index c3fe71c68..959481cf9 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockOriginGrass.java +++ b/src/minecraft/biomesoplenty/blocks/BlockOriginGrass.java @@ -2,10 +2,6 @@ package biomesoplenty.blocks; import java.util.Random; -import biomesoplenty.BiomesOPlenty; -import biomesoplenty.api.Blocks; -import biomesoplenty.configuration.BOPBlocks; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -14,6 +10,8 @@ import net.minecraft.util.Icon; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.IPlantable; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Blocks; public class BlockOriginGrass extends Block { diff --git a/src/minecraft/biomesoplenty/blocks/BlockTreeMoss.java b/src/minecraft/biomesoplenty/blocks/BlockTreeMoss.java index fa6f3ded4..f9e8fe1d5 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockTreeMoss.java +++ b/src/minecraft/biomesoplenty/blocks/BlockTreeMoss.java @@ -22,7 +22,7 @@ public class BlockTreeMoss extends Block implements IShearable { super(par1, Material.vine); this.setTickRandomly(true); - this.setBurnProperties(this.blockID, 15, 100); + setBurnProperties(this.blockID, 15, 100); this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } diff --git a/src/minecraft/biomesoplenty/configuration/BOPBlocks.java b/src/minecraft/biomesoplenty/configuration/BOPBlocks.java index 3ab5ec49d..14734b4e0 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPBlocks.java +++ b/src/minecraft/biomesoplenty/configuration/BOPBlocks.java @@ -2,6 +2,7 @@ package biomesoplenty.configuration; import static com.google.common.base.Preconditions.checkNotNull; import biomesoplenty.api.Blocks; +import biomesoplenty.api.Items; import biomesoplenty.blocks.*; import biomesoplenty.blocks.BlockBOPGeneric.BlockType; import biomesoplenty.blocks.BlockBOPLeaves.LeafCategory; @@ -9,7 +10,7 @@ import biomesoplenty.blocks.BlockBOPLog.LogCategory; import biomesoplenty.blocks.BlockBOPSlab.SlabCategory; import biomesoplenty.blocks.BlockBOPStairs.Category; import biomesoplenty.helpers.FurnaceFuel; -import biomesoplenty.items.ItemBamboo; +import biomesoplenty.items.ItemBOPBamboo; import biomesoplenty.items.ItemBOPAppleLeaves; import biomesoplenty.items.ItemBOPColorizedLeaves; import biomesoplenty.items.ItemBOPColorizedSapling; @@ -33,6 +34,7 @@ import net.minecraft.block.BlockHalfSlab; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.registry.GameRegistry; @@ -116,7 +118,7 @@ public class BOPBlocks { GameRegistry.registerBlock(Blocks.ashStone.get(), "ashStone"); GameRegistry.registerBlock(Blocks.hardIce.get(), "hardIce"); GameRegistry.registerBlock(Blocks.leavesFruit.get(), ItemBOPAppleLeaves.class, "leavesFruit"); - GameRegistry.registerBlock(Blocks.bamboo.get(), ItemBamboo.class, "bamboo"); + GameRegistry.registerBlock(Blocks.bamboo.get(), ItemBOPBamboo.class, "bamboo"); GameRegistry.registerBlock(Blocks.mudBrick.get(), "mudBrick"); GameRegistry.registerBlock(Blocks.mudBricksStairs.get(), "mudBricksStairs"); GameRegistry.registerBlock(Blocks.originGrass.get(), "originGrass"); @@ -354,8 +356,8 @@ public class BOPBlocks { // TODO GameRegistry.addSmelting(Block.dirt.blockID, new ItemStack(Blocks.driedDirt.get(), 1), 0F); -// GameRegistry.addSmelting(redRockCobble.blockID, new ItemStack(Blocks.redRock.get(), 1, 0), 0.1F); -// GameRegistry.addSmelting(new ItemStack(Blocks.flowers.get(),1,11), new ItemStack(Item.dyePowder, 1, 2), 0.2F); + FurnaceRecipes.smelting().addSmelting(Blocks.redRock.get().blockID, 1, new ItemStack(Blocks.redRock.get(), 1, 0), 0.1F); + FurnaceRecipes.smelting().addSmelting(Blocks.flowers.get().blockID, 11, new ItemStack(Item.dyePowder, 1, 2), 0.2F); //Block tool strength, 0 is Wood and Gold, 1 is Stone, 2 is Iron and 3 is Diamond //Leaves can be obtained from using shears, however they arn't instantly broken by them (unsure how to do this) @@ -541,15 +543,15 @@ public class BOPBlocks { public static void dependantinit() { //Plants - GameRegistry.addShapelessRecipe(new ItemStack(Item.dyePowder, 2, 8), new Object[] {BOPItems.ashes}); + GameRegistry.addShapelessRecipe(new ItemStack(Item.dyePowder, 2, 8), new Object[] {new ItemStack(Items.miscItems.get(), 1, 1)}); //Other -// GameRegistry.addRecipe(new ItemStack(Block.cloth, 1, 0), new Object[] {"CCC", "CCC", "CCC", 'C', BOPItems.cattailItem}); - GameRegistry.addRecipe(new ItemStack(Item.coal, 1), new Object[] {"AAA", "AAA", "AAA", 'A', BOPItems.ashes}); - GameRegistry.addRecipe(new ItemStack(Blocks.mud.get(), 1), new Object[] {"MM", "MM", 'M', BOPItems.mudBall}); - GameRegistry.addRecipe(new ItemStack(Blocks.amethystBlock.get(), 1), new Object[] {"AAA", "AAA", "AAA", 'A', BOPItems.amethyst}); - GameRegistry.addRecipe(new ItemStack(Blocks.ash.get(), 1), new Object[] {"AA", "AA", 'A', BOPItems.ashes}); - GameRegistry.addRecipe(new ItemStack(Blocks.mudBrick.get(), 1), new Object[] {"MM", "MM", 'M', BOPItems.mudBrick}); + GameRegistry.addRecipe(new ItemStack(Block.cloth, 1, 0), new Object[] {"CCC", "CCC", "CCC", 'C', new ItemStack(Blocks.plants.get(), 1, 7)}); + GameRegistry.addRecipe(new ItemStack(Item.coal, 1), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(Items.miscItems.get(), 1, 1)}); + GameRegistry.addRecipe(new ItemStack(Blocks.mud.get(), 1), new Object[] {"MM", "MM", 'M', new ItemStack(Items.miscItems.get(), 1, 0)}); + GameRegistry.addRecipe(new ItemStack(Blocks.amethystBlock.get(), 1), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(Items.miscItems.get(), 1, 2)}); + GameRegistry.addRecipe(new ItemStack(Blocks.ash.get(), 1), new Object[] {"AA", "AA", 'A', new ItemStack(Items.miscItems.get(), 1, 1)}); + GameRegistry.addRecipe(new ItemStack(Blocks.mudBrick.get(), 1), new Object[] {"MM", "MM", 'M', new ItemStack(Items.miscItems.get(), 1, 3)}); GameRegistry.addRecipe(new ItemStack(Blocks.bambooThatching.get(), 1), new Object[] {"###", "###", "###", '#', Blocks.bamboo.get()}); GameRegistry.addRecipe(new ItemStack(Block.cobblestoneMossy, 1, 0), new Object[] {"MMM", "MCM", "MMM", 'M', Blocks.moss.get(), 'C', Block.cobblestone}); GameRegistry.addRecipe(new ItemStack(Block.stoneBrick, 1, 1), new Object[] {"MMM", "MSM", "MMM", 'M', Blocks.moss.get(), 'S', Block.stoneBrick}); diff --git a/src/minecraft/biomesoplenty/configuration/BOPItems.java b/src/minecraft/biomesoplenty/configuration/BOPItems.java index 60a6d31d3..5590f2a67 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPItems.java +++ b/src/minecraft/biomesoplenty/configuration/BOPItems.java @@ -3,41 +3,35 @@ package biomesoplenty.configuration; import java.util.Map; import java.util.logging.Level; -import biomesoplenty.BiomesOPlenty; -import biomesoplenty.api.Blocks; -import biomesoplenty.armor.ArmorAmethyst; -import biomesoplenty.armor.ArmorMuddy; -import biomesoplenty.items.ItemAncientStaff; -import biomesoplenty.items.ItemBOP; -import biomesoplenty.items.ItemBOPAxe; -import biomesoplenty.items.ItemBOPHoe; -import biomesoplenty.items.ItemBOPPickaxe; -import biomesoplenty.items.ItemBOPRecord; -import biomesoplenty.items.ItemBOPRecordMud; -import biomesoplenty.items.ItemBOPSpade; -import biomesoplenty.items.ItemBOPSword; -import biomesoplenty.items.ItemBamboo; -import biomesoplenty.items.ItemBarley; -import biomesoplenty.items.ItemBush; -import biomesoplenty.items.ItemCattail; -import biomesoplenty.items.ItemEnderporter; -import biomesoplenty.items.ItemMediumGrass; -import biomesoplenty.items.ItemShortGrass; -import biomesoplenty.items.ItemShroomPowder; -import biomesoplenty.items.ItemSprout; -import biomesoplenty.items.overrides.ItemShears; - import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraftforge.common.ChestGenHooks; +import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.MinecraftForge; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Blocks; +import biomesoplenty.api.Items; +import biomesoplenty.armor.ArmorAmethyst; +import biomesoplenty.armor.ArmorMuddy; +import biomesoplenty.items.ItemBOP; +import biomesoplenty.items.ItemBOPAncientStaff; +import biomesoplenty.items.ItemBOPAxe; +import biomesoplenty.items.ItemBOPHoe; +import biomesoplenty.items.ItemBOPPickaxe; +import biomesoplenty.items.ItemBOPRecord; +import biomesoplenty.items.ItemBOPRecordMud; +import biomesoplenty.items.ItemBOPSpade; +import biomesoplenty.items.ItemBOPSword; +import biomesoplenty.items.ItemEnderporter; +import biomesoplenty.items.ItemShroomPowder; +import biomesoplenty.items.overrides.ItemShears; + +import com.google.common.base.Optional; + import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.registry.GameData; import cpw.mods.fml.common.registry.GameRegistry; @@ -47,47 +41,6 @@ import cpw.mods.fml.relauncher.ReflectionHelper; public class BOPItems { public static Item shears; - public static Item shroomPowder; - public static Item mudBall; - public static Item mudBrick; -// public static Item cattailItem; -// public static Item barleyItem; -// public static Item shortGrassItem; -// public static Item mediumGrassItem; -// public static Item bushItem; -// public static Item sproutItem; -// public static Item mossItem; - public static Item ashes; -// public static Item bambooItem; - public static Item ancientStaff; - public static Item ancientStaffHandle; - public static Item ancientStaffPole; - public static Item ancientStaffTopper; - public static Item enderporter; - public static Item amethyst; - public static Item bopDisc; - public static Item bopDiscMud; - - public static Item swordMud; - public static Item shovelMud; - public static Item pickaxeMud; - public static Item axeMud; - public static Item hoeMud; - public static Item helmetMud; - public static Item chestplateMud; - public static Item leggingsMud; - public static Item bootsMud; - - public static Item swordAmethyst; - public static Item shovelAmethyst; - public static Item pickaxeAmethyst; - public static Item axeAmethyst; - public static Item hoeAmethyst; - public static Item helmetAmethyst; - public static Item chestplateAmethyst; - public static Item leggingsAmethyst; - public static Item bootsAmethyst; - // Material declaration public static EnumArmorMaterial EnumArmorMaterialMud; public static EnumToolMaterial EnumToolMaterialMud; @@ -126,6 +79,7 @@ public class BOPItems { var3.remove(Integer.valueOf(var1)); return var1 - 256; } + public static void init() { @@ -139,127 +93,113 @@ public class BOPItems { shears = (new ItemShears(clearItem(Item.shears))).setUnlocalizedName("shears").setCreativeTab(CreativeTabs.tabTools); // Item declaration - shroomPowder = (new ItemShroomPowder(BOPConfiguration.shroomPowderID, 1, 0.5F, false)).setPotionEffect(Potion.confusion.id, 30, 0, 0.6F).setAlwaysEdible().setUnlocalizedName("shroomPowder").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - mudBall = (new ItemBOP(BOPConfiguration.mudBallID, 0)).setUnlocalizedName("mudBall").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - mudBrick = (new ItemBOP(BOPConfiguration.mudBrickID, 1)).setUnlocalizedName("mudBrick").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// bambooItem = (new ItemBamboo(BOPConfiguration.bambooItemID, Blocks.bamboo.get())).setUnlocalizedName("bambooItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// cattailItem = (new ItemCattail(BOPConfiguration.cattailItemID, BOPBlocks.cattail)).setUnlocalizedName("cattailItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// barleyItem = (new ItemBarley(BOPConfiguration.barleyItemID, BOPBlocks.barley)).setUnlocalizedName("barleyItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// shortGrassItem = (new ItemShortGrass(BOPConfiguration.shortGrassItemID, BOPBlocks.shortGrass)).setUnlocalizedName("shortGrassItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// mediumGrassItem = (new ItemMediumGrass(BOPConfiguration.mediumGrassItemID, BOPBlocks.mediumGrass)).setUnlocalizedName("mediumGrassItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// bushItem = (new ItemBush(BOPConfiguration.bushItemID, BOPBlocks.bush)).setUnlocalizedName("bushItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// sproutItem = (new ItemSprout(BOPConfiguration.sproutItemID, BOPBlocks.sprout)).setUnlocalizedName("sproutItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); -// mossItem = (new ItemBOP(BOPConfiguration.mossItemID, 2)).setUnlocalizedName("mossItem").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - ancientStaff = new ItemAncientStaff(BOPConfiguration.ancientStaffID).setUnlocalizedName("ancientStaff").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - enderporter = new ItemEnderporter(BOPConfiguration.enderporterID).setUnlocalizedName("enderporter").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - ashes = (new ItemBOP(BOPConfiguration.ashesID, 3)).setUnlocalizedName("ashes").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - amethyst = (new ItemBOP(BOPConfiguration.amethystID, 4)).setUnlocalizedName("amethyst").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - ancientStaffHandle = (new ItemBOP(BOPConfiguration.ancientStaffHandleID, 5)).setUnlocalizedName("ancientStaffHandle").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - ancientStaffPole = (new ItemBOP(BOPConfiguration.ancientStaffPoleID, 6)).setUnlocalizedName("ancientStaffPole").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - ancientStaffTopper = (new ItemBOP(BOPConfiguration.ancientStaffTopperID, 7)).setUnlocalizedName("ancientStaffTopper").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - bopDisc = (new ItemBOPRecord(BOPConfiguration.bopDiscID, "bopdisc")).setUnlocalizedName("bopDisc").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - bopDiscMud = (new ItemBOPRecordMud(BOPConfiguration.bopDiscMudID, "bopdiscmud")).setUnlocalizedName("bopDiscMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + Items.shroomPowder = Optional.of(new ItemShroomPowder(BOPConfiguration.shroomPowderID, 1, 0.5F, false)); + Items.miscItems = Optional.of(new ItemBOP(BOPConfiguration.amethystID)); + + Items.ancientStaff = Optional.of(new ItemBOPAncientStaff(BOPConfiguration.ancientStaffID)); + + Items.enderporter = Optional.of(new ItemEnderporter(BOPConfiguration.enderporterID)); + + Items.bopDisc = Optional.of(new ItemBOPRecord(BOPConfiguration.bopDiscID, "bopdisc")); + Items.bopDiscMud = Optional.of(new ItemBOPRecordMud(BOPConfiguration.bopDiscMudID, "bopdiscmud")); - swordMud = (new ItemBOPSword(BOPConfiguration.swordMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("swordMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - shovelMud = (new ItemBOPSpade(BOPConfiguration.shovelMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("shovelMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - pickaxeMud = (new ItemBOPPickaxe(BOPConfiguration.pickaxeMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("pickaxeMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - axeMud = (new ItemBOPAxe(BOPConfiguration.axeMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("hatchetMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - hoeMud = (new ItemBOPHoe(BOPConfiguration.hoeMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("hoeMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - helmetMud = (new ArmorMuddy(BOPConfiguration.helmetMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 0)).setUnlocalizedName("helmetMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - chestplateMud = (new ArmorMuddy(BOPConfiguration.chestplateMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 1)).setUnlocalizedName("chestplateMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - leggingsMud = (new ArmorMuddy(BOPConfiguration.leggingsMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 2)).setUnlocalizedName("leggingsMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - bootsMud = (new ArmorMuddy(BOPConfiguration.bootsMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 3)).setUnlocalizedName("bootsMud").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + Items.swordMud = Optional.of((new ItemBOPSword(BOPConfiguration.swordMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("swordMud")); + Items.shovelMud = Optional.of((new ItemBOPSpade(BOPConfiguration.shovelMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("shovelMud")); + Items.pickaxeMud = Optional.of((new ItemBOPPickaxe(BOPConfiguration.pickaxeMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("pickaxeMud")); + Items.axeMud = Optional.of((new ItemBOPAxe(BOPConfiguration.axeMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("hatchetMud")); + Items.hoeMud = Optional.of((new ItemBOPHoe(BOPConfiguration.hoeMudID, EnumToolMaterialMud, 0)).setUnlocalizedName("hoeMud")); + Items.helmetMud = Optional.of((new ArmorMuddy(BOPConfiguration.helmetMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 0)).setUnlocalizedName("helmetMud")); + Items.chestplateMud = Optional.of((new ArmorMuddy(BOPConfiguration.chestplateMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 1)).setUnlocalizedName("chestplateMud")); + Items.leggingsMud = Optional.of((new ArmorMuddy(BOPConfiguration.leggingsMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 2)).setUnlocalizedName("leggingsMud")); + Items.bootsMud = Optional.of((new ArmorMuddy(BOPConfiguration.bootsMudID, EnumArmorMaterialMud, BiomesOPlenty.proxy.addArmor("mud"), 3)).setUnlocalizedName("bootsMud")); - swordAmethyst = (new ItemBOPSword(BOPConfiguration.swordAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("swordAmethyst").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - shovelAmethyst = (new ItemBOPSpade(BOPConfiguration.shovelAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("shovelAmethyst").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - pickaxeAmethyst = (new ItemBOPPickaxe(BOPConfiguration.pickaxeAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("pickaxeAmethyst").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - axeAmethyst = (new ItemBOPAxe(BOPConfiguration.axeAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("hatchetAmethyst").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - hoeAmethyst = (new ItemBOPHoe(BOPConfiguration.hoeAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("hoeAmethyst").setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); - helmetAmethyst = (new ArmorAmethyst(BOPConfiguration.helmetAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 0)).setCreativeTab(BiomesOPlenty.tabBiomesOPlenty).setUnlocalizedName("helmetAmethyst"); - chestplateAmethyst = (new ArmorAmethyst(BOPConfiguration.chestplateAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 1)).setCreativeTab(BiomesOPlenty.tabBiomesOPlenty).setUnlocalizedName("chestplateAmethyst"); - leggingsAmethyst = (new ArmorAmethyst(BOPConfiguration.leggingsAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 2)).setCreativeTab(BiomesOPlenty.tabBiomesOPlenty).setUnlocalizedName("leggingsAmethyst"); - bootsAmethyst = (new ArmorAmethyst(BOPConfiguration.bootsAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 3)).setCreativeTab(BiomesOPlenty.tabBiomesOPlenty).setUnlocalizedName("bootsAmethyst"); + Items.swordAmethyst = Optional.of((new ItemBOPSword(BOPConfiguration.swordAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("swordAmethyst")); + Items.shovelAmethyst = Optional.of((new ItemBOPSpade(BOPConfiguration.shovelAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("shovelAmethyst")); + Items.pickaxeAmethyst = Optional.of((new ItemBOPPickaxe(BOPConfiguration.pickaxeAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("pickaxeAmethyst")); + Items.axeAmethyst = Optional.of((new ItemBOPAxe(BOPConfiguration.axeAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("hatchetAmethyst")); + Items.hoeAmethyst = Optional.of((new ItemBOPHoe(BOPConfiguration.hoeAmethystID, EnumToolMaterialAmethyst, 1)).setUnlocalizedName("hoeAmethyst")); + Items.helmetAmethyst = Optional.of((new ArmorAmethyst(BOPConfiguration.helmetAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 0)).setUnlocalizedName("helmetAmethyst")); + Items.chestplateAmethyst = Optional.of((new ArmorAmethyst(BOPConfiguration.chestplateAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 1)).setUnlocalizedName("chestplateAmethyst")); + Items.leggingsAmethyst = Optional.of((new ArmorAmethyst(BOPConfiguration.leggingsAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 2)).setUnlocalizedName("leggingsAmethyst")); + Items.bootsAmethyst = Optional.of((new ArmorAmethyst(BOPConfiguration.bootsAmethystID, EnumArmorMaterialAmethyst, BiomesOPlenty.proxy.addArmor("amethyst"), 3)).setUnlocalizedName("bootsAmethyst")); - MinecraftForge.setToolClass(shovelAmethyst, "shovel", 3); - MinecraftForge.setToolClass(pickaxeAmethyst, "pickaxe", 3); - MinecraftForge.setToolClass(axeAmethyst, "axe", 3); + MinecraftForge.setToolClass(Items.shovelAmethyst.get(), "shovel", 4); + MinecraftForge.setToolClass(Items.pickaxeAmethyst.get(), "pickaxe", 4); + MinecraftForge.setToolClass(Items.axeAmethyst.get(), "axe", 4); //Mud Tools and Armor - GameRegistry.addRecipe(new ItemStack(pickaxeMud, 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), mudBall, Character.valueOf('X'), Item.stick}); - GameRegistry.addRecipe(new ItemStack(shovelMud, 1), new Object [] {"#", "X", "X", Character.valueOf('#'), mudBall, Character.valueOf('X'), Item.stick}); - GameRegistry.addRecipe(new ItemStack(swordMud, 1), new Object [] {"#", "#", "X", Character.valueOf('#'), mudBall, Character.valueOf('X'), Item.stick}); - GameRegistry.addRecipe(new ItemStack(axeMud, 1), new Object [] {"##", "#X", " X", Character.valueOf('#'), mudBall, Character.valueOf('X'), Item.stick}); - GameRegistry.addRecipe(new ItemStack(hoeMud, 1), new Object [] {"##", " X", " X", Character.valueOf('#'), mudBall, Character.valueOf('X'), Item.stick}); - GameRegistry.addRecipe(new ItemStack(helmetMud, 1), new Object [] {"###", "# #", Character.valueOf('#'), mudBall}); - GameRegistry.addRecipe(new ItemStack(chestplateMud, 1), new Object [] {"# #", "###", "###", Character.valueOf('#'), mudBall}); - GameRegistry.addRecipe(new ItemStack(leggingsMud, 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), mudBall}); - GameRegistry.addRecipe(new ItemStack(bootsMud, 1), new Object [] {"# #", "# #", Character.valueOf('#'), mudBall}); + GameRegistry.addRecipe(new ItemStack(Items.pickaxeMud.get(), 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); + GameRegistry.addRecipe(new ItemStack(Items.shovelMud.get(), 1), new Object [] {"#", "X", "X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); + GameRegistry.addRecipe(new ItemStack(Items.swordMud.get(), 1), new Object [] {"#", "#", "X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); + GameRegistry.addRecipe(new ItemStack(Items.axeMud.get(), 1), new Object [] {"##", "#X", " X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); + GameRegistry.addRecipe(new ItemStack(Items.hoeMud.get(), 1), new Object [] {"##", " X", " X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); + GameRegistry.addRecipe(new ItemStack(Items.helmetMud.get(), 1), new Object [] {"###", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); + GameRegistry.addRecipe(new ItemStack(Items.chestplateMud.get(), 1), new Object [] {"# #", "###", "###", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); + GameRegistry.addRecipe(new ItemStack(Items.leggingsMud.get(), 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); + GameRegistry.addRecipe(new ItemStack(Items.bootsMud.get(), 1), new Object [] {"# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); //Amethyst Tools and Armor - GameRegistry.addRecipe(new ItemStack(pickaxeAmethyst, 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), amethyst, Character.valueOf('X'), Item.ingotIron}); - GameRegistry.addRecipe(new ItemStack(shovelAmethyst, 1), new Object [] {"#", "X", "X", Character.valueOf('#'), amethyst, Character.valueOf('X'), Item.ingotIron}); - GameRegistry.addRecipe(new ItemStack(swordAmethyst, 1), new Object [] {"#", "#", "X", Character.valueOf('#'), amethyst, Character.valueOf('X'), Item.ingotIron}); - GameRegistry.addRecipe(new ItemStack(axeAmethyst, 1), new Object [] {"##", "#X", " X", Character.valueOf('#'), amethyst, Character.valueOf('X'), Item.ingotIron}); - GameRegistry.addRecipe(new ItemStack(hoeAmethyst, 1), new Object [] {"##", " X", " X", Character.valueOf('#'), amethyst, Character.valueOf('X'), Item.ingotIron}); - GameRegistry.addRecipe(new ItemStack(helmetAmethyst, 1), new Object [] {"###", "# #", Character.valueOf('#'), amethyst}); - GameRegistry.addRecipe(new ItemStack(chestplateAmethyst, 1), new Object [] {"# #", "###", "###", Character.valueOf('#'), amethyst}); - GameRegistry.addRecipe(new ItemStack(leggingsAmethyst, 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), amethyst}); - GameRegistry.addRecipe(new ItemStack(bootsAmethyst, 1), new Object [] {"# #", "# #", Character.valueOf('#'), amethyst}); + GameRegistry.addRecipe(new ItemStack(Items.pickaxeAmethyst.get(), 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2), Character.valueOf('X'), Item.ingotIron}); + GameRegistry.addRecipe(new ItemStack(Items.shovelAmethyst.get(), 1), new Object [] {"#", "X", "X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2), Character.valueOf('X'), Item.ingotIron}); + GameRegistry.addRecipe(new ItemStack(Items.swordAmethyst.get(), 1), new Object [] {"#", "#", "X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2), Character.valueOf('X'), Item.ingotIron}); + GameRegistry.addRecipe(new ItemStack(Items.axeAmethyst.get(), 1), new Object [] {"##", "#X", " X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2), Character.valueOf('X'), Item.ingotIron}); + GameRegistry.addRecipe(new ItemStack(Items.hoeAmethyst.get(), 1), new Object [] {"##", " X", " X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2), Character.valueOf('X'), Item.ingotIron}); + GameRegistry.addRecipe(new ItemStack(Items.helmetAmethyst.get(), 1), new Object [] {"###", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2)}); + GameRegistry.addRecipe(new ItemStack(Items.chestplateAmethyst.get(), 1), new Object [] {"# #", "###", "###", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2)}); + GameRegistry.addRecipe(new ItemStack(Items.leggingsAmethyst.get(), 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2)}); + GameRegistry.addRecipe(new ItemStack(Items.bootsAmethyst.get(), 1), new Object [] {"# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2)}); //Other -// GameRegistry.addRecipe(new ItemStack(Item.wheat, 1), new Object[] {"###", '#', BOPItems.barleyItem}); - GameRegistry.addRecipe(new ItemStack(ancientStaff, 1, 0), new Object[] {"T", "P", "H", 'T', ancientStaffTopper, 'P', ancientStaffPole, 'H', ancientStaffHandle}); - GameRegistry.addRecipe(new ItemStack(ancientStaffHandle, 1, 0), new Object[] {"ISI", "ISI", " E ", 'I', Item.ingotIron, 'S', Block.whiteStone, 'E', Item.emerald}); - GameRegistry.addRecipe(new ItemStack(ancientStaffPole, 1, 0), new Object[] {"ISI", "IRI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'R', Item.redstone}); - GameRegistry.addRecipe(new ItemStack(ancientStaffTopper, 1, 0), new Object[] {" N ", "IDI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'D', Item.diamond, 'N', Item.netherStar}); - GameRegistry.addRecipe(new ItemStack(enderporter, 1, 0), new Object[] {"IOI", "OAO", "IOI", 'I', Item.eyeOfEnder, 'O', Block.obsidian, 'A', Blocks.amethystBlock.get()}); - GameRegistry.addRecipe(new ItemStack(bopDiscMud, 1), new Object[] {" M ", "MDM", " M ", 'M', mudBall, 'D', bopDisc}); + GameRegistry.addRecipe(new ItemStack(Item.wheat, 1), new Object[] {"###", '#', new ItemStack(Blocks.plants.get(),1,6)}); + GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 0), new Object[] {"T", "P", "H", 'T', new ItemStack(Items.ancientStaff.get(), 1, 3), 'P', new ItemStack(Items.ancientStaff.get(), 1, 2), 'H', new ItemStack(Items.ancientStaff.get(), 1, 1)}); + GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 1), new Object[] {"ISI", "ISI", " E ", 'I', Item.ingotIron, 'S', Block.whiteStone, 'E', Item.emerald}); + GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 2), new Object[] {"ISI", "IRI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'R', Item.redstone}); + GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 3), new Object[] {" N ", "IDI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'D', Item.diamond, 'N', Item.netherStar}); + GameRegistry.addRecipe(new ItemStack(Items.enderporter.get(), 1, 0), new Object[] {"IOI", "OAO", "IOI", 'I', Item.eyeOfEnder, 'O', Block.obsidian, 'A', Blocks.amethystBlock.get()}); + GameRegistry.addRecipe(new ItemStack(Items.bopDiscMud.get(), 1), new Object[] {" M ", "MDM", " M ", 'M', new ItemStack(Items.miscItems.get(), 1, 0), 'D', Items.bopDisc.get()}); GameRegistry.addShapelessRecipe(new ItemStack(Blocks.bamboo.get(), 9), new Object[] {Blocks.bambooThatching.get()}); - GameRegistry.addShapelessRecipe(new ItemStack(amethyst, 9), new Object[] {Blocks.amethystBlock.get()}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 9, 2), new Object[] {Blocks.amethystBlock.get()}); //Plants - GameRegistry.addShapelessRecipe(new ItemStack(shroomPowder, 2), new Object[] {new ItemStack(Blocks.flowers.get(),1,10)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.shroomPowder.get(), 2), new Object[] {new ItemStack(Blocks.flowers.get(),1,10)}); - GameRegistry.addSmelting(mudBall.itemID, new ItemStack(mudBrick, 1), 0F); + FurnaceRecipes.smelting().addSmelting(Items.miscItems.get().itemID, 2, new ItemStack(Items.miscItems.get(), 1, 3), 0F); - LanguageRegistry.addName(shroomPowder, "Shroom Powder"); - LanguageRegistry.addName(mudBall, "Mud Ball"); - LanguageRegistry.addName(mudBrick, "Mud Brick"); -// LanguageRegistry.addName(bambooItem, "Bamboo"); -// LanguageRegistry.addName(cattailItem, "Cattail"); -// LanguageRegistry.addName(shortGrassItem, "Short Grass"); -// LanguageRegistry.addName(mediumGrassItem, "Medium Grass"); -// LanguageRegistry.addName(bushItem, "Bush"); -// LanguageRegistry.addName(sproutItem, "Sprout"); -// LanguageRegistry.addName(mossItem, "Moss"); -// LanguageRegistry.addName(barleyItem, "Barley"); - LanguageRegistry.addName(ashes, "Pile of Ashes"); - LanguageRegistry.addName(pickaxeMud, "Muddy Pickaxe"); - LanguageRegistry.addName(axeMud, "Muddy Axe"); - LanguageRegistry.addName(shovelMud, "Muddy Shovel"); - LanguageRegistry.addName(swordMud, "Muddy Sword"); - LanguageRegistry.addName(hoeMud, "Muddy Hoe"); - LanguageRegistry.addName(helmetMud, "Muddy Helmet"); - LanguageRegistry.addName(chestplateMud, "Muddy Chestplate"); - LanguageRegistry.addName(leggingsMud, "Muddy Leggings"); - LanguageRegistry.addName(bootsMud, "Muddy Boots"); - LanguageRegistry.addName(ancientStaff, "Ancient Staff"); - LanguageRegistry.addName(ancientStaffHandle, "Ancient Staff Handle"); - LanguageRegistry.addName(ancientStaffPole, "Ancient Staff Pole"); - LanguageRegistry.addName(ancientStaffTopper, "Ancient Staff Topper"); - LanguageRegistry.addName(enderporter, "Enderporter"); - LanguageRegistry.addName(amethyst, "Amethyst"); - LanguageRegistry.addName(bopDisc, "Music Disc"); - LanguageRegistry.addName(bopDiscMud, "Music Disc"); - LanguageRegistry.addName(pickaxeAmethyst, "Amethyst Pickaxe"); - LanguageRegistry.addName(axeAmethyst, "Amethyst Axe"); - LanguageRegistry.addName(shovelAmethyst, "Amethyst Shovel"); - LanguageRegistry.addName(swordAmethyst, "Amethyst Sword"); - LanguageRegistry.addName(hoeAmethyst, "Amethyst Hoe"); - LanguageRegistry.addName(helmetAmethyst, "Amethyst Helmet"); - LanguageRegistry.addName(chestplateAmethyst, "Amethyst Chestplate"); - LanguageRegistry.addName(leggingsAmethyst, "Amethyst Leggings"); - LanguageRegistry.addName(bootsAmethyst, "Amethyst Boots"); + LanguageRegistry.addName(Items.shroomPowder.get(), "Shroom Powder"); + LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 0), "Mud Ball"); + LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 3), "Mud Brick"); + LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 2), "Amethyst"); + LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 1), "Pile of Ashes"); + + LanguageRegistry.addName(Items.pickaxeMud.get(), "Muddy Pickaxe"); + LanguageRegistry.addName(Items.axeMud.get(), "Muddy Axe"); + LanguageRegistry.addName(Items.shovelMud.get(), "Muddy Shovel"); + LanguageRegistry.addName(Items.swordMud.get(), "Muddy Sword"); + LanguageRegistry.addName(Items.hoeMud.get(), "Muddy Hoe"); + LanguageRegistry.addName(Items.helmetMud.get(), "Muddy Helmet"); + LanguageRegistry.addName(Items.chestplateMud.get(), "Muddy Chestplate"); + LanguageRegistry.addName(Items.leggingsMud.get(), "Muddy Leggings"); + LanguageRegistry.addName(Items.bootsMud.get(), "Muddy Boots"); + + LanguageRegistry.addName(new ItemStack(Items.ancientStaff.get(), 1, 0), "Ancient Staff"); + LanguageRegistry.addName(new ItemStack(Items.ancientStaff.get(), 1, 1), "Ancient Staff Handle"); + LanguageRegistry.addName(new ItemStack(Items.ancientStaff.get(), 1, 2), "Ancient Staff Pole"); + LanguageRegistry.addName(new ItemStack(Items.ancientStaff.get(), 1, 3), "Ancient Staff Topper"); + + LanguageRegistry.addName(Items.enderporter.get(), "Enderporter"); + + LanguageRegistry.addName(Items.bopDisc.get(), "Music Disc"); + LanguageRegistry.addName(Items.bopDiscMud.get(), "Music Disc"); + + LanguageRegistry.addName(Items.pickaxeAmethyst.get(), "Amethyst Pickaxe"); + LanguageRegistry.addName(Items.axeAmethyst.get(), "Amethyst Axe"); + LanguageRegistry.addName(Items.shovelAmethyst.get(), "Amethyst Shovel"); + LanguageRegistry.addName(Items.swordAmethyst.get(), "Amethyst Sword"); + LanguageRegistry.addName(Items.hoeAmethyst.get(), "Amethyst Hoe"); + LanguageRegistry.addName(Items.helmetAmethyst.get(), "Amethyst Helmet"); + LanguageRegistry.addName(Items.chestplateAmethyst.get(), "Amethyst Chestplate"); + LanguageRegistry.addName(Items.leggingsAmethyst.get(), "Amethyst Leggings"); + LanguageRegistry.addName(Items.bootsAmethyst.get(), "Amethyst Boots"); } } diff --git a/src/minecraft/biomesoplenty/configuration/BOPVanillaCompat.java b/src/minecraft/biomesoplenty/configuration/BOPVanillaCompat.java index db888c268..2b117bc0a 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPVanillaCompat.java +++ b/src/minecraft/biomesoplenty/configuration/BOPVanillaCompat.java @@ -1,6 +1,7 @@ package biomesoplenty.configuration; import biomesoplenty.api.Blocks; +import biomesoplenty.api.Items; import biomesoplenty.items.projectiles.DispenserBehaviorMudball; import net.minecraft.block.BlockDispenser; import net.minecraft.item.Item; @@ -13,7 +14,7 @@ public class BOPVanillaCompat { public static void init() { // Dispenser behavior for mud balls - BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItems.mudBall, new DispenserBehaviorMudball()); + BlockDispenser.dispenseBehaviorRegistry.putObject(new ItemStack(Items.miscItems.get(), 1, 0), new DispenserBehaviorMudball()); ChestGenHooks dungeon; ChestGenHooks mineshaft; @@ -27,13 +28,13 @@ public class BOPVanillaCompat { strongholdCrossing = ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING); village = ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH); - dungeon.addItem(new WeightedRandomChestContent(new ItemStack(BOPItems.bopDisc), 1, 1, 2)); + dungeon.addItem(new WeightedRandomChestContent(new ItemStack(Items.bopDisc.get()), 1, 1, 2)); dungeon.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.moss.get()), 2, 8, 50)); dungeon.addItem(new WeightedRandomChestContent(new ItemStack(Item.dyePowder, 1, 2), 4, 12, 75)); - mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(BOPItems.ashes), 2, 8, 25)); + mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Items.miscItems.get(), 1, 1), 2, 8, 25)); mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.plants.get(),1,5), 4, 6, 15)); - mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(BOPItems.mudBall), 2, 8, 10)); + mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Items.miscItems.get(), 1, 0), 2, 8, 10)); mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Item.dyePowder, 1, 3), 4, 12, 75)); strongholdCorridor.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.moss.get()), 2, 8, 50)); @@ -44,8 +45,8 @@ public class BOPVanillaCompat { strongholdCrossing.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.flowers.get(),1,3), 1, 4, 25)); strongholdCrossing.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.flowers.get(),1,2), 1, 4, 25)); -// village.addItem(new WeightedRandomChestContent(new ItemStack(BOPItems.barleyItem), 4, 10, 75)); - village.addItem(new WeightedRandomChestContent(new ItemStack(BOPItems.shroomPowder), 1, 5, 50)); + village.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.plants.get(), 1, 6), 4, 10, 75)); + village.addItem(new WeightedRandomChestContent(new ItemStack(Items.shroomPowder.get()), 1, 5, 50)); village.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.plants.get(),1,5), 2, 6, 25)); village.addItem(new WeightedRandomChestContent(new ItemStack(Item.dyePowder, 1, 2), 4, 12, 75)); village.addItem(new WeightedRandomChestContent(new ItemStack(Item.dyePowder, 1, 3), 4, 12, 75)); diff --git a/src/minecraft/biomesoplenty/helpers/AchievementHelper.java b/src/minecraft/biomesoplenty/helpers/AchievementHelper.java index 8c0cc0e35..b23f28f86 100644 --- a/src/minecraft/biomesoplenty/helpers/AchievementHelper.java +++ b/src/minecraft/biomesoplenty/helpers/AchievementHelper.java @@ -8,8 +8,8 @@ import net.minecraftforge.common.AchievementPage; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import biomesoplenty.api.Blocks; +import biomesoplenty.api.Items; import biomesoplenty.configuration.BOPConfiguration; -import biomesoplenty.configuration.BOPItems; import cpw.mods.fml.common.registry.LanguageRegistry; public class AchievementHelper @@ -39,10 +39,10 @@ public class AchievementHelper achFlower = (new Achievement(3057, "achFlower", 0, 0, Block.plantRed, null)).registerAchievement(); achRedRock = (new Achievement(3058, "achRedRock", -1, 2, new ItemStack(Blocks.redRock.get(),1,0), achFlower)).registerAchievement(); achThorn = (new Achievement(3059, "achThorn", 2, 1, new ItemStack(Blocks.plants.get(),1,5), achFlower)).registerAchievement(); - achAsh = (new Achievement(3060, "achAsh", 1, 3, BOPItems.ashes, achFlower)).registerAchievement(); + achAsh = (new Achievement(3060, "achAsh", 1, 3, new ItemStack(Items.miscItems.get(), 1, 1), achFlower)).registerAchievement(); achOrigin = (new Achievement(3061, "achOrigin", 0, 5, Blocks.originGrass.get(), achFlower)).setSpecial().registerAchievement(); achPromised = (new Achievement(3062, "achPromised", 0, -5, Blocks.holyGrass.get(), achFlower)).setSpecial().registerAchievement(); - achMud = (new Achievement(3063, "achMud", -2, -1, BOPItems.mudBall, achFlower)).registerAchievement(); + achMud = (new Achievement(3063, "achMud", -2, -1, new ItemStack(Items.miscItems.get(), 1, 0), achFlower)).registerAchievement(); achShroom = (new Achievement(3064, "achShroom", 1, -2, new ItemStack(Blocks.flowers.get(),1,10), achFlower)).registerAchievement(); achBarley = (new Achievement(3065, "achBarley", -2, 4, new ItemStack(Blocks.plants.get(),1,6), achFlower)).registerAchievement(); achMoss = (new Achievement(3066, "achMoss", -1, -3, Blocks.moss.get(), achFlower)).registerAchievement(); @@ -80,7 +80,7 @@ public class AchievementHelper { player.addStat(achThorn, 1); } - if (item.itemID == BOPItems.ashes.itemID) + if (item.itemID == Items.miscItems.get().itemID && item.getItemDamage() == 1) { player.addStat(achAsh, 1); } @@ -92,7 +92,7 @@ public class AchievementHelper { player.addStat(achPromised, 1); } - if (item.itemID == BOPItems.mudBall.itemID) + if (item.itemID == Items.miscItems.get().itemID && item.getItemDamage() == 0) { player.addStat(achMud, 1); } diff --git a/src/minecraft/biomesoplenty/helpers/FurnaceFuel.java b/src/minecraft/biomesoplenty/helpers/FurnaceFuel.java index be416fe89..a82d676c7 100644 --- a/src/minecraft/biomesoplenty/helpers/FurnaceFuel.java +++ b/src/minecraft/biomesoplenty/helpers/FurnaceFuel.java @@ -2,8 +2,7 @@ package biomesoplenty.helpers; import net.minecraft.item.ItemStack; import biomesoplenty.api.Blocks; -import biomesoplenty.configuration.BOPBlocks; -import biomesoplenty.configuration.BOPItems; +import biomesoplenty.api.Items; import cpw.mods.fml.common.IFuelHandler; public class FurnaceFuel implements IFuelHandler { @@ -72,7 +71,7 @@ public class FurnaceFuel implements IFuelHandler { { return 300; } - if(par1 == BOPItems.ashes.itemID) + if(par1 == Items.miscItems.get().itemID && par2 == 1) { return 400; } diff --git a/src/minecraft/biomesoplenty/items/ItemBOP.java b/src/minecraft/biomesoplenty/items/ItemBOP.java index f79e5bf13..73c5f9631 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOP.java +++ b/src/minecraft/biomesoplenty/items/ItemBOP.java @@ -1,44 +1,66 @@ package biomesoplenty.items; -import biomesoplenty.configuration.BOPItems; -import biomesoplenty.items.projectiles.EntityMudball; +import java.util.List; import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; import net.minecraft.world.World; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.items.projectiles.EntityMudball; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemBOP extends Item { - public int boptextureid = 0; + private static String[] items = {"mudball", "ash", "amethyst", "mudbrick"}; + @SideOnly(Side.CLIENT) + private Icon[] textures; - public ItemBOP(int id, int texture) + public ItemBOP(int id) { super(id); - boptextureid = texture; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public void registerIcons(IconRegister iconRegister) { - 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"); } + textures = new Icon[items.length]; + + for (int i = 0; i < items.length; ++i) + textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+items[i]); } + + @Override + public String getUnlocalizedName(ItemStack itemStack) + { + return items[itemStack.getItemDamage()]; + } + + @Override + public Icon getIconFromDamage(int meta) + { + return textures[meta]; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void getSubItems(int itemId, CreativeTabs creativeTab, List subTypes) + { + for(int meta = 0; meta < items.length; ++meta) + subTypes.add(new ItemStack(itemId, 1, meta)); + } - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onItemRightClick(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (par1ItemStack.isItemEqual(new ItemStack(BOPItems.mudBall))) + if (itemStack.getItemDamage() == 0) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - --par1ItemStack.stackSize; + --itemStack.stackSize; } par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -48,6 +70,6 @@ public class ItemBOP extends Item par2World.spawnEntityInWorld(new EntityMudball(par2World, par3EntityPlayer)); } } - return par1ItemStack; + return itemStack; } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPAncientStaff.java b/src/minecraft/biomesoplenty/items/ItemBOPAncientStaff.java new file mode 100644 index 000000000..3a1c16777 --- /dev/null +++ b/src/minecraft/biomesoplenty/items/ItemBOPAncientStaff.java @@ -0,0 +1,194 @@ +package biomesoplenty.items; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Blocks; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.world.World; + +public class ItemBOPAncientStaff extends Item +{ + private static String[] parts = {"ancientstaff", "staffhandle", "staffpole", "stafftopper"}; + @SideOnly(Side.CLIENT) + private Icon[] textures; + + public ItemBOPAncientStaff(int par1) + { + super(par1); + this.maxStackSize = 1; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + } + + @Override + public boolean hasEffect(ItemStack itemStack) + { + if (itemStack.getItemDamage() == 0) + return true; + else + return false; + } + + @Override + public void registerIcons(IconRegister iconRegister) + { + textures = new Icon[parts.length]; + + for (int i = 0; i < parts.length; ++i) + textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+parts[i]); + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) + { + return parts[itemStack.getItemDamage()]; + } + + @Override + public Icon getIconFromDamage(int meta) + { + return textures[meta]; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void getSubItems(int itemId, CreativeTabs creativeTab, List subTypes) + { + for(int meta = 0; meta < parts.length; ++meta) + subTypes.add(new ItemStack(itemId, 1, meta)); + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (par3EntityPlayer.dimension == 0) + { + + if (par2World.getBlockId(0, 64 - 32, 0) != Blocks.promisedPortal.get().blockID) + { + + if (!par3EntityPlayer.worldObj.isRemote) + { + par3EntityPlayer.addChatMessage("\u00a75A gateway to the \u00a76\u00a7l\u00a7nPromised Land\u00a75 has been buried at the origin of this world."); + } + + int var99 = 32; + + par2World.setBlock(-1, 62 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(0, 62 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(1, 62 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(1, 62 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(1, 62 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(0, 62 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(-1, 62 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(-1, 62 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(0, 62 - var99, 0, Block.whiteStone.blockID); + + par2World.setBlock(-1, 63 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(0, 63 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(1, 63 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(2, 63 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(2, 63 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(2, 63 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(1, 63 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(0, 63 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(-1, 63 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(-2, 63 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(-2, 63 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(-2, 63 - var99, 1, Block.whiteStone.blockID); + + par2World.setBlock(-1, 64 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(0, 64 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(1, 64 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(2, 64 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(2, 64 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(2, 64 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(1, 64 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(0, 64 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(-1, 64 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(-2, 64 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(-2, 64 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(-2, 64 - var99, 1, Block.whiteStone.blockID); + + par2World.setBlock(-1, 65 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(0, 65 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(1, 65 - var99, 2, Block.whiteStone.blockID); + par2World.setBlock(2, 65 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(2, 65 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(2, 65 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(1, 65 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(0, 65 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(-1, 65 - var99, -2, Block.whiteStone.blockID); + par2World.setBlock(-2, 65 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(-2, 65 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(-2, 65 - var99, 1, Block.whiteStone.blockID); + + par2World.setBlock(-1, 66 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(0, 66 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(1, 66 - var99, 1, Block.whiteStone.blockID); + par2World.setBlock(1, 66 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(1, 66 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(0, 66 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(-1, 66 - var99, -1, Block.whiteStone.blockID); + par2World.setBlock(-1, 66 - var99, 0, Block.whiteStone.blockID); + par2World.setBlock(0, 66 - var99, 0, Block.whiteStone.blockID); + + par2World.setBlock(-1, 63 - var99, 1, 0); + par2World.setBlock(0, 63 - var99, 1, 0); + par2World.setBlock(1, 63 - var99, 1, 0); + par2World.setBlock(1, 63 - var99, 0, 0); + par2World.setBlock(1, 63 - var99, -1, 0); + par2World.setBlock(0, 63 - var99, -1, 0); + par2World.setBlock(-1, 63 - var99, -1, 0); + par2World.setBlock(-1, 63 - var99, 0, 0); + par2World.setBlock(0, 63 - var99, 0, 0); + + par2World.setBlock(-1, 64 - var99, 1, 0); + par2World.setBlock(0, 64 - var99, 1, 0); + par2World.setBlock(1, 64 - var99, 1, 0); + par2World.setBlock(1, 64 - var99, 0, 0); + par2World.setBlock(1, 64 - var99, -1, 0); + par2World.setBlock(0, 64 - var99, -1, 0); + par2World.setBlock(-1, 64 - var99, -1, 0); + par2World.setBlock(-1, 64 - var99, 0, 0); + + par2World.setBlock(-1, 65 - var99, 1, 0); + par2World.setBlock(0, 65 - var99, 1, 0); + par2World.setBlock(1, 65 - var99, 1, 0); + par2World.setBlock(1, 65 - var99, 0, 0); + par2World.setBlock(1, 65 - var99, -1, 0); + par2World.setBlock(0, 65 - var99, -1, 0); + par2World.setBlock(-1, 65 - var99, -1, 0); + par2World.setBlock(-1, 65 - var99, 0, 0); + par2World.setBlock(0, 65 - var99, 0, 0); + + par2World.setBlock(0, 64 - var99, 0, Blocks.promisedPortal.get().blockID); + + par2World.setBlock(-2, 64 - var99, 2, 0); + par2World.setBlock(2, 64 - var99, 2, 0); + par2World.setBlock(2, 64 - var99, -2, 0); + par2World.setBlock(-2, 64 - var99, -2, 0); + + par2World.setBlock(-2, 65 - var99, 2, 0); + par2World.setBlock(2, 65 - var99, 2, 0); + par2World.setBlock(2, 65 - var99, -2, 0); + par2World.setBlock(-2, 65 - var99, -2, 0); + + par2World.setBlock(-2, 66 - var99, 2, 0); + par2World.setBlock(2, 66 - var99, 2, 0); + par2World.setBlock(2, 66 - var99, -2, 0); + par2World.setBlock(-2, 66 - var99, -2, 0); + } + } + + return par1ItemStack; + } +} diff --git a/src/minecraft/biomesoplenty/items/ItemBOPAxe.java b/src/minecraft/biomesoplenty/items/ItemBOPAxe.java index 5dd810769..e4b464823 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPAxe.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPAxe.java @@ -1,5 +1,6 @@ package biomesoplenty.items; +import biomesoplenty.BiomesOPlenty; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.ItemAxe; @@ -12,6 +13,7 @@ public class ItemBOPAxe extends ItemAxe { super(par1, par2); TextureID = texture; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public void registerIcons(IconRegister iconRegister) diff --git a/src/minecraft/biomesoplenty/items/ItemBamboo.java b/src/minecraft/biomesoplenty/items/ItemBOPBamboo.java similarity index 97% rename from src/minecraft/biomesoplenty/items/ItemBamboo.java rename to src/minecraft/biomesoplenty/items/ItemBOPBamboo.java index c8dc6bacc..84e916894 100644 --- a/src/minecraft/biomesoplenty/items/ItemBamboo.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPBamboo.java @@ -4,9 +4,9 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.ItemBlock; import net.minecraft.util.Icon; -public class ItemBamboo extends ItemBlock +public class ItemBOPBamboo extends ItemBlock { - public ItemBamboo(int par1) + public ItemBOPBamboo(int par1) { super(par1); } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPHoe.java b/src/minecraft/biomesoplenty/items/ItemBOPHoe.java index a7077d3a8..a41e074e5 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPHoe.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPHoe.java @@ -1,5 +1,6 @@ package biomesoplenty.items; +import biomesoplenty.BiomesOPlenty; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.ItemHoe; @@ -12,6 +13,7 @@ public class ItemBOPHoe extends ItemHoe { super(par1, par2); TextureID = texture; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public void registerIcons(IconRegister iconRegister) diff --git a/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java b/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java index 835a2701e..dfeb6a7c1 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPPickaxe.java @@ -1,5 +1,6 @@ package biomesoplenty.items; +import biomesoplenty.BiomesOPlenty; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.ItemPickaxe; @@ -12,6 +13,7 @@ public class ItemBOPPickaxe extends ItemPickaxe { super(par1, par2); TextureID = texture; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public void registerIcons(IconRegister iconRegister) diff --git a/src/minecraft/biomesoplenty/items/ItemBOPRecord.java b/src/minecraft/biomesoplenty/items/ItemBOPRecord.java index 5c46abcd6..e0b717b37 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPRecord.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPRecord.java @@ -32,6 +32,7 @@ public class ItemBOPRecord extends ItemRecord super(par1, par2Str); this.recordName = par2Str; this.maxStackSize = 1; + setUnlocalizedName("bopDisc"); this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); records.put(par2Str, this); } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java b/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java index 8032a0b3c..b49ef0b8c 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPRecordMud.java @@ -32,6 +32,7 @@ public class ItemBOPRecordMud extends ItemRecord super(par1, par2Str); this.recordName = par2Str; this.maxStackSize = 1; + setUnlocalizedName("bopDiscMud"); this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); records.put(par2Str, this); } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPSpade.java b/src/minecraft/biomesoplenty/items/ItemBOPSpade.java index a614e5f14..6e49371ff 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPSpade.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPSpade.java @@ -1,5 +1,6 @@ package biomesoplenty.items; +import biomesoplenty.BiomesOPlenty; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.ItemSpade; @@ -12,6 +13,7 @@ public class ItemBOPSpade extends ItemSpade { super(par1, par2); TextureID = texture; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public void registerIcons(IconRegister iconRegister) diff --git a/src/minecraft/biomesoplenty/items/ItemBOPSword.java b/src/minecraft/biomesoplenty/items/ItemBOPSword.java index f8a4d22fa..ca225d03d 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPSword.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPSword.java @@ -1,5 +1,6 @@ package biomesoplenty.items; +import biomesoplenty.BiomesOPlenty; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.ItemSword; @@ -12,6 +13,7 @@ public class ItemBOPSword extends ItemSword { super(par1, par2); TextureID = texture; + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public void registerIcons(IconRegister iconRegister) diff --git a/src/minecraft/biomesoplenty/items/ItemEnderporter.java b/src/minecraft/biomesoplenty/items/ItemEnderporter.java index 53f9cfd3d..051aa5437 100644 --- a/src/minecraft/biomesoplenty/items/ItemEnderporter.java +++ b/src/minecraft/biomesoplenty/items/ItemEnderporter.java @@ -1,5 +1,6 @@ package biomesoplenty.items; +import biomesoplenty.BiomesOPlenty; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -16,6 +17,8 @@ public class ItemEnderporter extends Item super(par1); this.maxStackSize = 1; this.setMaxDamage(9); + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + setUnlocalizedName("enderporter"); } public void registerIcons(IconRegister iconRegister) diff --git a/src/minecraft/biomesoplenty/items/ItemShroomPowder.java b/src/minecraft/biomesoplenty/items/ItemShroomPowder.java index d9336b898..f095f50ec 100644 --- a/src/minecraft/biomesoplenty/items/ItemShroomPowder.java +++ b/src/minecraft/biomesoplenty/items/ItemShroomPowder.java @@ -1,13 +1,18 @@ package biomesoplenty.items; +import biomesoplenty.BiomesOPlenty; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.ItemFood; +import net.minecraft.potion.Potion; public class ItemShroomPowder extends ItemFood { public ItemShroomPowder(int par1, int par2, float par3, boolean par4) { super(par1, par2, par3, par4); + setPotionEffect(Potion.confusion.id, 30, 0, 0.6F); + setAlwaysEdible().setUnlocalizedName("shroomPowder"); + setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); } public void registerIcons(IconRegister iconRegister) diff --git a/src/minecraft/biomesoplenty/items/ItemBarley.java b/unused code/biomesoplenty/items/ItemBarley.java similarity index 100% rename from src/minecraft/biomesoplenty/items/ItemBarley.java rename to unused code/biomesoplenty/items/ItemBarley.java diff --git a/src/minecraft/biomesoplenty/items/ItemBush.java b/unused code/biomesoplenty/items/ItemBush.java similarity index 100% rename from src/minecraft/biomesoplenty/items/ItemBush.java rename to unused code/biomesoplenty/items/ItemBush.java diff --git a/src/minecraft/biomesoplenty/items/ItemCattail.java b/unused code/biomesoplenty/items/ItemCattail.java similarity index 100% rename from src/minecraft/biomesoplenty/items/ItemCattail.java rename to unused code/biomesoplenty/items/ItemCattail.java diff --git a/src/minecraft/biomesoplenty/items/ItemMediumGrass.java b/unused code/biomesoplenty/items/ItemMediumGrass.java similarity index 100% rename from src/minecraft/biomesoplenty/items/ItemMediumGrass.java rename to unused code/biomesoplenty/items/ItemMediumGrass.java diff --git a/src/minecraft/biomesoplenty/items/ItemShortGrass.java b/unused code/biomesoplenty/items/ItemShortGrass.java similarity index 100% rename from src/minecraft/biomesoplenty/items/ItemShortGrass.java rename to unused code/biomesoplenty/items/ItemShortGrass.java diff --git a/src/minecraft/biomesoplenty/items/ItemSprout.java b/unused code/biomesoplenty/items/ItemSprout.java similarity index 100% rename from src/minecraft/biomesoplenty/items/ItemSprout.java rename to unused code/biomesoplenty/items/ItemSprout.java