Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity json file #11

Closed
rom1504 opened this issue Apr 1, 2015 · 15 comments
Closed

Entity json file #11

rom1504 opened this issue Apr 1, 2015 · 15 comments
Labels

Comments

@rom1504
Copy link
Member

rom1504 commented Apr 1, 2015

Currently we have that https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/entities.js#L28
A lot of missing data compared to http://minecraft.gamepedia.com/Data_values/Entity_IDs

I propose a json like that :

{
 "10": 
   {
      "id": 10,
      "name":"Arrow",
      "type":"Projectile"
   }
}

It would also be possible to have one json file for every type of entity but that would be a lot of files, I think it's probably better to put everything in one file.

@rom1504 rom1504 mentioned this issue Apr 1, 2015
11 tasks
@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

Actually I don't think we need displayName and it's a bit annoying to get.

@Darthfett
Copy link

/Darthfett/helperbot I believe would need displayName to lookup blocks and items. It would be good to provide the same API here, if any projects end up needing it for entities. For example, a bot that tells you how many entities are in range (and their names).

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

Why would you need the displayName ? Isn't the name enough ?
(5th column vs 6th column of http://minecraft.gamepedia.com/Data_values/Entity_IDs)

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

@Darthfett
Copy link

I'm not even sure the original proposal would work. It looks like the
Wither Skeletons and Skeletons are grouped as one type of entity.
On Apr 1, 2015 11:21 AM, "Romain Beaumont" notifications@github.com wrote:

isn't this enough
https://github.com/PrismarineJS/minecraft-data/blob/master/enums/entities.json
?


Reply to this email directly or view it on GitHub
#11 (comment)
.

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

Well they have the same id

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

I'm not saying this is perfect, but it's still much better than the current mineflayer thing (https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/entities.js#L28)

I don't know how the game knows the difference between Wither Skeletons and Skeletons

@Darthfett
Copy link

Sounds like a similar problem as the one we are solving with blocks. Do
entities have metadata too? Maybe we can use a similar solution as the one
we use for blocks.

Well they have the same id


Reply to this email directly or view it on GitHub
#11 (comment)
.

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

Hmm I don't think they have metadata (https://github.com/andrewrk/mineflayer/blob/master/lib/entity.js), maybe it's just the equipment they wear ?

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

ok maybe entities have metadata https://github.com/PrismarineJS/node-minecraft-protocol/blob/master/src/protocol.js#L141

the value is not in the wiki though, so I'm going to ignore it for now (at least until we know something about it)

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

some info about the metadata http://wiki.vg/Entities#Skeleton

@rom1504
Copy link
Member Author

rom1504 commented Apr 1, 2015

many kinds of spawn_* https://github.com/PrismarineJS/node-minecraft-protocol/blob/master/src/protocol.js#L156 , what's an "entity" ?

rom1504 added a commit that referenced this issue Apr 27, 2015
@rom1504
Copy link
Member Author

rom1504 commented Apr 27, 2015

I added displayName in the end. I think this file is in a decent enough state to be used in mineflayer. Metadata information can be added afterwards (probably when it's done for items and blocks)

@rom1504
Copy link
Member Author

rom1504 commented May 3, 2015

I don't know if we really want to put metadata in that file. There's just the skeleton that has a simple variation.
The rest is all functional metadata that I'm not sure at all should be in that .json (see http://wiki.vg/Entities#Entity_Metadata)

@rom1504
Copy link
Member Author

rom1504 commented May 4, 2015

So yeah indeed, entity metadata is a functional thing. It should be handle case by case in mineflayer code, not in entities.json.

File now integrated in mineflayer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants