Auto formatted, and cleaned imports
This commit is contained in:
parent
c001231216
commit
8e7d6b011e
64 changed files with 2268 additions and 2587 deletions
|
@ -1,11 +1,9 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -13,61 +11,54 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.util.TorchHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemAdvancedDrill extends ItemPickaxe implements IElectricItem{
|
||||
import java.util.List;
|
||||
|
||||
public class ItemAdvancedDrill extends ItemPickaxe implements IElectricItem {
|
||||
|
||||
public static final int maxCharge = ConfigTechReborn.AdvancedDrillCharge;
|
||||
public int cost = 250;;
|
||||
public int cost = 250;
|
||||
;
|
||||
public static final int tier = ConfigTechReborn.AdvancedDrillTier;
|
||||
public double transferLimit = 100;
|
||||
|
||||
public ItemAdvancedDrill()
|
||||
{
|
||||
public ItemAdvancedDrill() {
|
||||
super(ToolMaterial.EMERALD);
|
||||
efficiencyOnProperMaterial = 20F;
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(240);
|
||||
setUnlocalizedName("techreborn.advancedDrill");
|
||||
setUnlocalizedName("techreborn.advancedDrill");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("techreborn:" + "tool/advancedDrill");
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList)
|
||||
{
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
ItemStack itemStack = new ItemStack(this, 1);
|
||||
if (getChargedItem(itemStack) == this)
|
||||
{
|
||||
if (getChargedItem(itemStack) == this) {
|
||||
ItemStack charged = new ItemStack(this, 1);
|
||||
ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false);
|
||||
itemList.add(charged);
|
||||
}
|
||||
if (getEmptyItem(itemStack) == this)
|
||||
{
|
||||
if (getEmptyItem(itemStack) == this) {
|
||||
itemList.add(new ItemStack(this, 1, getMaxDamage()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving)
|
||||
{
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
ElectricItem.manager.use(stack, cost, entityLiving);
|
||||
return true;
|
||||
}
|
||||
|
@ -79,13 +70,11 @@ public class ItemAdvancedDrill extends ItemPickaxe implements IElectricItem{
|
|||
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
if (!ElectricItem.manager.canUse(stack, cost))
|
||||
{
|
||||
if (!ElectricItem.manager.canUse(stack, cost)) {
|
||||
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, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) {
|
||||
return efficiencyOnProperMaterial;
|
||||
} else {
|
||||
return super.getDigSpeed(stack, block, meta);
|
||||
|
@ -93,14 +82,12 @@ public class ItemAdvancedDrill extends ItemPickaxe implements IElectricItem{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue