minecraft-data icon indicating copy to clipboard operation
minecraft-data copied to clipboard

Improving entities data

Open rom1504 opened this issue 9 years ago • 14 comments

See http://minecraft.gamepedia.com/Alpha_Level_Format/Chunk_File_Format#ArmorStand and http://wiki.vg/Entities#ArmorStand and https://github.com/PrismarineJS/minecraft-data/issues/6#issuecomment-142706462

rom1504 avatar Oct 08 '15 12:10 rom1504

apparently wiki.vg is correct, non-unique ids

rom1504 avatar Oct 11 '15 03:10 rom1504

also related to #11

Gjum avatar Oct 11 '15 13:10 Gjum

I finally checked with flying-squid : 61 is both blaze and snowball. mcwiki non-mobs ids are wrong (see http://minecraft.gamepedia.com/Talk:Data_values/Entity_IDs) Concerning mcdata, I'm going to make an extractor taking its data from wiki.vg.

The type should be the same as the one in the mc protocol as this is what's useful (these ones https://github.com/PrismarineJS/prismarine-entity#entitytype) and I think it's okay to have non unique ids, we will just have to take that into account when building the indexer.

rom1504 avatar Nov 16 '15 22:11 rom1504

What is the current state here? Are there plans on the JSON format/schema yet, especially entity metadata representation? Is the data on wiki.vg still completely valid?

Gjum avatar Jan 10 '16 02:01 Gjum

Still plan on extracting both from the mcwiki and wiki.vg to have both set of ids, but I haven gotten to do it yet. I guess I might do it soon.

rom1504 avatar Jan 10 '16 02:01 rom1504

about entity metadata : see http://wiki.vg/Pre-release_protocol#Entity_Metadata and http://wiki.vg/Entities#Entity_Metadata

I think the idea is something like

[
 { 
   "index":17,
   "type":"int",
   "meaning":"Shaking Power"
  }
]

For things with a bitmask, possible values could be there too.

What I'm really unsure about is the classes thing. Do we want to store the extend relationship in the .json file, should it be all in the same .json file or an other one ?

rom1504 avatar Jan 10 '16 06:01 rom1504

Each entity metadata class can only extend one other class, so an optional extends field is fine. One other way would be to preprocess the extending, ie. each entry stores both the listed, "additional" items, and the inherited items, all in one json list.

Example: Ender Crystal extends Entity by adding index 8 to Entity's 0, 1, 4. So Ender Crystal could be:

  • using extension: "extends": "Entity", "metadata": [{"index": 8, ...}]
  • preprocessed: "metadata": [{"index": 0, ...}, {"index": 1, ...}, {"index": 4, ...}, {"index": 8, ...}]

Gjum avatar Jan 10 '16 18:01 Gjum

so entities.json is done.

Remaining : entity metadata. Which will go in its own file, probably entities_metadata.json

rom1504 avatar Jan 10 '16 20:01 rom1504

@Gjum I think the first format is probably the best.

And then X-minecraft-data or users (would it belong in X-minecraft-data ?) could have go through the extends to generate the whole available fields.

rom1504 avatar Jan 10 '16 22:01 rom1504

Seems like there are no reliable sources for entity metadata online (for versions 1.8 - 1.16 at least), and extracting this from game files will be a major pain - the way metadata handling is coded differs from entity to entity However this will be needed very soon, for webclient and viewer UPD: I will try to update burger-extractor to handle that

Moondarker avatar Mar 21 '21 06:03 Moondarker

Wiki.vg is pretty reliable

On Sun, Mar 21, 2021, 07:12 Moondarker @.***> wrote:

Seems like there are no reliable sources for entity metadata online (for versions 1.8 - 1.16 at least), and extracting this from game files will be a major pain - the way metadata handling is coded differs from entity to entity

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/minecraft-data/issues/72#issuecomment-803519489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437SKO3YNS4QPEJYLDD3TEWE6FANCNFSM4BRNFXKA .

rom1504 avatar Mar 21 '21 09:03 rom1504

Wiki.vg is pretty reliable On Sun, Mar 21, 2021, 07:12 Moondarker @.***> wrote: Seems like there are no reliable sources for entity metadata online (for versions 1.8 - 1.16 at least), and extracting this from game files will be a major pain - the way metadata handling is coded differs from entity to entity — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#72 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437SKO3YNS4QPEJYLDD3TEWE6FANCNFSM4BRNFXKA .

For latest version - yes, but we want to get everything from 1.8 to 1.16 and there are no milestones

Moondarker avatar Mar 21 '21 09:03 Moondarker

You can get that by looking at the page history. Yes you'd need to find the right revisions.

rom1504 avatar Mar 21 '21 09:03 rom1504

1.19.4 pc entity metadata in https://gist.github.com/extremeheat/b67562233b673ec58bd63f21cfab1945, via extraction script ran on source code

extremeheat avatar Jun 05 '23 07:06 extremeheat