Jump to content

Recommended Posts

Posted

serialize will save data of for example a Capability into a Tag and deserialize will read the data from the Tag into the Capability 

Basically you can say serialize save things (to disk) and deserialize read things (from disk)

  • Like 1
Posted (edited)
2 hours ago, diesieben07 said:

Depends entirely on the context. As it stands those are two words that you can look up in a dictionary.

Lol. I didn't mean the literate word. Of course I can review that in a translator. By definition that would mean "to repeatedly, or in succession tag/label/numerize/sent/release something", if related to actual code?

I may as well completely expressed myself wrongly. What I mend was, when do I want to use it? Is it comparable to a "for loop", only it automatically applies numbered variables?

Does it have any relation to "produce in series"?

I've seen people using it, and asking for it all the time, yet I haven't had a case to use it myself. I just want to prepared, so I actually understand when I want to use it, once it shows up. I guess I'd use it when a serializer doesn't exist for a given tag/recipe/loot_table etc.?

Edited by Cratthorax
Posted (edited)

Oh, so load from/into memory?

Like this is adding a new "serializer" to the "acceptedItems" aka -> 0_0, 0_1, 0_2 etc.???, if the length is 1? If not, it will create a new array which will serialize like 0, 1, 2, 3?

I really still don't understand what I'm talking about.

 
	   public JsonElement serialize() {
      if (this.acceptedItems.length == 1) {
         return this.acceptedItems[0].serialize();
      } else {
         JsonArray jsonarray = new JsonArray();
	         for(Ingredient.IItemList ingredient$iitemlist : this.acceptedItems) {
            jsonarray.add(ingredient$iitemlist.serialize());
         }
	         return jsonarray;
      }
   }

 

Edited by Cratthorax

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.