Posted July 12, 201510 yr hi to be more specific i want a helmet to light up the surrounding area like a torch when it is equipped but i cant find any onEquip functions. was looking for an event method also but couldnt find anything. any help is appreciated thanks
July 12, 201510 yr i am not sure if there is player update event, else use entity update , check if its a player, than check if he has the armor equipped, thatn ligt up area
July 12, 201510 yr Armour have method onArmorTick - called when you are wearing armour. (inside your armour class, override it). For vanilla armour - indeed - PlayerTickEvent or LivingUpdateEvent, check eq and do stuff. 1.7.10 is no longer supported by forge, you are on your own.
July 13, 201510 yr This is assuming that you'd be changing the light level of the block where the player's head is. What you could do is save the player's last x, y, and z location somehow and on every armor tick, compare that to the player's current location. If that has changed, set the old location's light level to 0 and the new location to 15. It's also worth noting that doing several light updates a second could be problematic. I like trains.
July 13, 201510 yr Hi You might find this mod useful http://www.atomicstryker.net/dynamiclights.php It is designed so that your mod can talk to it - turn on lights, turn them off again. You can even tell it that your helmet should glow. Much easier and faster than reinventing the wheel yourself (and much more likely to work, take it from me). -TGG
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.