Jump to content

storing and recalling custom Player's data


spiritfilled

Recommended Posts

hiii :3
i just want to know, how to store entity data at 1.16 to 1.17

ive been doing this before at 1.12:

player.getEntityData().setByte("om_orientation", (byte) 0);

i don't know how it is in 1.17

i saw something on Player.Class, it goes like this...

this.getEntityData().set(DATA_PLAYER_ABSORPTION_ID, p_36396_);

but DATA_PLAYER_ABSORPTION_ID, is EntityDataAccessor <T> (dunno what that is)

   private static final EntityDataAccessor<Float> DATA_PLAYER_ABSORPTION_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.FLOAT);

im doing a thing where i store tick counts on each player, i dunno if there is a simpler way of doing it or whatsoever

can anyone pls help. thanks :3

Link to comment
Share on other sites

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.