Posted October 18, 201410 yr Is there anyway to make zombies not burn in daylight or edit the minecraft reference files as I cant type or edit them. I am making a zombie apocalypse mod.
October 18, 201410 yr Use the LivingUpdateEvent. If the entity is a zombie, then check Entity#isBurning() and use Entity#extinguish(). That should work. BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
October 18, 201410 yr I'm not certain of the timing of the burning processing versus the damage from fire. For example, I think while you could extinguish the flame with LivingUpdateEvent, I suspect that other code will run that will detect the light and set it on fire again and then process the damage. Again, I'm not sure, but I think the LivingUpdateEvent will fire before other onUpdate() code is run, so in this case the extinguishing may get undone. It may be more controlled if you process both the RenderLiving event (to make sure it doesn't display as on fire) and also the LivingHurtEvent (to make sure it doesn't take damage from fire). As long as you don't see fire, and it doesn't take damage from fire, I think that counts as not being on fire... Check out my tutorials here: http://jabelarminecraft.blogspot.com/
October 23, 201410 yr Author I'm not certain of the timing of the burning processing versus the damage from fire. For example, I think while you could extinguish the flame with LivingUpdateEvent, I suspect that other code will run that will detect the light and set it on fire again and then process the damage. Again, I'm not sure, but I think the LivingUpdateEvent will fire before other onUpdate() code is run, so in this case the extinguishing may get undone. It may be more controlled if you process both the RenderLiving event (to make sure it doesn't display as on fire) and also the LivingHurtEvent (to make sure it doesn't take damage from fire). As long as you don't see fire, and it doesn't take damage from fire, I think that counts as not being on fire... Okay but how do I edit the zombie entity files?
October 23, 201410 yr You cannot edit minecraft source files, just do what shieldbug said to do. There's 10 types of people in this world; Those that understand binary and those that don't.
October 24, 201410 yr Okay but how do I edit the zombie entity files? You don't have to. We said you should use event handling to do it. When the events we mentioned fire, your handler should just check if it is firing for a zombie and if it is then do what you need to do to extinguish the fire. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.