I'm basically trying to make a weapon with a longer reach. Currently it shoots an entity that is similar to the vanilla arrow, and I want it to despawn the entity 17 ticks after it spawns. I'm guessing it would be an event but I've experimented with that and have had 0 results. Thanks in advance for the replies!
Kind of a side tangent, but why is worldObj.removeEntity(entity) more efficient than entity.setDead()? Does entity.setDead call the worldObj.removeEntity(entity)?
Kind of a side tangent, but why is worldObj.removeEntity(entity) more efficient than entity.setDead()? Does entity.setDead call the worldObj.removeEntity(entity)?
worldObj.removeEntity(entity) removes the entity from the world, kills it, sets it to dead and also updates thing that need to be updated... I would just use it because it's used in Vanilla code when they want to get rid of an entity. No REAL difference though, I just prefer it really...
So setDead doesn't update the things that need to be updated in a timely manner or?
I have knoidea what the difference is really... If someone asked me what you would prefer... I'd use the world.removeEntity(entity)... That's all I'm saying...
My Planetminecraft Page
EDIT: Could you post example code?
My Planetminecraft Page
My Planetminecraft Page
instead of what's above. But everything else is right. Happy Modding!
Hello!
My Planetminecraft Page
worldObj.removeEntity(entity) removes the entity from the world, kills it, sets it to dead and also updates thing that need to be updated... I would just use it because it's used in Vanilla code when they want to get rid of an entity. No REAL difference though, I just prefer it really...
Hello!
I have knoidea what the difference is really... If someone asked me what you would prefer... I'd use the world.removeEntity(entity)... That's all I'm saying...
Hello!