diff --git a/src/main/java/techreborn/items/armor/ItemLapotronPack.java b/src/main/java/techreborn/items/armor/ItemLapotronPack.java index 25b89e303..8a839f922 100644 --- a/src/main/java/techreborn/items/armor/ItemLapotronPack.java +++ b/src/main/java/techreborn/items/armor/ItemLapotronPack.java @@ -1,7 +1,5 @@ package techreborn.items.armor; -import java.util.List; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.creativetab.CreativeTabs; @@ -11,6 +9,7 @@ import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; +import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import reborncore.RebornCore; @@ -20,6 +19,8 @@ import techreborn.client.TechRebornCreativeTab; import techreborn.config.ConfigTechReborn; import techreborn.lib.ModInfo; +import java.util.List; + public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo, ITexturedItem { @@ -93,6 +94,29 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo, ITex } + @Override public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) + {System.out.print("Hey!"); + } + + @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) + { + System.out.print("Hey!"); + for(int i = 0; i < player.inventory.getSizeInventory(); i++){ + if(player.inventory.getStackInSlot(i) != null){ + ItemStack item = player.inventory.getStackInSlot(i); + if(item.getItem() instanceof IEnergyItemInfo){ + IEnergyItemInfo energyItemInfo = (IEnergyItemInfo) item.getItem(); + if(energyItemInfo.canAcceptEnergy(item)){ + if(PoweredItem.canUseEnergy(energyItemInfo.getMaxPower(item), itemStack)){ + PoweredItem.useEnergy(energyItemInfo.getMaxPower(item), itemStack); + PoweredItem.addEnergy(energyItemInfo.getMaxPower(item), item); + } + } + } + } + } + } + @Override public boolean showDurabilityBar(ItemStack stack) { diff --git a/src/main/java/techreborn/items/tools/ItemDiamondDrill.java b/src/main/java/techreborn/items/tools/ItemDiamondDrill.java index bb77f1deb..bb8eeeded 100644 --- a/src/main/java/techreborn/items/tools/ItemDiamondDrill.java +++ b/src/main/java/techreborn/items/tools/ItemDiamondDrill.java @@ -10,7 +10,7 @@ public class ItemDiamondDrill extends ItemDrill public ItemDiamondDrill() { super(ToolMaterial.DIAMOND, "techreborn.diamondDrill", ConfigTechReborn.DiamondDrillCharge, - ConfigTechReborn.DiamondDrillTier, 2.5F, 15F); + ConfigTechReborn.DiamondDrillTier, 0.5F, 15F); this.cost = 250; } diff --git a/src/main/java/techreborn/items/tools/ItemIronDrill.java b/src/main/java/techreborn/items/tools/ItemIronDrill.java index 1dfb59239..098004f0b 100644 --- a/src/main/java/techreborn/items/tools/ItemIronDrill.java +++ b/src/main/java/techreborn/items/tools/ItemIronDrill.java @@ -10,7 +10,7 @@ public class ItemIronDrill extends ItemDrill public ItemIronDrill() { super(ToolMaterial.IRON, "techreborn.ironDrill", ConfigTechReborn.IronDrillCharge, - ConfigTechReborn.IronDrillTier, 2.0F, 10F); + ConfigTechReborn.IronDrillTier, 0.5F, 10F); this.cost = 50; }