diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java index fb1c79839..0f9015bb0 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityBreaker; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -22,8 +21,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockBreaker extends BlockContainerBase implements INameableItem{ private IIcon frontIcon; @@ -116,13 +113,6 @@ public class BlockBreaker extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java index 4abb680db..4a6076f24 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java @@ -3,10 +3,8 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityCanolaPress; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -20,8 +18,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockCanolaPress extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -93,14 +89,6 @@ public class BlockCanolaPress extends BlockContainerBase implements INameableIte return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - BlockUtil.addPowerUsageInfo(list, ConfigIntValues.PRESS_ENERGY_USED.getValue()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java index 5794dd3b8..defb64867 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java @@ -3,10 +3,8 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityCoalGenerator; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -20,7 +18,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; import java.util.Random; public class BlockCoalGenerator extends BlockContainerBase implements INameableItem{ @@ -109,14 +106,6 @@ public class BlockCoalGenerator extends BlockContainerBase implements INameableI return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - BlockUtil.addPowerProductionInfo(list, ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java index 182be8754..695f57cfb 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java @@ -3,11 +3,9 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityCoffeeMachine; import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -23,8 +21,6 @@ import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import java.util.List; - public class BlockCoffeeMachine extends BlockContainerBase implements INameableItem{ public BlockCoffeeMachine(){ @@ -121,14 +117,6 @@ public class BlockCoffeeMachine extends BlockContainerBase implements INameableI return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 5, ""); - BlockUtil.addPowerUsageInfo(list, ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java index 47860efcc..0eeb4396c 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java @@ -3,7 +3,6 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; @@ -144,13 +143,6 @@ public class BlockColoredLamp extends Block implements INameableItem{ return InitBlocks.blockColoredLamp.getUnlocalizedName() + allLampTypes[stack.getItemDamage()].getName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(InitBlocks.blockColoredLamp, list, 3, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java index 2c31aaec7..16b5f578a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java @@ -8,7 +8,6 @@ import ellpeck.actuallyadditions.items.ItemMisc; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; import ellpeck.actuallyadditions.tile.TileEntityCompost; import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -145,13 +144,6 @@ public class BlockCompost extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java index a2db8e08a..e0a2c9efb 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityDropper; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -22,8 +21,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockDropper extends BlockContainerBase implements INameableItem{ private IIcon frontIcon; @@ -113,13 +110,6 @@ public class BlockDropper extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java index 6f6a73026..7f832b53a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java @@ -6,7 +6,6 @@ import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityEnergizer; import ellpeck.actuallyadditions.tile.TileEntityEnervator; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -20,8 +19,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockEnergizer extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -103,13 +100,6 @@ public class BlockEnergizer extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 2, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java index 5cc2cb7a0..6582f20d7 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityFeeder; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -19,8 +18,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockFeeder extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -92,13 +89,6 @@ public class BlockFeeder extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java index a21bf2084..a657c5933 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityFermentingBarrel; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -19,8 +18,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockFermentingBarrel extends BlockContainerBase implements INameableItem{ private IIcon iconTop; @@ -92,13 +89,6 @@ public class BlockFermentingBarrel extends BlockContainerBase implements INameab return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java index e5e341dab..b55d5b4e0 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java @@ -4,12 +4,10 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.tile.TileEntityFishingNet; import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; @@ -18,8 +16,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockFishingNet extends BlockContainerBase implements INameableItem{ public BlockFishingNet(){ @@ -88,13 +84,6 @@ public class BlockFishingNet extends BlockContainerBase implements INameableItem return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java index 3c78bdfd6..5a87a88d2 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityFluidCollector; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -22,8 +21,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockFluidCollector extends BlockContainerBase implements INameableItem{ private IIcon frontIcon; @@ -116,13 +113,6 @@ public class BlockFluidCollector extends BlockContainerBase implements INameable return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java index abd6dbabd..f3317bb6a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java @@ -2,13 +2,11 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -18,8 +16,6 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; -import java.util.List; - public class BlockFluidFlowing extends BlockFluidClassic implements INameableItem{ private String name; @@ -83,13 +79,6 @@ public class BlockFluidFlowing extends BlockFluidClassic implements INameableIte return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java index abead2a1f..0e0718612 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java @@ -3,10 +3,8 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityFurnaceDouble; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -23,7 +21,6 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; import java.util.Random; public class BlockFurnaceDouble extends BlockContainerBase implements INameableItem{ @@ -163,14 +160,6 @@ public class BlockFurnaceDouble extends BlockContainerBase implements INameableI return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - BlockUtil.addPowerUsageInfo(list, ConfigIntValues.FURNACE_ENERGY_USED.getValue()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java index 6291985b7..db83b87fe 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java @@ -2,15 +2,12 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.tile.TileEntityFurnaceSolar; import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; @@ -19,8 +16,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockFurnaceSolar extends BlockContainerBase implements INameableItem{ public BlockFurnaceSolar(){ @@ -89,14 +84,6 @@ public class BlockFurnaceSolar extends BlockContainerBase implements INameableIt return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - BlockUtil.addPowerProductionInfo(list, ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue()); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java index 97a4d8271..9ce018124 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java @@ -2,20 +2,16 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.List; - public class BlockGeneric extends Block implements INameableItem{ public String name; @@ -66,13 +62,6 @@ public class BlockGeneric extends Block implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java index aea574236..526cb8c8b 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityGiantChest; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -19,8 +18,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockGiantChest extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -93,14 +90,6 @@ public class BlockGiantChest extends BlockContainerBase implements INameableItem public String getUnlocalizedName(ItemStack stack){ return this.getUnlocalizedName(); } - - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java index 5cfdd68c4..b46535899 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java @@ -3,13 +3,11 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.tile.TileEntityGreenhouseGlass; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -19,8 +17,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockGreenhouseGlass extends BlockContainerBase implements INameableItem{ public BlockGreenhouseGlass(){ @@ -96,13 +92,6 @@ public class BlockGreenhouseGlass extends BlockContainerBase implements INameabl return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java index 3403ca517..6c094db8f 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java @@ -3,10 +3,8 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityGrinder; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -21,7 +19,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; import java.util.Random; public class BlockGrinder extends BlockContainerBase implements INameableItem{ @@ -126,14 +123,6 @@ public class BlockGrinder extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, ((BlockGrinder)theBlock).isDouble ? 3 : 4, ""); - BlockUtil.addPowerUsageInfo(list, ((BlockGrinder)theBlock).isDouble ? ConfigIntValues.GRINDER_DOUBLE_ENERGY_USED.getValue() : ConfigIntValues.GRINDER_ENERGY_USED.getValue()); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java index 6abf8654e..088aa127e 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java @@ -2,15 +2,12 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.tile.TileEntityHeatCollector; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -18,8 +15,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockHeatCollector extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -77,14 +72,6 @@ public class BlockHeatCollector extends BlockContainerBase implements INameableI return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 3, ""); - BlockUtil.addPowerProductionInfo(list, ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java index a989d93d8..f119cd545 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java @@ -5,7 +5,9 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityInputter; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -17,7 +19,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; import java.util.Random; public class BlockInputter extends BlockContainerBase implements INameableItem{ @@ -110,21 +111,6 @@ public class BlockInputter extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc.1")); - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc.2", StringUtil.OBFUSCATED, StringUtil.LIGHT_GRAY)); - for(int i = 3; i <= 7; i++){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockInputter.desc."+i)); - } - if((((BlockInputter)theBlock).isAdvanced)) list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+((INameableItem)theBlock).getName()+".desc")); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java index 0c3ebd36d..9b6a580c3 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java @@ -3,10 +3,8 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityItemRepairer; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -21,8 +19,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockItemRepairer extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -104,14 +100,6 @@ public class BlockItemRepairer extends BlockContainerBase implements INameableIt return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - BlockUtil.addPowerUsageInfo(list, ConfigIntValues.REPAIRER_ENERGY_USED.getValue()); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java index 34bb14370..482df4587 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java @@ -2,13 +2,15 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.WorldPos; +import ellpeck.actuallyadditions.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -17,8 +19,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import java.util.List; - public class BlockLampPowerer extends Block implements INameableItem{ private IIcon frontIcon; @@ -111,13 +111,6 @@ public class BlockLampPowerer extends Block implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java index 16b558843..0305e6efe 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java @@ -2,9 +2,10 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.tile.TileEntityLavaFactoryController; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -17,8 +18,6 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockLavaFactoryController extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -93,16 +92,6 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IN return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 3, ""); - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " +ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue()+ " RF/B"); - } - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java index 6a1c3adcc..f3d5258d0 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java @@ -3,14 +3,12 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; @@ -83,13 +81,6 @@ public class BlockMisc extends Block implements INameableItem{ return this.getUnlocalizedName() + (stack.getItemDamage() >= allMiscBlocks.length ? " ERROR!" : allMiscBlocks[stack.getItemDamage()].getName()); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(stack.getItemDamage() < allMiscBlocks.length) BlockUtil.addInformation(theBlock, list, 1, allMiscBlocks[stack.getItemDamage()].getName()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java index 13e7a92bf..79868d346 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java @@ -3,10 +3,8 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityOilGenerator; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -20,7 +18,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; import java.util.Random; public class BlockOilGenerator extends BlockContainerBase implements INameableItem{ @@ -109,14 +106,6 @@ public class BlockOilGenerator extends BlockContainerBase implements INameableIt return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - BlockUtil.addPowerProductionInfo(list, ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOreMagnet.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOreMagnet.java index de33871ec..603a763a3 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOreMagnet.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOreMagnet.java @@ -3,10 +3,10 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntityOreMagnet; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -18,8 +18,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockOreMagnet extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -94,17 +92,6 @@ public class BlockOreMagnet extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - BlockUtil.addInformation(theBlock, list, 3, ""); - BlockUtil.addPowerUsageInfo(list, ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue()); - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc")+" "+ConfigIntValues.ORE_MAGNET_OIL_USE.getValue()+" mB "+StringUtil.localize(InitBlocks.fluidOil.getUnlocalizedName())+"/"+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".block.desc")); - } - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java index 834b010e3..89d2c6339 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java @@ -7,7 +7,9 @@ import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.tile.IPhantomTile; import ellpeck.actuallyadditions.tile.TileEntityPhantomPlacer; import ellpeck.actuallyadditions.tile.TileEntityPhantomface; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,8 +24,6 @@ import net.minecraft.util.IIcon; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import java.util.List; - public class BlockPhantom extends BlockContainerBase implements INameableItem{ public enum Type{ @@ -150,20 +150,6 @@ public class BlockPhantom extends BlockContainerBase implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 2, ""); - if(KeyUtil.isShiftPressed()){ - if(((BlockPhantom)this.theBlock).type == Type.LIQUIFACE){ - list.add(StringUtil.ORANGE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.3")); - list.add(StringUtil.ORANGE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomLiquiface.desc.4")); - } - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".blockPhantomRange.desc") + ": " + ((BlockPhantom)theBlock).range); - } - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java index 0edf72ddb..7f707c3f7 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java @@ -4,12 +4,10 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.tile.TileEntityPhantomBooster; import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; @@ -18,8 +16,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class BlockPhantomBooster extends BlockContainerBase implements INameableItem{ public BlockPhantomBooster(){ @@ -90,13 +86,6 @@ public class BlockPhantomBooster extends BlockContainerBase implements INameable return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 2, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java index e719beeeb..367372024 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java @@ -2,13 +2,11 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockCrops; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; @@ -18,7 +16,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; -import java.util.List; import java.util.Random; public class BlockPlant extends BlockCrops implements INameableItem{ @@ -117,13 +114,6 @@ public class BlockPlant extends BlockCrops implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java index 1216e26c3..f88b91ac9 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java @@ -2,7 +2,6 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -106,13 +105,6 @@ public class BlockSlabs extends Block implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java index 3c3110a4e..f1bce986c 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java @@ -6,7 +6,6 @@ import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.tile.TileEntitySmileyCloud; import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -23,8 +22,6 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockSmileyCloud extends BlockContainerBase implements INameableItem{ public BlockSmileyCloud(){ @@ -137,13 +134,6 @@ public class BlockSmileyCloud extends BlockContainerBase implements INameableIte return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java index 928b0991d..9534dc3dd 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java @@ -1,18 +1,12 @@ package ellpeck.actuallyadditions.blocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import java.util.List; - public class BlockStair extends BlockStairs implements INameableItem{ private String name; @@ -49,13 +43,6 @@ public class BlockStair extends BlockStairs implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 1, ""); - } - @Override public int getMetadata(int meta){ return meta; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java index a64857ecf..7a0343473 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.achievement.TheAchievements; import ellpeck.actuallyadditions.recipe.TreasureChestHandler; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -24,7 +23,6 @@ import net.minecraft.util.WeightedRandom; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; import java.util.Random; public class BlockTreasureChest extends Block implements INameableItem{ @@ -158,13 +156,6 @@ public class BlockTreasureChest extends Block implements INameableItem{ return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - BlockUtil.addInformation(theBlock, list, 2, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java index b7ed60bf1..c520adffd 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java @@ -3,14 +3,12 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.blocks.metalists.TheWildPlants; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; @@ -98,13 +96,6 @@ public class BlockWildPlant extends BlockBush implements INameableItem{ return this.getUnlocalizedName() + (stack.getItemDamage() >= allWildPlants.length ? " ERROR!" : allWildPlants[stack.getItemDamage()].getName()); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(stack.getItemDamage() < allWildPlants.length) BlockUtil.addInformation(theBlock, list, 1, allWildPlants[stack.getItemDamage()].getName()); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java index 2f6c87ba4..5c70ea8de 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java @@ -7,7 +7,6 @@ import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import ellpeck.actuallyadditions.tile.TileEntityXPSolidifier; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; @@ -25,8 +24,6 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import java.util.List; - public class BlockXPSolidifier extends BlockContainerBase implements INameableItem{ private IIcon topIcon; @@ -147,13 +144,6 @@ public class BlockXPSolidifier extends BlockContainerBase implements INameableIt return this.getUnlocalizedName(); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - BlockUtil.addInformation(theBlock, list, 2, ""); - } - @Override public int getMetadata(int damage){ return damage; diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java index e803c4c98..b4b042fc7 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java @@ -16,20 +16,36 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; public class FoodCrafting{ public static IRecipe recipePizza; + public static IRecipe recipeHamburger; + public static IRecipe recipeBigCookie; + public static IRecipe recipeSubSandwich; + public static IRecipe recipeFrenchFry; + public static IRecipe recipeFrenchFries; + public static IRecipe recipeFishNChips; + public static IRecipe recipeCheese; + public static IRecipe recipePumpkinStew; + public static IRecipe recipeCarrotJuice; + public static IRecipe recipeSpaghetti; + public static IRecipe recipeNoodle; + public static IRecipe recipeChocolate; + public static IRecipe recipeChocolateCake; + public static IRecipe recipeToast; public static void init(){ ItemStack knifeStack = new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD); //Rice Bread - if(ConfigCrafting.RICE_BREAD.isEnabled()) + if(ConfigCrafting.RICE_BREAD.isEnabled()){ GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F); + } //Baguette - if(ConfigCrafting.BAGUETTE.isEnabled()) + if(ConfigCrafting.BAGUETTE.isEnabled()){ GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F); + } //Pizza if(ConfigCrafting.PIZZA.isEnabled()){ @@ -41,27 +57,31 @@ public class FoodCrafting{ 'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), 'K', knifeStack, 'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()))); - recipePizza = Util.latestIRecipe(); + recipePizza = Util.lastIRecipe(); } //Hamburger - if(ConfigCrafting.HAMBURGER.isEnabled()) + if(ConfigCrafting.HAMBURGER.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), "KT ", "CB ", " T ", 'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'K', knifeStack, 'B', new ItemStack(Items.cooked_beef))); + recipeHamburger = Util.lastIRecipe(); + } //Big Cookie - if(ConfigCrafting.BIG_COOKIE.isEnabled()) + if(ConfigCrafting.BIG_COOKIE.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()), "DCD", "CDC", "DCD", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'C', new ItemStack(Items.dye, 1, 3))); + recipeBigCookie = Util.lastIRecipe(); + } //Sub Sandwich - if(ConfigCrafting.SUB.isEnabled()) + if(ConfigCrafting.SUB.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()), "KCP", "FB ", "PCP", 'P', new ItemStack(Items.paper), @@ -69,66 +89,86 @@ public class FoodCrafting{ 'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), 'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 'K', knifeStack)); + recipeSubSandwich = Util.lastIRecipe(); + } //French Fry - if(ConfigCrafting.FRENCH_FRY.isEnabled()) + if(ConfigCrafting.FRENCH_FRY.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), new ItemStack(Items.baked_potato), knifeStack)); + recipeFrenchFry = Util.lastIRecipe(); + } //French Fries - if(ConfigCrafting.FRENCH_FRIES.isEnabled()) + if(ConfigCrafting.FRENCH_FRIES.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()), "FFF", " P ", 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()))); + recipeFrenchFries = Util.lastIRecipe(); + } //Fish N Chips - if(ConfigCrafting.FISH_N_CHIPS.isEnabled()) + if(ConfigCrafting.FISH_N_CHIPS.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), "FIF", " P ", 'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()))); + recipeFishNChips = Util.lastIRecipe(); + } //Cheese - if(ConfigCrafting.CHEESE.isEnabled()) + if(ConfigCrafting.CHEESE.isEnabled()){ GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), new ItemStack(Items.milk_bucket)); + recipeCheese = Util.lastIRecipe(); + } //Pumpkin Stew - if(ConfigCrafting.PUMPKIN_STEW.isEnabled()) + if(ConfigCrafting.PUMPKIN_STEW.isEnabled()){ GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()), "P", "B", 'P', new ItemStack(Blocks.pumpkin), 'B', new ItemStack(Items.bowl)); + recipePumpkinStew = Util.lastIRecipe(); + } //Carrot Juice - if(ConfigCrafting.CARROT_JUICE.isEnabled()) + if(ConfigCrafting.CARROT_JUICE.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack)); + recipeCarrotJuice = Util.lastIRecipe(); + } //Spaghetti - if(ConfigCrafting.SPAGHETTI.isEnabled()) + if(ConfigCrafting.SPAGHETTI.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()), "NNN", " B ", 'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), 'B', new ItemStack(Items.bowl))); + recipeSpaghetti = Util.lastIRecipe(); + } //Noodle - if(ConfigCrafting.NOODLE.isEnabled()) + if(ConfigCrafting.NOODLE.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), "cropWheat", knifeStack)); + recipeNoodle = Util.lastIRecipe(); + } //Chocolate - if(ConfigCrafting.CHOCOLATE.isEnabled()) + if(ConfigCrafting.CHOCOLATE.isEnabled()){ GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.CHOCOLATE.ordinal()), "C C", "CMC", "C C", 'C', new ItemStack(Items.dye, 1, 3), 'M', new ItemStack(Items.milk_bucket)); + recipeChocolate = Util.lastIRecipe(); + } //Chocolate Cake - if(ConfigCrafting.CHOCOLATE_CAKE.isEnabled()) + if(ConfigCrafting.CHOCOLATE_CAKE.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()), "MMM", "CCC", "EDS", 'M', new ItemStack(Items.milk_bucket), @@ -136,11 +176,15 @@ public class FoodCrafting{ 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'S', new ItemStack(Items.sugar), 'C', new ItemStack(Items.dye, 1, 3))); + recipeChocolateCake = Util.lastIRecipe(); + } //Toast - if(ConfigCrafting.TOAST.isEnabled()) + if(ConfigCrafting.TOAST.isEnabled()){ GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), new ItemStack(Items.bread)); + recipeToast = Util.lastIRecipe(); + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiAAAchievements.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiAAAchievements.java index 6b72fc128..ffbd45a7e 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiAAAchievements.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiAAAchievements.java @@ -19,7 +19,7 @@ public class GuiAAAchievements extends GuiAchievements{ @Override public void initGui(){ super.initGui(); - ReflectionHelper.setPrivateValue(GuiAchievements.class, this, InitAchievements.pageNumber, "currentPage"); + ReflectionHelper.setPrivateValue(GuiAchievements.class, this, InitAchievements.pageNumber, 21); ((GuiButton)buttonList.get(1)).displayString = InitAchievements.theAchievementPage.getName(); } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiBooklet.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiBooklet.java index 19e8d54f6..51dcb99c2 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/GuiBooklet.java @@ -60,8 +60,8 @@ public class GuiBooklet extends GuiScreen{ this.buttonList.add(new IndexButton(this.unicodeRenderer, CHAPTER_BUTTONS_START+i, guiLeft+13, guiTop+15+(i*11), 120, 10, "")); } - this.buttonList.add(new TexturedButton(BUTTON_ACHIEVEMENTS_ID, this.guiLeft+138, this.guiTop, 0, 0, 8, 8)); - this.buttonList.add(new TexturedButton(BUTTON_CONFIG_ID, this.guiLeft+138, this.guiTop+10, 0, 0, 8, 8)); + this.buttonList.add(new TexturedButton(BUTTON_ACHIEVEMENTS_ID, this.guiLeft+138, this.guiTop, 205, 0, 8, 8)); + this.buttonList.add(new TexturedButton(BUTTON_CONFIG_ID, this.guiLeft+138, this.guiTop+10, 197, 0, 8, 8)); this.currentPage = null; this.currentChapter = null; @@ -94,20 +94,25 @@ public class GuiBooklet extends GuiScreen{ else this.drawCenteredString(this.fontRendererObj, StringUtil.localize("itemGroup."+ModUtil.MOD_ID_LOWER), this.guiLeft+this.xSize/2, this.guiTop-8, StringUtil.DECIMAL_COLOR_WHITE); - super.drawScreen(x, y, f); - if(this.currentIndexEntry != null && this.currentChapter != null && this.currentPage != null){ - this.currentPage.render(this, x, y); + this.drawCenteredString(this.unicodeRenderer, this.currentPage.getID()+"/"+this.currentChapter.pages.length, this.guiLeft+this.xSize/2, this.guiTop+172, StringUtil.DECIMAL_COLOR_WHITE); + this.currentPage.renderPre(this, x, y); } + super.drawScreen(x, y, f); + //Achievements Hover Text - if(x >= this.guiLeft+138 && x <= this.guiLeft+138+8 && y >= this.guiTop && y <= this.guiTop+8){ + if(x >= this.guiLeft+138 && x <= this.guiLeft+138+7 && y >= this.guiTop && y <= this.guiTop+7){ this.func_146283_a(Collections.singletonList("Show Achievements"), x, y); } //Config Hover Text - if(x >= this.guiLeft+138 && x <= this.guiLeft+138+8 && y >= this.guiTop+10 && y <= this.guiTop+10+8){ + if(x >= this.guiLeft+138 && x <= this.guiLeft+138+7 && y >= this.guiTop+10 && y <= this.guiTop+10+7){ this.func_146283_a(Collections.singletonList("Show Config"), x, y); } + + if(this.currentIndexEntry != null && this.currentChapter != null && this.currentPage != null){ + this.currentPage.render(this, x, y); + } } private IBookletPage getNextPage(BookletChapter chapter, IBookletPage currentPage){ diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/IBookletPage.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/IBookletPage.java index 8dd9ac7c5..d62055af2 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/IBookletPage.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/IBookletPage.java @@ -8,5 +8,7 @@ public interface IBookletPage{ String getText(); + void renderPre(GuiBooklet gui, int mouseX, int mouseY); + void render(GuiBooklet gui, int mouseX, int mouseY); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/InitBooklet.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/InitBooklet.java index c8f8fa624..0704b384e 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/InitBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/InitBooklet.java @@ -1,6 +1,9 @@ package ellpeck.actuallyadditions.inventory.gui.lexicon; import ellpeck.actuallyadditions.crafting.FoodCrafting; +import ellpeck.actuallyadditions.items.InitItems; +import ellpeck.actuallyadditions.items.metalists.TheFoods; +import net.minecraft.item.ItemStack; import java.util.ArrayList; @@ -8,9 +11,9 @@ public class InitBooklet{ public static ArrayList entries = new ArrayList(); - public static BookletIndexEntry entryFood = new BookletIndexEntry("food"); + public static BookletIndexEntry entryMisc = new BookletIndexEntry("misc"); static{ - new BookletChapter("pizza", entryFood, new PageText(1), new PageText(2), new PageCrafting(3, FoodCrafting.recipePizza)); + new BookletChapter("foods", entryMisc, new PageCrafting(1, FoodCrafting.recipePizza), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())), new PageCrafting(3, FoodCrafting.recipeHamburger), new PageCrafting(4, FoodCrafting.recipeBigCookie), new PageCrafting(5, FoodCrafting.recipeSubSandwich), new PageCrafting(6, FoodCrafting.recipeFrenchFry), new PageCrafting(7, FoodCrafting.recipeFrenchFries), new PageCrafting(8, FoodCrafting.recipeFishNChips), new PageCrafting(9, FoodCrafting.recipeCheese), new PageCrafting(10, FoodCrafting.recipePumpkinStew), new PageCrafting(11, FoodCrafting.recipeCarrotJuice), new PageCrafting(12, FoodCrafting.recipeSpaghetti), new PageCrafting(13, FoodCrafting.recipeNoodle), new PageCrafting(14, FoodCrafting.recipeChocolate), new PageCrafting(15, FoodCrafting.recipeChocolateCake), new PageCrafting(16, FoodCrafting.recipeToast), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()))); } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageCrafting.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageCrafting.java index edc3f0e24..607821d9a 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageCrafting.java @@ -21,68 +21,88 @@ public class PageCrafting extends PageText{ this.recipe = recipe; } + @Override + public void renderPre(GuiBooklet gui, int mouseX, int mouseY){ + if(this.recipe != null){ + gui.mc.getTextureManager().bindTexture(GuiBooklet.resLoc); + gui.drawTexturedModalRect(gui.guiLeft+27, gui.guiTop+20, 146, 20, 99, 60); + } + } + @SuppressWarnings("unchecked") @Override public void render(GuiBooklet gui, int mouseX, int mouseY){ - gui.mc.getTextureManager().bindTexture(GuiBooklet.resLoc); - gui.drawTexturedModalRect(gui.guiLeft+37, gui.guiTop+20, 146, 20, 60, 60); + if(this.recipe == null){ + gui.unicodeRenderer.drawSplitString("The crafting recipe for this item is disabled in the Config File! If you're on a server, ask the server author to enable it in the config. If you're on a client, press the 'Open Config'-Button on the top right and enable the recipe!", gui.guiLeft+14, gui.guiTop+15, 115, 0); + } gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+112, 115, 0); - ItemStack[] stacks = new ItemStack[9]; - int width = 3; - int height = 3; + if(this.recipe != null){ - if(recipe instanceof ShapedRecipes){ - ShapedRecipes shaped = (ShapedRecipes)recipe; - width = shaped.recipeWidth; - height = shaped.recipeHeight; - stacks = shaped.recipeItems; - } - else if(recipe instanceof ShapelessRecipes){ - ShapelessRecipes shapeless = (ShapelessRecipes)recipe; - for(int i = 0; i < shapeless.recipeItems.size(); i++){ - stacks[i] = (ItemStack)shapeless.recipeItems.get(i); + ItemStack[] stacks = new ItemStack[9]; + int width = 3; + int height = 3; + + if(recipe instanceof ShapedRecipes){ + ShapedRecipes shaped = (ShapedRecipes)recipe; + width = shaped.recipeWidth; + height = shaped.recipeHeight; + stacks = shaped.recipeItems; } - } - else if(recipe instanceof ShapedOreRecipe){ - ShapedOreRecipe shaped = (ShapedOreRecipe)recipe; - width = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 4); - height = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 5); - for(int i = 0; i < shaped.getInput().length; i++){ - Object input = shaped.getInput()[i]; - if(input != null) + else if(recipe instanceof ShapelessRecipes){ + ShapelessRecipes shapeless = (ShapelessRecipes)recipe; + for(int i = 0; i < shapeless.recipeItems.size(); i++){ + stacks[i] = (ItemStack)shapeless.recipeItems.get(i); + } + } + else if(recipe instanceof ShapedOreRecipe){ + ShapedOreRecipe shaped = (ShapedOreRecipe)recipe; + width = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 4); + height = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 5); + for(int i = 0; i < shaped.getInput().length; i++){ + Object input = shaped.getInput()[i]; + if(input != null){ + stacks[i] = input instanceof ItemStack ? (ItemStack)input : ((ArrayList)input).get(0); + } + } + } + else if(recipe instanceof ShapelessOreRecipe){ + ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe; + for(int i = 0; i < shapeless.getInput().size(); i++){ + Object input = shapeless.getInput().get(i); stacks[i] = input instanceof ItemStack ? (ItemStack)input : ((ArrayList)input).get(0); + } } - } - else if(recipe instanceof ShapelessOreRecipe){ - ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe; - for(int i = 0; i < shapeless.getInput().size(); i++){ - Object input = shapeless.getInput().get(i); - stacks[i] = input instanceof ItemStack ? (ItemStack)input : ((ArrayList)input).get(0); - } - } - for(int i = 0; i < 2; i++){ - boolean tooltip = i == 1; - for(int x = 0; x < width; x++){ - for(int y = 0; y < height; y++){ - ItemStack stack = stacks[y*width+x]; - if(stack != null){ - int xShow = gui.guiLeft+38+x*21; - int yShow = gui.guiTop+23+y*21; - if(!tooltip){ - if(stack.getItemDamage() == Util.WILDCARD) stack.setItemDamage(0); - RenderItem.getInstance().renderItemAndEffectIntoGUI(gui.unicodeRenderer, gui.mc.getTextureManager(), stack, xShow, yShow); - } - else{ - if(mouseX >= xShow && mouseX <= xShow+16 && mouseY >= yShow && mouseY <= yShow+16){ - gui.renderToolTip(stack, mouseX, mouseY); + for(int i = 0; i < 2; i++){ + boolean tooltip = i == 1; + for(int x = 0; x < width; x++){ + for(int y = 0; y < height; y++){ + ItemStack stack = stacks[y*width+x]; + if(stack != null){ + int xShow = gui.guiLeft+28+x*21; + int yShow = gui.guiTop+23+y*21; + if(!tooltip){ + if(stack.getItemDamage() == Util.WILDCARD) stack.setItemDamage(0); + RenderItem.getInstance().renderItemAndEffectIntoGUI(gui.unicodeRenderer, gui.mc.getTextureManager(), stack, xShow, yShow); + } + else{ + if(mouseX >= xShow && mouseX <= xShow+16 && mouseY >= yShow && mouseY <= yShow+16){ + gui.renderToolTip(stack, mouseX, mouseY); + } } } } } } + + int xShow = gui.guiLeft+28+82; + int yShow = gui.guiTop+23+20; + RenderItem.getInstance().renderItemAndEffectIntoGUI(gui.unicodeRenderer, gui.mc.getTextureManager(), recipe.getRecipeOutput(), xShow, yShow); + if(mouseX >= xShow && mouseX <= xShow+16 && mouseY >= yShow && mouseY <= yShow+16){ + gui.renderToolTip(recipe.getRecipeOutput(), mouseX, mouseY); + } } } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageFurnace.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageFurnace.java new file mode 100644 index 000000000..e64e3e542 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageFurnace.java @@ -0,0 +1,64 @@ +package ellpeck.actuallyadditions.inventory.gui.lexicon; + +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; + +import java.util.Map; + +public class PageFurnace extends PageText{ + + private final ItemStack result; + + public PageFurnace(int id, ItemStack result){ + super(id); + this.result = result; + } + + @Override + public void renderPre(GuiBooklet gui, int mouseX, int mouseY){ + if(this.getInputForOutput(this.result) != null){ + gui.mc.getTextureManager().bindTexture(GuiBooklet.resLoc); + gui.drawTexturedModalRect(gui.guiLeft+37, gui.guiTop+20, 0, 180, 60, 60); + } + } + + @SuppressWarnings("unchecked") + @Override + public void render(GuiBooklet gui, int mouseX, int mouseY){ + ItemStack input = this.getInputForOutput(this.result); + if(input == null){ + gui.unicodeRenderer.drawSplitString("The crafting recipe for this item is disabled in the Config File! If you're on a server, ask the server author to enable it in the config. If you're on a client, press the 'Open Config'-Button on the top right and enable the recipe!", gui.guiLeft+14, gui.guiTop+15, 115, 0); + } + + gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+112, 115, 0); + + if(input != null){ + for(int i = 0; i < 2; i++){ + for(int x = 0; x < 2; x++){ + ItemStack stack = x == 0 ? input : this.result; + boolean tooltip = i == 1; + + int xShow = gui.guiLeft+37+1+x*40; + int yShow = gui.guiTop+20+20; + if(!tooltip){ + RenderItem.getInstance().renderItemAndEffectIntoGUI(gui.unicodeRenderer, gui.mc.getTextureManager(), stack, xShow, yShow); + } + else{ + if(mouseX >= xShow && mouseX <= xShow+16 && mouseY >= yShow && mouseY <= yShow+16){ + gui.renderToolTip(stack, mouseX, mouseY); + } + } + } + } + } + } + + private ItemStack getInputForOutput(ItemStack output){ + for(Object o : FurnaceRecipes.smelting().getSmeltingList().entrySet()){ + ItemStack stack = (ItemStack)((Map.Entry)o).getValue(); + if(stack.isItemEqual(output)) return (ItemStack)((Map.Entry)o).getKey(); + } + return null; + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageText.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageText.java index 7306dca4c..7fe694f19 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageText.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/lexicon/PageText.java @@ -27,6 +27,11 @@ public class PageText implements IBookletPage{ return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.chapter.getUnlocalizedName()+".text."+this.id+".name"); } + @Override + public void renderPre(GuiBooklet gui, int mouseX, int mouseY){ + + } + @Override public void render(GuiBooklet gui, int mouseX, int mouseY){ gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+11, 115, 0); diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java b/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java index ab9a228b4..f06b9976e 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java @@ -2,18 +2,16 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.oredict.OreDictionary; -import java.util.List; - public class ItemArmorAA extends ItemArmor implements INameableItem{ private String repairItem; @@ -41,17 +39,6 @@ public class ItemArmorAA extends ItemArmor implements INameableItem{ return EnumRarity.rare; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconReg){ diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java index d1cc2e13a..e7f4f69ff 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java @@ -2,15 +2,13 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.List; - public class ItemBattery extends ItemEnergy implements INameableItem{ private String name; @@ -41,15 +39,4 @@ public class ItemBattery extends ItemEnergy implements INameableItem{ public String getName(){ return name; } - - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemBattery.desc")); - list.add(this.getEnergyStored(stack) + "/" + this.getMaxEnergyStored(stack) + " RF"); - } - else list.add(ItemUtil.shiftForInfo()); - } } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java index b66d92e3a..e2c7843e0 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -15,11 +14,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class ItemBooklet extends Item implements INameableItem{ public ItemBooklet(){ + this.setMaxStackSize(1); this.setMaxDamage(0); } @@ -28,13 +26,6 @@ public class ItemBooklet extends Item implements INameableItem{ return EnumRarity.epic; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - ItemUtil.addInformation(this, list, 1, ""); - } - @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java index d6634b9c4..a8cf46f2d 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java @@ -3,19 +3,15 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.List; - public class ItemBucketAA extends ItemBucket implements INameableItem{ private String name; @@ -31,12 +27,6 @@ public class ItemBucketAA extends ItemBucket implements INameableItem{ return EnumRarity.uncommon; } - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - ItemUtil.addInformation(this, list, 1, ""); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java index 293ba76d8..857d4ecdf 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java @@ -5,7 +5,10 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ItemUtil; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; @@ -17,7 +20,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import java.util.ArrayList; -import java.util.List; public class ItemCoffee extends ItemFood implements INameableItem{ @@ -174,28 +176,6 @@ public class ItemCoffee extends ItemFood implements INameableItem{ else return theStack; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.1")); - list.add(StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.2", this.getMaxDamage()+1)); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+this.func_150905_g(stack)); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+this.func_150906_h(stack)); - list.add(""); - - PotionEffect[] effects = getEffectsFromStack(stack); - if(effects != null && effects.length > 0){ - for(PotionEffect effect : effects){ - list.add(StringUtil.localize(effect.getEffectName())+" "+(effect.getAmplifier()+1)+ " (" + Potion.getDurationString(new PotionEffect(0, effect.getDuration()*20, 0)) + ")"); - } - } - else list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".noEffects.desc")); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public IIcon getIconFromDamage(int par1){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java index 51b67f997..815f006a1 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java @@ -3,17 +3,13 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.List; - public class ItemCoffeeBean extends ItemFood implements INameableItem{ public ItemCoffeeBean(){ @@ -26,13 +22,6 @@ public class ItemCoffeeBean extends ItemFood implements INameableItem{ return EnumRarity.rare; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - ItemUtil.addInformation(this, list, 1, ""); - } - @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java b/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java index 4dd18f883..c1e9e736d 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -15,21 +14,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class ItemCrafterOnAStick extends Item implements INameableItem{ public ItemCrafterOnAStick(){ this.setMaxStackSize(1); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - ItemUtil.addInformation(this, list, 1, ""); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java b/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java index b3b8a4f25..ebe44d72a 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java @@ -2,7 +2,8 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -11,8 +12,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class ItemDrillUpgrade extends Item implements INameableItem{ public enum UpgradeType{ @@ -76,20 +75,4 @@ public class ItemDrillUpgrade extends Item implements INameableItem{ public String getName(){ return this.unlocalizedName; } - - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - ItemUtil.addInformation(this, list, this.type == UpgradeType.PLACER ? 3 : 1, ""); - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemDrillUpgrade.desc")); - if(this.type == UpgradeType.PLACER){ - int slot = getSlotToPlaceFrom(stack); - if(slot >= 0){ - list.add(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.slot")+": "+(slot+1)); - } - } - } - } } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java b/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java index f9ab5e20e..bd6f8eef3 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java @@ -4,11 +4,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.items.metalists.TheDusts; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -52,13 +50,6 @@ public class ItemDust extends Item implements INameableItem{ return this.getUnlocalizedName() + (stack.getItemDamage() >= allDusts.length ? " ERROR!" : allDusts[stack.getItemDamage()].getName()); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(stack.getItemDamage() < allDusts.length) ItemUtil.addInformation(this, list, 1, allDusts[stack.getItemDamage()].getName()); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java b/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java index 2e90a45ae..30be25e3d 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java @@ -3,8 +3,6 @@ package ellpeck.actuallyadditions.items; import cofh.api.energy.ItemEnergyContainer; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.ItemUtil; -import ellpeck.actuallyadditions.util.KeyUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -72,14 +70,4 @@ public abstract class ItemEnergy extends ItemEnergyContainer{ compound.setInteger("Energy", energy); stack.setTagCompound(compound); } - - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - ItemUtil.addInformation(this, list, this.infoLines, ""); - if(KeyUtil.isShiftPressed()){ - list.add(this.getEnergyStored(stack) + "/" + this.getMaxEnergyStored(stack) + " RF"); - } - } } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java b/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java index 1134ec574..4655d30bd 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java @@ -3,7 +3,6 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -14,8 +13,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import java.util.List; - public class ItemFertilizer extends Item implements INameableItem{ @Override @@ -32,13 +29,6 @@ public class ItemFertilizer extends Item implements INameableItem{ return EnumRarity.rare; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - ItemUtil.addInformation(this, list, 1, ""); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java b/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java index 100576f24..c679e0c9c 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java @@ -3,7 +3,8 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.items.metalists.TheFoods; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; @@ -85,20 +86,6 @@ public class ItemFoods extends ItemFood implements INameableItem{ return stackToReturn; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(stack.getItemDamage() < allFoods.length){ - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+allFoods[stack.getItemDamage()].getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+allFoods[stack.getItemDamage()].healAmount); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+allFoods[stack.getItemDamage()].saturation); - } - else list.add(ItemUtil.shiftForInfo()); - } - } - @Override public IIcon getIconFromDamage(int par1){ return par1 >= textures.length ? null : textures[par1]; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java b/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java index d62fdef5a..763b88ffc 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.recipe.HairyBallHandler; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; @@ -16,7 +15,6 @@ import net.minecraft.util.IIcon; import net.minecraft.util.WeightedRandom; import net.minecraft.world.World; -import java.util.List; import java.util.Random; public class ItemHairyBall extends Item implements INameableItem{ @@ -45,13 +43,6 @@ public class ItemHairyBall extends Item implements INameableItem{ return EnumRarity.epic; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - ItemUtil.addInformation(this, list, 2, ""); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java b/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java index 0b786791f..939a56980 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java @@ -3,7 +3,8 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.items.metalists.TheJams; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; @@ -90,23 +91,6 @@ public class ItemJams extends ItemFood implements INameableItem{ return stackToReturn; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(stack.getItemDamage() < allJams.length){ - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.1")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+allJams[stack.getItemDamage()].getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.2")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc.3")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".hunger.desc")+": "+allJams[stack.getItemDamage()].healAmount); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".saturation.desc")+": "+allJams[stack.getItemDamage()].saturation); - } - else list.add(ItemUtil.shiftForInfo()); - } - } - @Override @SideOnly(Side.CLIENT) public IIcon getIconFromDamageForRenderPass(int damage, int pass){ diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java index d9465f4e0..199f6c3d9 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java @@ -4,18 +4,16 @@ import com.google.common.collect.Multimap; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.config.values.ConfigIntValues; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import java.util.List; - public class ItemKnife extends Item implements INameableItem{ public ItemKnife(){ @@ -42,18 +40,6 @@ public class ItemKnife extends Item implements INameableItem{ return EnumRarity.epic; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - - } - @Override public boolean getShareTag(){ return true; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java b/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java index 6da77f173..041ef5b47 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java @@ -4,7 +4,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.config.values.ConfigBoolValues; import ellpeck.actuallyadditions.config.values.ConfigIntValues; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.WorldPos; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.BlockLeavesBase; @@ -20,7 +22,6 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import java.util.ArrayList; -import java.util.List; public class ItemLeafBlower extends Item implements INameableItem{ @@ -103,18 +104,6 @@ public class ItemLeafBlower extends Item implements INameableItem{ return this.isAdvanced ? EnumRarity.epic : EnumRarity.rare; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc."+1)); - list.add(StringUtil.ITALIC + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemLeafBlower.desc.2")); - list.add(StringUtil.ITALIC + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemLeafBlower.desc.3")); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java b/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java index 516444746..0f17bd4bc 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java @@ -4,11 +4,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -53,13 +51,6 @@ public class ItemMisc extends Item implements INameableItem{ return this.getUnlocalizedName() + (stack.getItemDamage() >= allMiscItems.length ? " ERROR!" : allMiscItems[stack.getItemDamage()].getName()); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(stack.getItemDamage() < allMiscItems.length) ItemUtil.addInformation(this, list, 1, allMiscItems[stack.getItemDamage()].getName()); - } - @Override public IIcon getIconFromDamage(int par1){ return par1 >= textures.length ? null : textures[par1]; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java b/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java index 3cb8801df..e9010ecaf 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java @@ -3,7 +3,10 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.tile.IPhantomTile; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; +import ellpeck.actuallyadditions.util.StringUtil; +import ellpeck.actuallyadditions.util.WorldPos; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -17,8 +20,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import java.util.List; - public class ItemPhantomConnector extends Item implements INameableItem{ public ItemPhantomConnector(){ @@ -102,27 +103,6 @@ public class ItemPhantomConnector extends Item implements INameableItem{ return EnumRarity.epic; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - ItemUtil.addInformation(this, list, 1, ""); - WorldPos coords = this.getStoredPosition(stack); - if(coords != null){ - World world = coords.getWorld(); - if(world != null){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.boundTo.desc")+":"); - Item item = coords.getItemBlock(); - String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(coords.getBlock(), 1, coords.getMetadata())); - list.add(name); - list.add("X: "+coords.getX()); - list.add("Y: "+coords.getY()); - list.add("Z: "+coords.getZ()); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.inWorld.desc")+" "+world.provider.dimensionId); - } - } - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java b/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java index 87037c8c1..90ed8e6bd 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.items.metalists.ThePotionRings; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.client.renderer.texture.IIconRegister; @@ -84,15 +83,6 @@ public class ItemPotionRing extends Item implements INameableItem{ return this.getUnlocalizedName() + (stack.getItemDamage() >= allRings.length ? " ERROR!" : allRings[stack.getItemDamage()].getName().substring("potion".length())); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(stack.getItemDamage() < allRings.length){ - ItemUtil.addInformation(this, list, 2, ""); - } - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java b/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java index 0e63ccd57..9206a4814 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java @@ -2,7 +2,8 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -10,9 +11,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.List; public class ItemResonantRice extends Item implements INameableItem{ @@ -30,14 +28,6 @@ public class ItemResonantRice extends Item implements INameableItem{ return EnumRarity.epic; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - ItemUtil.addInformation(this, list, 1, ""); - if(KeyUtil.isShiftPressed() && OreDictionary.getOres("nuggetEnderium", false).isEmpty()) list.add(StringUtil.RED + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".itemResonantRice.uncraftable.desc")); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java b/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java index 07b43c272..f8eda8282 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java @@ -4,11 +4,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.blocks.BlockPlant; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; @@ -17,8 +15,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import java.util.List; - public class ItemSeed extends ItemSeeds implements INameableItem{ public Block plant; @@ -40,12 +36,6 @@ public class ItemSeed extends ItemSeeds implements INameableItem{ return EnumRarity.rare; } - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - ItemUtil.addInformation(this, list, 1, ""); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java b/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java index 685596c68..a8ff7dde2 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -74,13 +73,6 @@ public class ItemSpecialDrop extends Item implements INameableItem{ return this.getUnlocalizedName() + (stack.getItemDamage() >= allDrops.length ? " ERROR!" : allDrops[stack.getItemDamage()].getName()); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - if(stack.getItemDamage() < allDrops.length) ItemUtil.addInformation(this, list, stack.getItemDamage() == TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal() ? 2 : 1, allDrops[stack.getItemDamage()].getName()); - } - @Override public IIcon getIconFromDamage(int par1){ return par1 >= textures.length ? null : textures[par1]; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java b/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java index 5093bd907..011a80e3a 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java @@ -3,7 +3,6 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.util.INameableItem; -import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -13,7 +12,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import java.util.ArrayList; -import java.util.List; public class ItemWingsOfTheBats extends Item implements INameableItem{ @@ -71,13 +69,6 @@ public class ItemWingsOfTheBats extends Item implements INameableItem{ return EnumRarity.epic; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - ItemUtil.addInformation(this, list, 1, ""); - } - @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java index ba4b1deb3..159416934 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java @@ -4,7 +4,8 @@ import com.google.common.collect.Sets; import cpw.mods.fml.common.eventhandler.Event; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,7 +21,6 @@ import net.minecraftforge.event.entity.player.UseHoeEvent; import net.minecraftforge.oredict.OreDictionary; import java.util.HashSet; -import java.util.List; import java.util.Set; @SuppressWarnings("unchecked") @@ -50,18 +50,6 @@ public class ItemAllToolAA extends ItemTool implements INameableItem{ return block.getMaterial().isToolNotRequired() || (block == Blocks.snow_layer || block == Blocks.snow || (block == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() == 3 : (block != Blocks.diamond_block && block != Blocks.diamond_ore ? (block != Blocks.emerald_ore && block != Blocks.emerald_block ? (block != Blocks.gold_block && block != Blocks.gold_ore ? (block != Blocks.iron_block && block != Blocks.iron_ore ? (block != Blocks.lapis_block && block != Blocks.lapis_ore ? (block != Blocks.redstone_ore && block != Blocks.lit_redstone_ore ? (block.getMaterial() == Material.rock || (block.getMaterial() == Material.iron || block.getMaterial() == Material.anvil)) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2))); } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".paxel.desc.1")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".paxel.desc.2")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ){ if (!player.canPlayerEdit(x, y, z, side, stack)) return false; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java index 9e4c87114..dba09f2f4 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java @@ -2,17 +2,15 @@ package ellpeck.actuallyadditions.items.tools; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.oredict.OreDictionary; -import java.util.List; - public class ItemAxeAA extends ItemAxe implements INameableItem{ private String name; @@ -26,17 +24,6 @@ public class ItemAxeAA extends ItemAxe implements INameableItem{ this.repairItem = repairItem; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ int[] idsStack = OreDictionary.getOreIDs(stack); diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java index eed4d61c0..4ff92b774 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java @@ -2,17 +2,15 @@ package ellpeck.actuallyadditions.items.tools; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.oredict.OreDictionary; -import java.util.List; - public class ItemHoeAA extends ItemHoe implements INameableItem{ private String name; @@ -28,17 +26,6 @@ public class ItemHoeAA extends ItemHoe implements INameableItem{ this.oredictName = name; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ int[] idsStack = OreDictionary.getOreIDs(stack); diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java index 57f83c410..8b17b0959 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java @@ -2,17 +2,15 @@ package ellpeck.actuallyadditions.items.tools; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.oredict.OreDictionary; -import java.util.List; - public class ItemPickaxeAA extends ItemPickaxe implements INameableItem{ private String name; @@ -26,17 +24,6 @@ public class ItemPickaxeAA extends ItemPickaxe implements INameableItem{ this.repairItem = repairItem; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ int[] idsStack = OreDictionary.getOreIDs(stack); diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java index f69fdf5c8..23208796e 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java @@ -2,17 +2,15 @@ package ellpeck.actuallyadditions.items.tools; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.oredict.OreDictionary; -import java.util.List; - public class ItemShovelAA extends ItemSpade implements INameableItem{ private String name; @@ -28,17 +26,6 @@ public class ItemShovelAA extends ItemSpade implements INameableItem{ this.oredictName = name; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ int[] idsStack = OreDictionary.getOreIDs(stack); diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java index 7b1cf1595..9eae59158 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java @@ -2,17 +2,15 @@ package ellpeck.actuallyadditions.items.tools; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.util.*; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.util.IIcon; import net.minecraftforge.oredict.OreDictionary; -import java.util.List; - public class ItemSwordAA extends ItemSword implements INameableItem{ private String name; @@ -28,17 +26,6 @@ public class ItemSwordAA extends ItemSword implements INameableItem{ this.oredictName = name; } - @Override - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc")); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage()); - } - else list.add(ItemUtil.shiftForInfo()); - } - @Override public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ int[] idsStack = OreDictionary.getOreIDs(stack); diff --git a/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java b/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java index 5eb5bae4e..2f549491b 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java @@ -5,47 +5,16 @@ import ellpeck.actuallyadditions.creative.CreativeTab; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; -import java.util.ArrayList; -import java.util.List; - public class BlockUtil{ public static String createUnlocalizedName(Block block){ return ModUtil.MOD_ID_LOWER + "." + ((INameableItem)block).getName(); } - @SuppressWarnings("unchecked") - public static void addInformation(Block block, List list, int lines, String extraName){ - if(KeyUtil.isShiftPressed()){ - for(int i = 0; i < lines; i++){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+((INameableItem)block).getName()+extraName+".desc"+(lines > 1 ? "."+(i+1) : ""))); - } - } - else list.add(ItemUtil.shiftForInfo()); - } - - @SuppressWarnings("unchecked") - public static void addPowerUsageInfo(List list, int usage){ - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " + usage + " RF/t"); - } - } - - @SuppressWarnings("unchecked") - public static void addPowerProductionInfo(List list, int produce){ - if(KeyUtil.isShiftPressed()){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".produces.desc") + " " + produce + " RF/t"); - } - } - - public static ArrayList wailaRegisterList = new ArrayList(); - public static void register(Block block, Class itemBlock, boolean addTab){ block.setCreativeTab(addTab ? CreativeTab.instance : null); block.setBlockName(createUnlocalizedName(block)); GameRegistry.registerBlock(block, itemBlock, ((INameableItem)block).getName()); - - wailaRegisterList.add(block); } public static void register(Block block, Class itemBlock){ diff --git a/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java b/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java index 998f8c77b..f9c03dc52 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java @@ -4,20 +4,8 @@ import cpw.mods.fml.common.registry.GameRegistry; import ellpeck.actuallyadditions.creative.CreativeTab; import net.minecraft.item.Item; -import java.util.List; - public class ItemUtil{ - @SuppressWarnings("unchecked") - public static void addInformation(Item item, List list, int lines, String extraName){ - if(KeyUtil.isShiftPressed()){ - for(int i = 0; i < lines; i++){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+((INameableItem)item).getName()+extraName+".desc"+(lines > 1 ? "."+(i+1) : ""))); - } - } - else list.add(shiftForInfo()); - } - public static Item getItemFromName(String name){ if(Item.itemRegistry.containsKey(name)){ return (Item)Item.itemRegistry.getObject(name); @@ -45,7 +33,4 @@ public class ItemUtil{ return ModUtil.MOD_ID_LOWER + "." + ((INameableItem)item).getName(); } - public static String shiftForInfo(){ - return StringUtil.GREEN + StringUtil.ITALIC + StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".shiftForInfo.desc"); - } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/Util.java b/src/main/java/ellpeck/actuallyadditions/util/Util.java index 54fbdf64d..28932a657 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/Util.java +++ b/src/main/java/ellpeck/actuallyadditions/util/Util.java @@ -25,7 +25,7 @@ public class Util{ BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler); } - public static IRecipe latestIRecipe(){ + public static IRecipe lastIRecipe(){ List list = CraftingManager.getInstance().getRecipeList(); Object recipe = list.get(list.size()-1); return recipe instanceof IRecipe ? (IRecipe)recipe : null; diff --git a/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java b/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java index 136ac0cba..326e98fde 100644 --- a/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java +++ b/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java @@ -1,15 +1,11 @@ package ellpeck.actuallyadditions.waila; -import ellpeck.actuallyadditions.config.values.ConfigBoolValues; -import ellpeck.actuallyadditions.util.BlockUtil; import ellpeck.actuallyadditions.util.ModUtil; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import mcp.mobius.waila.api.IWailaDataProvider; import mcp.mobius.waila.api.IWailaRegistrar; -import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -27,13 +23,6 @@ public class WailaDataProvider implements IWailaDataProvider{ @Override public List getWailaHead(ItemStack stack, List currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config){ - - if(ConfigBoolValues.DO_WAILA_INFO.isEnabled()){ - if(BlockUtil.wailaRegisterList.contains(accessor.getBlock())){ - Item.getItemFromBlock(accessor.getBlock()).addInformation(stack, accessor.getPlayer(), currentTip, true); - } - } - return currentTip; } @@ -54,10 +43,5 @@ public class WailaDataProvider implements IWailaDataProvider{ public static void register(IWailaRegistrar registrar){ ModUtil.LOGGER.info("Initializing Waila Plugin..."); - - WailaDataProvider provider = new WailaDataProvider(); - for(Block theBlock : BlockUtil.wailaRegisterList){ - registrar.registerHeadProvider(provider, theBlock.getClass()); - } } } diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png new file mode 100644 index 000000000..6a20f70d1 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemBooklet.png b/src/main/resources/assets/actuallyadditions/textures/items/itemBooklet.png new file mode 100644 index 000000000..c7ad74669 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/items/itemBooklet.png differ