Added cloaking device {WIP}

This commit is contained in:
gigabit101 2015-08-04 21:12:27 +01:00
parent 8a4aea90aa
commit 4c2c69f84e
3 changed files with 67 additions and 3 deletions

View file

@ -14,6 +14,7 @@ import techreborn.items.*;
import techreborn.items.armor.ItemLapotronPack;
import techreborn.items.armor.ItemLithiumBatpack;
import techreborn.items.tools.ItemAdvancedDrill;
import techreborn.items.tools.ItemCloakingDevice;
import techreborn.items.tools.ItemFluidbucket;
import techreborn.items.tools.ItemHammer;
import techreborn.items.tools.ItemOmniTool;
@ -44,6 +45,7 @@ public class ModItems {
public static Item rods;
public static Item crushedOre;
public static Item purifiedCrushedOre;
public static Item cloakingDevice;
public static Item bucketBerylium;
public static Item bucketcalcium;
@ -131,6 +133,9 @@ public class ModItems {
farmPatten = new ItemFarmPatten();
GameRegistry.registerItem(farmPatten, "farmPatten");
cloakingDevice = new ItemCloakingDevice();
GameRegistry.registerItem(cloakingDevice, "cloakingdevice");
// buckets
bucketBerylium = new ItemFluidbucket(ModFluids.BlockFluidBerylium);

View file

@ -16,8 +16,6 @@ public class ItemTR extends Item {
@Override
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(ModInfo.MOD_ID + ":"
+ getUnlocalizedName().toLowerCase().substring(5));
itemIcon = iconRegister.registerIcon(ModInfo.MOD_ID + ":" + getUnlocalizedName().toLowerCase().substring(5));
}
}

View file

@ -0,0 +1,61 @@
package techreborn.items.tools;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import techreborn.items.ItemTR;
public class ItemCloakingDevice extends ItemTR implements IElectricItem
{
public static int Teir = 3;
public static int MaxCharge = 100000;
public static int Limit = 100;
public static boolean isActive;
public ItemCloakingDevice()
{
setUnlocalizedName("techreborn.cloakingdevice");
}
@Override
public boolean canProvideEnergy(ItemStack itemStack)
{
return false;
}
@Override
public Item getChargedItem(ItemStack itemStack)
{
return this;
}
@Override
public Item getEmptyItem(ItemStack itemStack)
{
return this;
}
@Override
public double getMaxCharge(ItemStack itemStack)
{
return MaxCharge;
}
@Override
public int getTier(ItemStack itemStack)
{
return Teir;
}
@Override
public double getTransferLimit(ItemStack itemStack)
{
return Limit;
}
}