Posted December 2, 201311 yr I'm porting a vanilla mod to Forge, and i need some way to know when a entity is destroyed, but i have only found the LivingDeathEvent, and this fires when the entity dies. The mod i'm porting is WorldDownloader. See ya!
December 3, 201311 yr Hi What do you mean exactly by "destroyed"? Do you mean when World.onEntityRemoved is called (entity is unloaded / freed)? If so, I don't think there is any such hook. You could perhaps use ITickHandler to search the EntityTracker in WorldServer to see if your entity of interest has been removed. Depends what you want to do, really. -TGG
December 3, 201311 yr Author Yes, that is what i meant, World.onEntityRemoved. As i said, i'm trying to port WorldDownloader to Forge, and i want leave base classes untouched. This is what I'm working on now: https://github.com/dslake/WorldDownloader/blob/master/src/WorldClient.java#L260 See ya!
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.