Jump to content

Using IExtendedEntityProperties for custom (non-simple) data types


DJD

Recommended Posts

I've got an class that extends ExtendedEntityProperties that handles simple data (doubles, strings etc) for a player....

 

How does one go about implementing something more complex (like an array of doubles, or another custom object ?).

 

I am looking for a way to properly handle something relatively simple (a collection of doubles) to something more complex (saving a buffer of data which contains collections of multiple objects that form a data structure)....

 

 

I don't keep an open mind lest someone try to fill it with garbage - Mark Twain

Link to comment
Share on other sites

I was under the impression that you get/set NBTTagCompound variables with methods like getDouble(value) and setDouble(value).

 

How does one get/set the NBTTagCompount properties with a collection (or a complex data object) ?

I don't keep an open mind lest someone try to fill it with garbage - Mark Twain

Link to comment
Share on other sites

Oh, you are talking about encoding to NBT (please don't tell me you have NBT fields in your IEEP).

 

What exactly did you mean by that? Isn't IEEP made up of NBT fields? Or are you talking about putting a full compound into the IEEP?

 

In the case of putting a full compound into the IEEP, I actually think that is a good way to do it, because then your compound is more likely to be compatible with other mods -- what if your mod and another mod both add a "mana" field to the IEEP? Or maybe IEEP already handles that with an IEEP for each mod separately?

 

Anyway, when I use IEEP I tend to make a full compound, fill it with my tag fields, then write that with a mod-specific tag to IEEP.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.