Jump to content

Recommended Posts

Posted

Hello, My "Charging Station" is a dual input machine. And what I need is to have a battery that gains durability everytime it goes into the station. Here is what I have so far:

 

 

private static ItemStack getOutput(int i, int j)
{
         if (i == main_ProcessCraft.BatteryEmpty.itemID && j == Block.blockRedstone.blockID || i == Block.blockRedstone.blockID && j == main_ProcessCraft.BatteryEmpty.itemID)
         {
                 return new ItemStack(main_ProcessCraft.BatteryEmpty, 1);   //add damage code here(add durability) and I already tried adding .damageItem(-1, EntityPlayer); but EntityPlayer can not be use. 
         }
}

 

 

Any help will be appreciated!

Not new to java >> New to modding.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.