Work on the LapotronPack - Hitt forge bug.
This commit is contained in:
parent
7249130c0c
commit
a8ee636846
3 changed files with 28 additions and 4 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue