Im making a Lucky Charms mod and I have a Leprechaun that I want to drop random lucky charms when I punch it. Does any one know how to do that?
Override Entity#hitByEntity to do something when a player attacks your Entity. Like the doc comment says, returning true will prevent the attack from happening.
Use Entity#dropItem, Entity#dropItemWithOffset or Entity#entityDropItem to drop an item.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thanks, It worked perfectly.