Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.