Jump to content

Recommended Posts

Posted

Hello, I know it's possible to set a custom NBT tag using IExtendedEntityProperties to persist through respawn etc. How would this be achieved? Actually setting the tag to be persistent instead of resetting on death..

Posted

One way I've seen and used is to store the IExtendedEntityProperty data temporarily outside of the player when the player dies, then reload it when the player rejoins.

 

There is also PERSISTED_NBT_TAG (I think that's what it's called, I don't have Eclipse handy at the moment) in EntityPlayer, but I haven't been able to use that successfully yet.

 

Check here for a working example: http://www.minecraftforum.net/topic/1952901-eventhandler-and-iextendedentityproperties/#entry24051513

Posted

The persistent tag is used on the entity nbt, which is returned by getEntityData().

This is the only part of the NBT that will be kept by Minecraft on respawn.

Data from IExtendedProperty is copied for loading and changing dimension, but not on respawn.

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.

×
×
  • Create New...

Important Information

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