mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-29 18:28:34 +01:00
Finished Booklet, removed descriptions from blocks and items
This commit is contained in:
parent
af5fa6e920
commit
34204beb23
79 changed files with 270 additions and 924 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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<BookletIndexEntry> entries = new ArrayList<BookletIndexEntry>();
|
||||
|
||||
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())));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<ItemStack>)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<ItemStack>)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<ItemStack>)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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<Block> wailaRegisterList = new ArrayList<Block>();
|
||||
|
||||
public static void register(Block block, Class<? extends ItemBlock> 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<? extends ItemBlock> itemBlock){
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<String> getWailaHead(ItemStack stack, List<String> 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Loading…
Reference in a new issue