How to classify an item as a sword

Started by SilverCrafter7 on Tue, 01/12/2016 - 00:42
Last seen on 20:41, 8. Feb 2017
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How to classify an item as a sword
Tue, 01/12/2016 - 00:42

Ok so I'm new to this and I've made a emerald sword mod the texture crafting recipe and everything except classifying it as a sword is working. I can't find when entity is hit event deal so and so damage in the events advice and help?

Last seen on 20:41, 8. Feb 2017
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Can someone plz answer this?
Tue, 01/12/2016 - 15:09

Can someone plz answer this?

Last seen on 13:48, 18. Aug 2018
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
For detect if is entity hit
Tue, 01/12/2016 - 18:56

For detect if is entity hit use in event handler:

 public void playerKilledZombie(LivingDropsEvent event)
   {
      if(event.entityLiving instanceof NAMEOFENTITY)
      {

        

       

        
      }
    
}

Last seen on 20:41, 8. Feb 2017
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:For detect if is entity hit
Tue, 01/12/2016 - 19:25

@#2 I can't find the "If hit with" event option =/