Merphin Posted June 20, 2015 Share Posted June 20, 2015 Hello Guys! I'm quiet new in modding, but I do know how to work in java. So, my problem: I'm summoning and launching a Pig with a custom Item, it's working, so far so good. Now, I want the Pig to explode as soon as it touches the ground. The thing is, I don't know which Event Handler to use and I don't know how to blow up just the SPECIFIC newly summoned Pig, because Handlers are working for all kinds of entities which are touching the ground. Or maybe it's a dumb idea to use Handlers for executing stuff when a specific pig lands on the ground? I hope you can tell me some ideas or show me some real code. With regards. Merphin Quote Link to comment Share on other sites More sharing options...
Merphin Posted June 20, 2015 Author Share Posted June 20, 2015 To keep track of a specific entity attach an IExtendedEntityProperties to it. Then you can use LivingFallEvent to do stuff while that specific pig falls. should I implement this interface you named in the class of the item which launches the pigs (summons them in the players facing direction)? or should i create a sub-class of EntityPig and implement this interface? Thank you for your quick answer! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.