Jump to content

Recommended Posts

Posted

Hey! I was looking for some codes for my custom armor, so here is my request:

 

I need a code that make the armor weakened vs fire

And a code that make the armor return damages to attacker.

 

Hope someone can help me :S

 

Have a nice day

Posted

Asking for code shows laziness and an attitude of 'can you write my mod for me'.

 

Try to do it yourself, look at tutorials and other forum threads which might relate, and after you feel like you've tried everything you come here, tell us what you tried, show your attempt in code, and then we help you.

BEFORE ASKING FOR HELP READ THE EAQ!

 

I'll help if I can. Apologies if I do something obviously stupid. :D

 

If you don't know basic Java yet, go and follow these tutorials.

Posted

Asking for code shows laziness and an attitude of 'can you write my mod for me'.

 

Try to do it yourself, look at tutorials and other forum threads which might relate, and after you feel like you've tried everything you come here, tell us what you tried, show your attempt in code, and then we help you.

 

Ok I'll try! Thank you for the advice.

 

Hint: events!

 

Oh you :*

Posted

Hi again, I've tried to search for the damage returning armor and I think I've got something pretty close but I can't find how to do the part where it returns the damages :S

 

@Subscribe
 public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) 
 {

     if (player.getCurrentArmor(4) != null && player.getCurrentArmor(3) != null && player.getCurrentArmor(2) != null && player.getCurrentArmor(1) != null) {
         ItemStack helmet = player.getCurrentArmor(4);
         ItemStack plate = player.getCurrentArmor(3);
         ItemStack legs = player.getCurrentArmor(2);
         ItemStack boots = player.getCurrentArmor(1); 

         if (helmet.getItem() == MainArMORE.StoneHelmet && plate.getItem() == MainArMORE.StoneChestplate && legs.getItem() == MainArMORE.StoneLeggings && boots.getItem() == MainArMORE.StoneBoots) 
         {
        	
         }
     }

 

Yeah im kind of noobish with codes

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.