571
This commit is contained in:
parent
839647ed85
commit
51d07ac8f5
21 changed files with 39 additions and 339 deletions
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -30,7 +28,6 @@ public class ItemCrushedOre extends Item {
|
|||
"Indium", "Iridium", "Nickel", "Osmium", "Platinum",
|
||||
"Pyrite", "Sphalerite", "Tetrahedrite", "Tungsten", "Galena"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemCrushedOre() {
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
|
@ -38,26 +35,6 @@ public class ItemCrushedOre extends Item {
|
|||
setUnlocalizedName("techreborn.crushedore");
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "crushedOre/crushed"
|
||||
+ types[i] + "Ore");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -53,7 +51,7 @@ public class ItemDusts extends ItemTR {
|
|||
"titanium", "tungsten", "uvarovite", "vinteum", "voidstone", "yellowGarnet",
|
||||
"zinc", "greenSapphire"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
|
||||
public ItemDusts() {
|
||||
setUnlocalizedName("techreborn.dust");
|
||||
|
@ -61,26 +59,6 @@ public class ItemDusts extends ItemTR {
|
|||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "dust/"
|
||||
+ types[i] + "Dust");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -43,7 +41,6 @@ public class ItemDustsSmall extends ItemTR {
|
|||
"Titanium", "Tungsten", "Uvarovite", "Vinteum", "Voidstone", "YellowGarnet",
|
||||
"Zinc", "Galena"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemDustsSmall() {
|
||||
setUnlocalizedName("techreborn.dustsmall");
|
||||
|
@ -51,26 +48,7 @@ public class ItemDustsSmall extends ItemTR {
|
|||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||
+ "smallDust/small" + types[i] + "Dust");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -30,7 +28,6 @@ public class ItemGems extends Item {
|
|||
{"ruby", "sapphire", "peridot", "redGarnet",
|
||||
"yellowGarnet"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemGems() {
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
|
@ -38,26 +35,7 @@ public class ItemGems extends Item {
|
|||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "gem/"
|
||||
+ types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -32,7 +30,6 @@ public class ItemIngots extends Item {
|
|||
"osmium", "platinum", "silver", "steel", "tellurium", "tin", "titanium",
|
||||
"tungsten", "hotTungstensteel", "tungstensteel", "zinc"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemIngots() {
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
|
@ -40,26 +37,6 @@ public class ItemIngots extends Item {
|
|||
setUnlocalizedName("techreborn.ingot");
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "ingot/"
|
||||
+ types[i] + "Ingot");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
@ -24,11 +21,7 @@ public class ItemLapotronicOrb extends Item implements IEnergyItemInfo{
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "lapotronicEnergyOrb");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -32,7 +30,6 @@ public class ItemNuggets extends Item {
|
|||
"nickel", "osmium", "platinum", "silver", "steel",
|
||||
"tin", "titanium", "tungsten", "zinc"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemNuggets() {
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
|
@ -40,26 +37,6 @@ public class ItemNuggets extends Item {
|
|||
setUnlocalizedName("techreborn.nuggets");
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "nuggets/"
|
||||
+ types[i] + "Nugget");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -39,7 +39,6 @@ public class ItemParts extends Item {
|
|||
"quadPlutoniumCell", "destructoPack", "iridiumNeutronReflector", "massHoleDevice", "computerMonitor"
|
||||
, "machineParts", "thickNeutronReflector", "neutronReflector"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemParts() {
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
|
@ -47,26 +46,7 @@ public class ItemParts extends Item {
|
|||
setUnlocalizedName("techreborn.part");
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "component/"
|
||||
+ types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -36,7 +34,6 @@ public class ItemPlates extends ItemTR {
|
|||
"teslatite", "tin", "titanium", "tungsten", "tungstensteel",
|
||||
"yellowGarnet", "zinc"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemPlates() {
|
||||
setUnlocalizedName("techreborn.plate");
|
||||
|
@ -44,26 +41,7 @@ public class ItemPlates extends ItemTR {
|
|||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "plate/"
|
||||
+ types[i] + "Plate");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -31,34 +29,13 @@ public class ItemPurifiedCrushedOre extends Item {
|
|||
"Indium", "Iridium", "Nickel", "Osmium", "Platinum", "Pyrite", "Sphalerite",
|
||||
"Tetrahedrite", "Tungsten", "Galena"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemPurifiedCrushedOre() {
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHasSubtypes(true);
|
||||
setUnlocalizedName("techreborn.purifiedcrushedore");
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "purifiedCrushedOre/purifiedCrushed"
|
||||
+ types[i] + "Ore");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
||||
public class ItemUUmatter extends Item {
|
||||
|
@ -13,9 +10,5 @@ public class ItemUUmatter extends Item {
|
|||
setUnlocalizedName("techreborn.uuMatter");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "misc/itemMatter");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.api.upgrade.IMachineUpgrade;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
@ -31,7 +29,6 @@ public class ItemUpgrade extends ItemTR implements IMachineUpgrade {
|
|||
public static final String[] types = new String[]
|
||||
{"0.2Speed", "0.2Power", "0.5Speed"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public ItemUpgrade() {
|
||||
setUnlocalizedName("techreborn.upgrade");
|
||||
|
@ -40,26 +37,6 @@ public class ItemUpgrade extends ItemTR implements IMachineUpgrade {
|
|||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "upgrade/"
|
||||
+ types[i] + "Upgrade");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package techreborn.items.armor;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -28,11 +28,6 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo {
|
|||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "tool/lapotronicEnergyOrb");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package techreborn.items.armor;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -28,11 +27,7 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "tool/lithiumBatpack");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import ic2.api.item.ElectricItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,6 +9,8 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -37,17 +38,9 @@ public class ItemAdvancedDrill extends ItemPickaxe implements IEnergyItemInfo {
|
|||
setUnlocalizedName("techreborn.advancedDrill");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:"
|
||||
+ "tool/advancedDrill");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block,
|
||||
int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
ElectricItem.manager.use(stack, cost, entityLiving);
|
||||
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn) {
|
||||
PoweredItem.useEnergy(cost, stack);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -57,27 +50,27 @@ public class ItemAdvancedDrill extends ItemPickaxe implements IEnergyItemInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
if (!ElectricItem.manager.canUse(stack, cost)) {
|
||||
public float getDigSpeed(ItemStack stack, IBlockState state) {
|
||||
if(!PoweredItem.canUseEnergy(cost, stack)){
|
||||
return 4.0F;
|
||||
}
|
||||
|
||||
if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
if (Items.wooden_pickaxe.getDigSpeed(stack, state) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, state) > 1.0F) {
|
||||
return efficiencyOnProperMaterial;
|
||||
} else {
|
||||
return super.getDigSpeed(stack, block, meta);
|
||||
return super.getDigSpeed(stack, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world,
|
||||
int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
return TorchHelper.placeTorch(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
return TorchHelper.placeTorch(stack, playerIn, worldIn, pos.getX(), pos.getY(), pos.getZ(), side.getIndex(), hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -84,17 +83,6 @@ public class ItemCloakingDevice extends Item implements IEnergyItemInfo {
|
|||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDisplayDamage(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:"
|
||||
+ "techreborn.cloakingdevice");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
||||
public class ItemFluidbucket extends ItemBucket {
|
||||
|
@ -25,10 +22,5 @@ public class ItemFluidbucket extends ItemBucket {
|
|||
return super.setUnlocalizedName(par1Str);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
this.itemIcon = par1IconRegister.registerIcon("techreborn:bucket/" + iconName);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.items.ItemTR;
|
||||
|
||||
public class ItemHammer extends ItemTR {
|
||||
|
@ -21,21 +18,17 @@ public class ItemHammer extends ItemTR {
|
|||
return super.setUnlocalizedName(par1Str);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
this.itemIcon = par1IconRegister.registerIcon("techreborn:hammer/" + iconName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getShareTag() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
// @Override //TODO
|
||||
// public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -9,7 +9,9 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -37,17 +39,9 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
|||
setUnlocalizedName("techreborn.omniTool");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "tool/omnitool");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block,
|
||||
int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn) {
|
||||
PoweredItem.useEnergy(cost, stack);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -61,20 +55,20 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
public float getDigSpeed(ItemStack stack, IBlockState state) {
|
||||
if (PoweredItem.canUseEnergy(cost, stack)) {
|
||||
PoweredItem.useEnergy(cost, stack);
|
||||
return 5.0F;
|
||||
}
|
||||
|
||||
if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F
|
||||
|| Items.shears.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
if (Items.wooden_axe.getDigSpeed(stack, state) > 1.0F
|
||||
|| Items.wooden_sword.getDigSpeed(stack, state) > 1.0F
|
||||
|| Items.wooden_pickaxe.getDigSpeed(stack, state) > 1.0F
|
||||
|| Items.wooden_shovel.getDigSpeed(stack, state) > 1.0F
|
||||
|| Items.shears.getDigSpeed(stack, state) > 1.0F) {
|
||||
return efficiencyOnProperMaterial;
|
||||
} else {
|
||||
return super.getDigSpeed(stack, block, meta);
|
||||
return super.getDigSpeed(stack, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,9 +82,8 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world,
|
||||
int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) {
|
||||
return TorchHelper.placeTorch(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
return TorchHelper.placeTorch(stack, playerIn, worldIn, pos.getX(), pos.getY(), pos.getZ(), side.getIndex(), hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -34,12 +33,6 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
|
|||
efficiencyOnProperMaterial = 16F;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "tool/rockcutter");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack ist) {
|
||||
|
@ -73,11 +66,11 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public float func_150893_a(ItemStack stack, Block block) {
|
||||
public float getStrVsBlock(ItemStack stack, Block block) {
|
||||
if (!stack.isItemEnchanted()) {
|
||||
stack.addEnchantment(Enchantment.silkTouch, 1);
|
||||
}
|
||||
return super.func_150893_a(stack, block);
|
||||
return super.getStrVsBlock(stack, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -17,10 +16,6 @@ public class ItemTechPda extends Item {
|
|||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon("techreborn:" + "tool/pda");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
|
||||
|
|
Loading…
Reference in a new issue