Skip to content

Conversation

@SuperGamerTron
Copy link
Contributor

Closes #958

@extremeheat
Copy link
Member

Thanks, have you checked to make sure this is correct on all versions?

@SuperGamerTron
Copy link
Contributor Author

Everything looks correct, and tests are passing on nmp and mineflayer.

@SuperGamerTron
Copy link
Contributor Author

I checked again and tests are actually not passing, will fix.

@SuperGamerTron SuperGamerTron force-pushed the consistent-entity-metadata branch 2 times, most recently from 8fbf47f to 76a0dd4 Compare February 24, 2025 04:47
@SuperGamerTron SuperGamerTron force-pushed the consistent-entity-metadata branch from 76a0dd4 to fbc6e60 Compare February 24, 2025 05:40
@rom1504
Copy link
Member

rom1504 commented Feb 26, 2025

Is this ready?

@SuperGamerTron
Copy link
Contributor Author

Almost. 1.7/1.8 is failing and I haven't been able to fix it.

  1) Test cycle packet for version 1.8.8v
       entity_metadata packet:
     PartialReadError: Read error for undefined : undefined
      at new ExtendableError (node_modules\protodef\src\utils.js:63:13)
      at PartialReadError (node_modules\protodef\src\utils.js:70:5)
      at Object.reader [as u8] (node_modules\protodef\src\datatypes\numeric.js:89:48)
      at Object.entityMetadata (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:167:17)
      at Object.packet_entity_metadata (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:401:73)
      at eval (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:1220:70)
      at packet (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:1268:9)
      at CompiledProtodef.read (node_modules\protodef\src\compiler.js:70:12)
      at e.message (node_modules\protodef\src\compiler.js:111:49)
      at tryCatch (node_modules\protodef\src\utils.js:50:16)
      at CompiledProtodef.parsePacketBuffer (node_modules\protodef\src\compiler.js:111:29)
      at FullPacketParser.parsePacketBuffer (node_modules\protodef\src\serializer.js:68:23)
      at convertBufferToObject (test\cyclePacketTest.js:16:25)
      at testBuffer (test\cyclePacketTest.js:24:20)
      at Context.<anonymous> (test\cyclePacketTest.js:51:13)
      at process.processImmediate (node:internal/timers:511:21)

  2) Test cycle packet for version 1.8.8v
       named_entity_spawn packet:
     PartialReadError: Read error for undefined : undefined
      at new ExtendableError (node_modules\protodef\src\utils.js:63:13)
      at PartialReadError (node_modules\protodef\src\utils.js:70:5)
      at Object.reader [as u8] (node_modules\protodef\src\datatypes\numeric.js:89:48)
      at Object.entityMetadata (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:167:17)
      at Object.packet_named_entity_spawn (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:252:73)
      at eval (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:1204:76)
      at packet (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:1268:9)
      at CompiledProtodef.read (node_modules\protodef\src\compiler.js:70:12)
      at e.message (node_modules\protodef\src\compiler.js:111:49)
      at tryCatch (node_modules\protodef\src\utils.js:50:16)
      at CompiledProtodef.parsePacketBuffer (node_modules\protodef\src\compiler.js:111:29)
      at FullPacketParser.parsePacketBuffer (node_modules\protodef\src\serializer.js:68:23)
      at convertBufferToObject (test\cyclePacketTest.js:16:25)
      at testBuffer (test\cyclePacketTest.js:24:20)
      at Context.<anonymous> (test\cyclePacketTest.js:51:13)
      at process.processImmediate (node:internal/timers:511:21)

  3) Test cycle packet for version 1.8.8v
       spawn_entity_living packet:
     PartialReadError: Read error for undefined : undefined
      at new ExtendableError (node_modules\protodef\src\utils.js:63:13)
      at PartialReadError (node_modules\protodef\src\utils.js:70:5)
      at Object.reader [as u8] (node_modules\protodef\src\datatypes\numeric.js:89:48)
      at Object.entityMetadata (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:167:17)
      at Object.packet_spawn_entity_living (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:304:73)
      at eval (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:1207:78)
      at packet (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:1268:9)
      at CompiledProtodef.read (node_modules\protodef\src\compiler.js:70:12)
      at e.message (node_modules\protodef\src\compiler.js:111:49)
      at tryCatch (node_modules\protodef\src\utils.js:50:16)
      at CompiledProtodef.parsePacketBuffer (node_modules\protodef\src\compiler.js:111:29)
      at FullPacketParser.parsePacketBuffer (node_modules\protodef\src\serializer.js:68:23)
      at convertBufferToObject (test\cyclePacketTest.js:16:25)
      at testBuffer (test\cyclePacketTest.js:24:20)
      at Context.<anonymous> (test\cyclePacketTest.js:51:13)
      at process.processImmediate (node:internal/timers:511:21)

Copy link
Member

@extremeheat extremeheat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.8 is failing because entityMetadata type is wrong (missing bitfield). There could be more errors, all the versions need to be reviewed

@SuperGamerTron
Copy link
Contributor Author

Same error even with the bitfield. Is there something else I'm missing?

@rom1504
Copy link
Member

rom1504 commented Feb 27, 2025 via email

@rom1504
Copy link
Member

rom1504 commented Mar 16, 2025

Hey what's blocking here ?

@SuperGamerTron
Copy link
Contributor Author

The issue seems to be that in 1.7/1.8 the type is unable to be read by the mapper due to already being read by the bitfield.

@rom1504
Copy link
Member

rom1504 commented Mar 16, 2025 via email

@rom1504
Copy link
Member

rom1504 commented Mar 23, 2025

Can you open a node-minecraft-protocol and mineflayer PR so we can check this works ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make pc protocol entity metadata consistent across all versions

3 participants