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

New data in minecraft-data

Open rom1504 opened this issue 10 years ago • 14 comments
trafficstars

There's some more data that I think can go from mineflayer to minecraft-data :

  • [ ] animationEvents / entityStatusEvents / spawnedObjectTypes / mobTypes https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/entities.js#L10 https://github.com/andrewrk/mineflayer/issues/207 https://github.com/PrismarineJS/minecraft-data/issues/11
  • [ ] NAMED_ENTITY_HEIGHT / CROUCH_HEIGHT https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/entities.js#L5
  • [ ] dimension_names https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/game.js#L3
  • [ ] difficultyNames https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/game.js#L9
  • [ ] gameModes https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/game.js#L46
  • [ ] physics constants https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/physics.js#L16
  • [ ] viewDistanceToBits https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/settings.js#L11
  • [ ] armorSlots https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/simple_inventory.js#L9
  • [ ] QUICK_BAR_COUNT and QUICK_BAR_START https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/simple_inventory.js#L6
  • [ ] INVENTORY_SLOT_COUNT https://github.com/andrewrk/mineflayer/blob/master/lib/windows.js#L7
  • [ ] windows https://github.com/andrewrk/mineflayer/blob/master/lib/windows.js#L22 : some change in mineflayer code needed for this, the data is at least : window names, inventorySlotStart

See what kind of .json this would go into.

rom1504 avatar Mar 27 '15 14:03 rom1504

maybe these kind of thing too https://github.com/AlexKvazos/MinecraftChat/blob/master/app/server/parsers/vanilla.js

rom1504 avatar Apr 30 '15 00:04 rom1504

spawnedObjectTypes / mobTypes are integrated (entities.json)

rom1504 avatar May 04 '15 00:05 rom1504

Wurstmineberg has a decent collection: https://github.com/wurstmineberg/assets.wurstmineberg.de/tree/master/json

Gjum avatar Aug 31 '15 16:08 Gjum

Those Physics constants are only true for Mineflayer's implementation of Physics which is divergent from the 20tps notchian standard (Mineflayer physics run at 50tps). Physics constants should probably come from the wiki

http://minecraft.gamepedia.com/Transportation http://minecraft.gamepedia.com/Gravity#Motion_of_entities

nickelpro avatar Sep 01 '15 02:09 nickelpro

no, mineflayer physics run at 20tps https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/physics.js#L12 (the position update run at 50tps but that's a separate thing)

Now minecraft-data should probably use the /tick unity yes.

rom1504 avatar Sep 01 '15 07:09 rom1504

@Gjum yeah I saw that. Not sure what we need from what they have, not sure if taking what they have is a correct extraction process (what happens when they stop updating ?)

rom1504 avatar Sep 01 '15 07:09 rom1504

@rom1504 You have your calculation backwards Physics runs every 20ms, 1sec/20ms is 50tps Position Update runs every 50ms, 1sec/50ms is 20tps

Which makes perfect sense, if Mineflayer was updating at 50tps it would get hungry and die very quickly. Notchian client runs Physics and Player Update at the same time, 20tps. I never understood why Mineflayer ran Physics so fast.

nickelpro avatar Sep 01 '15 15:09 nickelpro

Ah indeed you're right. I don't know why we are running physics so fast, I think at some point I tried to change it to the same value as position and it didn't change much, I might try that again. But anyway, mineflayer takes into account the deltaSecond before the last iteration (https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/physics.js#L127), so our values are independent of the ticking speed.

Edit: it seems all of mineflayer's physics was done in this commit https://github.com/andrewrk/mineflayer/commit/0e57f5398af43d3e9138ed6f9ea3b46fc1908271 Idk where andrewrk was taking his values, but it might be related to an old minecraft version.

Edit: alright I did some digging and found this https://github.com/andrewrk/mineflayer/blob/8ad380b0226aa5c57835d73231cd9a6283519e93/src/PhysicsDoer.cpp#L5 back in mineflayer cpp days (that's the last commit before the switch to node.js) This is the correct value (20 tps), so I believe the explanation is simple : the position update was (https://github.com/andrewrk/mineflayer/blob/8ad380b0226aa5c57835d73231cd9a6283519e93/src/Game.cpp#L24) in the ms format and the physics update was in the tps format. When converting he didn't think about it, and made the same mistake I just did up there, and here we are.

I'll try later to put everything to the correct ticking speed, I'm pretty sure it doesn't change anything.

rom1504 avatar Sep 01 '15 15:09 rom1504

Please add http://wiki.vg/Entities#Mobs, as this is not the same as in #11.

Gjum avatar Sep 23 '15 19:09 Gjum

Seems both page have pbs (http://minecraft.gamepedia.com/Data_values/Entity_IDs and http://wiki.vg/Entities#Mobs), better fix them before doing anything.

rom1504 avatar Sep 23 '15 19:09 rom1504

  • [ ] Enums of http://wiki.vg/Protocol in general (the non packet table), a bit like instruments.json (http://wiki.vg/Block_Actions) see https://github.com/PrismarineJS/minecraft-data/pull/56#issuecomment-137090220

rom1504 avatar Oct 13 '15 15:10 rom1504

  • [ ] http://wiki.vg/Protocol#Particle (#75)

Gjum avatar Oct 13 '15 15:10 Gjum

I came across another possible source of data http://technical-minecraft.wikia.com/

Gjum avatar Dec 20 '15 23:12 Gjum

This page lists containers that store items. This can be presented in windows.json as a persistent flag to indicate if an item that is deposited in there will drop when the window is closed or if it will still be in there when the container is reopened.

Also some windows send a Number Of Slots = 0 when getting opened, which is probably related to this persistent flag.

Gjum avatar Jan 29 '16 01:01 Gjum