mineflayer
mineflayer copied to clipboard
start work on 1.19
did chat more or less
next: checking https://github.com/PrismarineJS/minecraft-data/pull/587/commits/4caba63eea29c269dc0077a22fe8bf4aefbfe4c1 https://github.com/PrismarineJS/minecraft-data/pull/587/commits/4e845dcbdeba04b5a5e1cde66fd6914678da665a https://github.com/PrismarineJS/minecraft-data/pull/587/commits/f816c05200187ea71c15f2619caa242e2bd8cf1d https://github.com/PrismarineJS/minecraft-data/pull/587/commits/5ef06f1c54ee818a67ec2c5cd884b9c32fd2e1c6 to see what to add here
checking if any prismarine-* need change as well
Error: [Prismarine-chunk] No chunk implementation for pc 1.19 found
https://github.com/PrismarineJS/prismarine-chunk/pull/196
pchunk done
next handle all changes from https://wiki.vg/index.php?title=Pre-release_protocol&oldid=17659
immediate one is handle dimension -> registryCodec in login packet
https://github.com/PrismarineJS/mineflayer/blob/9497b67d85082317bf7bf7a19427ed9371cb2f49/lib/plugins/game.js#L25 needs fixing
https://github.com/PrismarineJS/minecraft-data/pull/621 & https://github.com/PrismarineJS/prismarine-registry/pull/14 fix the login packet handling
Uncaught TypeError: Cannot read property 'value' of undefined
at Object.simplify (node_modules/prismarine-nbt/nbt.js:155:25)
at handleRespawnPacketData (lib/plugins/game.js:40:33)
at Client.<anonymous> (lib/plugins/game.js:58:5)
login packet handling need fixing there
So there's dimension and dimensionCodec in login packet https://github.com/PrismarineJS/mineflayer/blob/master/lib/plugins/game.js#L39
In 1.19 there's only dimensionCodec
Where is world max height located now ?
We need to fix that line of game.js
here needed is https://github.com/PrismarineJS/minecraft-data/issues/636
need https://github.com/PrismarineJS/prismarine-registry/pull/18 and fix release for https://github.com/PrismarineJS/prismarine-chat/actions/runs/3159953313/jobs/5143822604
Also looks like spawn_entity packet structure may be incorrect
PartialReadError: Read error for undefined : undefined
at new ExtendableError (/workspace/mineflayer/node_modules/protodef/src/utils.js:63:13)
at new PartialReadError (/workspace/mineflayer/node_modules/protodef/src/utils.js:70:5)
at Object.readVarInt [as varint] (/workspace/mineflayer/node_modules/protodef/src/datatypes/utils.js:69:45)
at Object.packet_spawn_entity (eval at compile (/workspace/mineflayer/node_modules/protodef/src/compiler.js:258:12), <anonymous>:499:65)
at eval (eval at compile (/workspace/mineflayer/node_modules/protodef/src/compiler.js:258:12), <anonymous>:2312:64)
And villager tests are failing, may be some updates there
Chat seems to fail with these changes
Tests are passing Next steps:
- [ ] Check non tested examples still run
- [ ] inventory.js
- [ ] chest.js
- [ ] digger.js
- [ ] jumper.js
Actually tests definitely not passing
failures left:
4 failing
1) mineflayer_external 1.19
trade:
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'polished_andesite'
- 'pumpkin_pie'
+ expected - actual
-polished_andesite
+pumpkin_pie
at /home/runner/work/mineflayer/mineflayer/test/externalTests/trade.js:43:14
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
2) mineflayer_external 1.19
"before each" hook for "useChests":
Error: Timeout of 600000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/mineflayer/mineflayer/test/externalTest.js)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
3) mineflayer_internal 1.19
world
switchWorld respawn:
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/mineflayer/mineflayer/test/internalTest.js)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
4) mineflayer_internal 1.19
"after each" hook for "switchWorld respawn":
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/mineflayer/mineflayer/test/internalTest.js)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
- trading external
- useChests external
- switch world internal
switchWorld is passing now with #2788 , rest are still failing including entity tests in internal
Looks like entities test is failing because of the spawn_entity_living packet. The packet name is wrong/misleading. It should be named named_entity_spawn. After a name change the entity tests should work again.
Fixed the issue with entity spawning above, with minor comment above about UUID field
Most tests minus villager one for 1.19 are passing with https://github.com/PrismarineJS/node-minecraft-data/pull/240
1.13 fishing failing 1.19 use chest and trading failing
Fishing for 1.13 is also failing? Was that working before?
Yes all non 1.19 tests were working before
ok, everything is passing minus 1.13 fishing. Not clear why, nothing seems to have changed between 1.12 - 1.14
https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.12/entities.json#L3 https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.13.2/entities.json#L315 https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.14/entities.json#L345
It looks like https://github.com/PrismarineJS/mineflayer/blob/e28e878b3cdeac7040104461a088a29f93492011/lib/plugins/fishing.js#L24 is not getting called
Could it be related to change made wrt spawn entity packet ?
On Mon, Oct 10, 2022, 13:17 extremeheat @.***> wrote:
ok, everything is passing minus 1.13 fishing. Not clear why, nothing seems to have changed between 1.12 - 1.14
https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.12/entities.json#L3
https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.13.2/entities.json#L315
https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.14/entities.json#L345
It looks like https://github.com/PrismarineJS/mineflayer/blob/e28e878b3cdeac7040104461a088a29f93492011/lib/plugins/fishing.js#L24 is not getting called
— Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/pull/2743#issuecomment-1273159862, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437SSGPEKQYFC5MAOJYLWCP3ONANCNFSM56TYB5MQ . You are receiving this because you authored the thread.Message ID: @.***>
In version 1.13.2 tests: test/externalTests/fishing.js, The variable "collected" in the onPlayerCollect function has a type of 'object' and a name of 'item-stack'. In version 1.14.4 and greater tests: test/externalTests/fishing.js, The variable "collected" in the onPlayerCollect function has a type of 'mob' and a name of 'item'.
I changed "if (collected.name.toLowerCase() === 'item')" to : "if (collected.name.toLowerCase() === 'item' || collected.type === 'object')" and it works
yeah, I'm looking through the source code for 1.13 entities and the data in mc-data doesn't make sense. There's entities that aren't registered ("evocation_fangs") and the IDs are wrong.
https://github.dev/extremeheat/extracted_minecraft_data/blob/client1.13.2/client/net/minecraft/entity/EntityType.java#L145
Maybe we can copy from 1.14 and remove additional? Or redo the extraction
I looked at the changes and it looks good to me.
Next steps :
- Fixing that fishing test for 1.13
- testing manually inventory.js chest.js digger.js jumper.js
Is someone interested to running these examples now ? Would gain some time
We'll need to support 1.19.2 next but I figure it'll be minor
I'm not too familiar with this project, but I can try to do some of that testing.
By manual testing, do you mean testing the plug-ins in the game?