You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PartialReadError: Read error for undefined : varint is too big: 70
at new ExtendableError (D:\NodeJs\craft\node_modules\protodef\src\utils.js:63:13)
at new PartialReadError (D:\NodeJs\craft\node_modules\protodef\src\utils.js:70:5)
at Object.readVarInt [as varint] (D:\NodeJs\craft\node_modules\protodef\src\datatypes\varint.js:27:27)
at Object.IDSet (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :143:39)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3140:43)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3145:17)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3149:15)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3151:13)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3162:11)
at Object.packet_recipe_book_add (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3167:9)
Chunk size is 80 but only 21 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":32,"add_player":false,"initialize_chat":false,"update_game_mode":false,"update_listed":false,"update_latency":false,"update_display_name":true,"update_priority":false},"data":[{"uuid":"3b5dec80-c2c9-4da3-b78a-7b0dad698875","displayName":{"type":"byte","value":10}}]}}; buffer :4020013b5dec80c2c94da3b78a7b0dad698875010a080004746578740031c2a730c2a730c2a739c2a739c2a766e7949fe5ad98e88085c2a772c2a7382dc2a77273616e626f6e7a616b757261c2a73800
Chunk size is 107 but only 21 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":32,"add_player":false,"initialize_chat":false,"update_game_mode":false,"update_listed":false,"update_latency":false,"update_display_name":true,"update_priority":false},"data":[{"uuid":"a57ff05b-abb8-4d0d-bee1-c04497f6d246","displayName":{"type":"byte","value":10}}]}}; buffer :402001a57ff05babb84d0dbee1c04497f6d246010a08000474657874004cc2a733e5bba2e59c9fe7a59ee8a9b1c2a772c2a7382dc2a772416e5f416e6479c2a7382dc2a772c2a7375bc2a764e296a1c2a7375dc2a772c2a772c2a7375bc2a738e296a0c2a7375dc2a77200
Chunk size is 79 but only 21 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":32,"add_player":false,"initialize_chat":false,"update_game_mode":false,"update_listed":false,"update_latency":false,"update_display_name":true,"update_priority":false},"data":[{"uuid":"42c4b208-1aa2-4e4c-9166-dbf42b2f7b67","displayName":{"type":"byte","value":10}}]}}; buffer :40200142c4b2081aa24e4c9166dbf42b2f7b67010a080004746578740030c2a730c2a730c2a739c2a739c2a766e7949fe5ad98e88085c2a772c2a7382dc2a77253776966744172726f7732c2a73800
Chunk size is 1213 but only 1154 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":127,"add_player":true,"initialize_chat":true,"update_game_mode":true,"update_listed":true,"update_latency":true,"update_display_name":true,"update_priority":true},"data":[{"uuid":"3b5dec80-c2c9-4da3-b78a-7b0dad698875","player":{"name":"sanbonzakura","properties":[{"key":"textures","value":"ewogICJ0aW1lc3RhbXAiIDogMTczNzA0MDU3OTQyMiwKICAicHJvZmlsZUlkIiA6ICIzYjVkZWM4MGMyYzk0ZGEzYjc4YTdiMGRhZDY5ODg3NSIsCiAgInByb2ZpbGVOYW1lIiA6ICJzYW5ib256YWt1cmEiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmQxOTYyZmYyOWMwMzVhYzAwYjAzOWVhMGRjMGE2YzI4OTk5NDdmYzQwNGY4YTVmMDNkMzQyMDNkOTg1YThjYyIKICAgIH0KICB9Cn0=","signature":"cnkEgffpg2WQ6QMuWkXqYF7Iwduq5DEPO9iX3m7Dbqae4xL81hEWJHJBrQl6YsIFzVkj/qgEIaE3xVPsHOmyRt8FBIhWnWOp4YhqVKbI+D5haU/OVudv3vZW333Bb3QW6ZaGANB53eeo3C+Zb8fsCA9VXE4Ifgb+fMhZTiZA3NEbqGLT/uPV5WW4+JosG98DRJE0KOQx3YvRcMjmzbRuKJnAQtpLVNnJ8tNztGmLypvbZBAvLrGSVW/vi85zrAcpB9dLhP6ESe7c/OK26NdwFjX9ETS3k5i9A2YLNU/+9dq6F+N7Yo3ejFIKYGEnLv5V+Q8vmEAFwPP0SXG6TDbrp8zNxD+CdB5kfIXoqmb7WaQbfB+o6ZY4xwV4DhVN33aggQ1LFv/T7gJLrGqAAjU9i0UOENWG2/6hPZmjnqeq5ID7lC2wBtuAAldOw2bQpUIuZ9+UVKGkjWMaGirx1f9dMgM7fufZA77hf8jKO2z+M40YrUpzVxb2aRquE6FyTrgwIFMVFr4T9fWmju3ZH1hh3mbFAjXDV11vaVSkWX/Iwu77K90kOOTvdjq5jPLbqmhSvhyEvGeiqhEkPZgFMT+vqAVBxwKxHiAXCS5O6zxHDDQQ3CGIZJoIlPNVVttqNeEX4VIWjS/ZkJ9gydc1rxeior6c0xCGFetc4swR9+wGoRE="}]},"gamemode":0,"listed":1,"latency":0,"displayName":{"type":"byte","value":10},"listPriority":8}]}}; buffer :407f013b5dec80c2c94da3b78a7b0dad6988750c73616e626f6e7a616b75726101087465787475726573a00365776f6749434a306157316c633352686258416949446f674d54637a4e7a41304d4455334f5451794d69774b4943416963484a765a6d6c735a556c6b496941364943497a596a566b5a574d344d474d79597a6b305a47457a596a6334595464694d4752685a4459354f4467334e53497343694167496e427962325a706247564f5957316c4969413649434a7a595735696232353659577431636d45694c416f6749434a7a6157647559585231636d56535a58463161584a6c5a4349674f694230636e566c4c416f6749434a305a58683064584a6c637949674f69423743694167494341695530744a546949674f694237436941674943416749434a31636d776949446f67496d6830644841364c7939305a58683064584a6c637935746157356c59334a685a6e5175626d56304c33526c65485231636d5576596d51784f5459795a6d59794f574d774d7a5668597a4177596a417a4f5756684d47526a4d474532597a49344f546b354e44646d597a51774e4759345954566d4d444e6b4d7a51794d444e6b4f5467315954686a5979494b494341674948304b49434239436e303d01ac05636e6b45676666706732575136514d75576b58715946374977647571354445504f396958336d37446271616534784c38316845574a484a4272516c36597349467a566b6a2f7167454961453378565073484f6d7952743846424968576e574f7034596871564b62492b44356861552f4f5675647633765a573333334262335157365a6147414e42353365656f33432b5a6238667343413956584534496667622b664d685a54695a41334e456271474c542f755056355757342b4a6f7347393844524a45304b4f517833597652634d6a6d7a6252754b4a6e415174704c564e6e4a38744e7a74476d4c797076625a4241764c72475356572f766938357a724163704239644c68503645536537632f4f4b32364e6477466a5839455453336b3569394132594c4e552f2b39647136462b4e37596f33656a46494b5947456e4c7635562b5138766d45414677505030535847365444627270387a4e78442b436442356b6649586f716d62375761516266422b6f365a5934787756344468564e333361676751314c46762f5437674a4c72477141416a55396930554f454e5747322f3668505a6d6a6e716571354944376c43327742747541416c644f77326251705549755a392b55564b476b6a574d6147697278316639644d674d376675665a4137376866386a4b4f327a2b4d3430597255707a5678623261527175453646795472677749464d56467234543966576d6a75335a48316868336d6246416a5844563131766156536b57582f49777537374b39306b4f4f5476646a71356a504c62716d685376687945764765697168456b505a67464d542b767141564278774b78486941584353354f367a784844445151334347495a4a6f496c504e56567474714e654558345649576a532f5a6b4a396779646331727865696f723663307843474665746334737752392b77476f52453d00000100010a080004746578740031c2a730c2a730c2a739c2a739c2a766e7949fe5ad98e88085c2a772c2a7382dc2a77273616e626f6e7a616b757261c2a7380000
RangeError [ERR_OUT_OF_RANGE]: Read error for undefined : The value of "offset" is out of range. It must be >= 0 and <= 3458. Received -1973594525
at boundsError (node:internal/buffer:88:9)
at Buffer.readUInt8 (node:internal/buffer:254:5)
at Object.readVarInt [as varint] (D:\NodeJs\craft\node_modules\protodef\src\datatypes\varint.js:20:25)
at Object.string (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :103:61)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :1572:61)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :1583:11)
at Object.game_profile (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :1588:9)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3019:51)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3022:13)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3060:11) {
code: 'ERR_OUT_OF_RANGE',
field: 'play.toClient'
}
發生無法預期的錯誤: RangeError [ERR_OUT_OF_RANGE]: Deserialization error for play.toClient : Read error for undefined : The value of "offset" is out of range. It must be >= 0 and <= 3458. Received -1973594525
The text was updated successfully, but these errors were encountered:
Title: Recipe ID format change in Minecraft 1.21.3 breaks crafting functionality
Description:
I've identified a critical issue with recipe handling in Minecraft 1.21.3. Starting from this version, Minecraft has changed recipe IDs from strings to dynamic numeric IDs that require server synchronization.
Current Behavior:
Bot crashes with error: "PartialReadError: Read error for undefined : varint is too big: 70" when handling recipe_book_add packets
Error occurs because the code expects string IDs but receives numeric IDs
Expected Behavior:
Bot should first receive and store the recipe registry mapping from server
Use numeric recipe IDs for crafting requests instead of string IDs
Technical Details:
The server now sends a registry synchronization packet containing recipe ID mappings
Recipe IDs changed from string format (e.g. "minecraft:crafting_table") to dynamic numeric IDs
The crafting system needs to:
Handle the registry sync packet
Store the recipe ID mappings
Use numeric IDs when sending craft_recipe_request packets
Versions
Your current code
PartialReadError: Read error for undefined : varint is too big: 70
at new ExtendableError (D:\NodeJs\craft\node_modules\protodef\src\utils.js:63:13)
at new PartialReadError (D:\NodeJs\craft\node_modules\protodef\src\utils.js:70:5)
at Object.readVarInt [as varint] (D:\NodeJs\craft\node_modules\protodef\src\datatypes\varint.js:27:27)
at Object.IDSet (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :143:39)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3140:43)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3145:17)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3149:15)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3151:13)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3162:11)
at Object.packet_recipe_book_add (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3167:9)
Chunk size is 80 but only 21 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":32,"add_player":false,"initialize_chat":false,"update_game_mode":false,"update_listed":false,"update_latency":false,"update_display_name":true,"update_priority":false},"data":[{"uuid":"3b5dec80-c2c9-4da3-b78a-7b0dad698875","displayName":{"type":"byte","value":10}}]}}; buffer :4020013b5dec80c2c94da3b78a7b0dad698875010a080004746578740031c2a730c2a730c2a739c2a739c2a766e7949fe5ad98e88085c2a772c2a7382dc2a77273616e626f6e7a616b757261c2a73800
Chunk size is 107 but only 21 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":32,"add_player":false,"initialize_chat":false,"update_game_mode":false,"update_listed":false,"update_latency":false,"update_display_name":true,"update_priority":false},"data":[{"uuid":"a57ff05b-abb8-4d0d-bee1-c04497f6d246","displayName":{"type":"byte","value":10}}]}}; buffer :402001a57ff05babb84d0dbee1c04497f6d246010a08000474657874004cc2a733e5bba2e59c9fe7a59ee8a9b1c2a772c2a7382dc2a772416e5f416e6479c2a7382dc2a772c2a7375bc2a764e296a1c2a7375dc2a772c2a772c2a7375bc2a738e296a0c2a7375dc2a77200
Chunk size is 79 but only 21 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":32,"add_player":false,"initialize_chat":false,"update_game_mode":false,"update_listed":false,"update_latency":false,"update_display_name":true,"update_priority":false},"data":[{"uuid":"42c4b208-1aa2-4e4c-9166-dbf42b2f7b67","displayName":{"type":"byte","value":10}}]}}; buffer :40200142c4b2081aa24e4c9166dbf42b2f7b67010a080004746578740030c2a730c2a730c2a739c2a739c2a766e7949fe5ad98e88085c2a772c2a7382dc2a77253776966744172726f7732c2a73800
Chunk size is 1213 but only 1154 was read ; partial packet : {"name":"player_info","params":{"action":{"_value":127,"add_player":true,"initialize_chat":true,"update_game_mode":true,"update_listed":true,"update_latency":true,"update_display_name":true,"update_priority":true},"data":[{"uuid":"3b5dec80-c2c9-4da3-b78a-7b0dad698875","player":{"name":"sanbonzakura","properties":[{"key":"textures","value":"ewogICJ0aW1lc3RhbXAiIDogMTczNzA0MDU3OTQyMiwKICAicHJvZmlsZUlkIiA6ICIzYjVkZWM4MGMyYzk0ZGEzYjc4YTdiMGRhZDY5ODg3NSIsCiAgInByb2ZpbGVOYW1lIiA6ICJzYW5ib256YWt1cmEiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmQxOTYyZmYyOWMwMzVhYzAwYjAzOWVhMGRjMGE2YzI4OTk5NDdmYzQwNGY4YTVmMDNkMzQyMDNkOTg1YThjYyIKICAgIH0KICB9Cn0=","signature":"cnkEgffpg2WQ6QMuWkXqYF7Iwduq5DEPO9iX3m7Dbqae4xL81hEWJHJBrQl6YsIFzVkj/qgEIaE3xVPsHOmyRt8FBIhWnWOp4YhqVKbI+D5haU/OVudv3vZW333Bb3QW6ZaGANB53eeo3C+Zb8fsCA9VXE4Ifgb+fMhZTiZA3NEbqGLT/uPV5WW4+JosG98DRJE0KOQx3YvRcMjmzbRuKJnAQtpLVNnJ8tNztGmLypvbZBAvLrGSVW/vi85zrAcpB9dLhP6ESe7c/OK26NdwFjX9ETS3k5i9A2YLNU/+9dq6F+N7Yo3ejFIKYGEnLv5V+Q8vmEAFwPP0SXG6TDbrp8zNxD+CdB5kfIXoqmb7WaQbfB+o6ZY4xwV4DhVN33aggQ1LFv/T7gJLrGqAAjU9i0UOENWG2/6hPZmjnqeq5ID7lC2wBtuAAldOw2bQpUIuZ9+UVKGkjWMaGirx1f9dMgM7fufZA77hf8jKO2z+M40YrUpzVxb2aRquE6FyTrgwIFMVFr4T9fWmju3ZH1hh3mbFAjXDV11vaVSkWX/Iwu77K90kOOTvdjq5jPLbqmhSvhyEvGeiqhEkPZgFMT+vqAVBxwKxHiAXCS5O6zxHDDQQ3CGIZJoIlPNVVttqNeEX4VIWjS/ZkJ9gydc1rxeior6c0xCGFetc4swR9+wGoRE="}]},"gamemode":0,"listed":1,"latency":0,"displayName":{"type":"byte","value":10},"listPriority":8}]}}; buffer :407f013b5dec80c2c94da3b78a7b0dad6988750c73616e626f6e7a616b75726101087465787475726573a00365776f6749434a306157316c633352686258416949446f674d54637a4e7a41304d4455334f5451794d69774b4943416963484a765a6d6c735a556c6b496941364943497a596a566b5a574d344d474d79597a6b305a47457a596a6334595464694d4752685a4459354f4467334e53497343694167496e427962325a706247564f5957316c4969413649434a7a595735696232353659577431636d45694c416f6749434a7a6157647559585231636d56535a58463161584a6c5a4349674f694230636e566c4c416f6749434a305a58683064584a6c637949674f69423743694167494341695530744a546949674f694237436941674943416749434a31636d776949446f67496d6830644841364c7939305a58683064584a6c637935746157356c59334a685a6e5175626d56304c33526c65485231636d5576596d51784f5459795a6d59794f574d774d7a5668597a4177596a417a4f5756684d47526a4d474532597a49344f546b354e44646d597a51774e4759345954566d4d444e6b4d7a51794d444e6b4f5467315954686a5979494b494341674948304b49434239436e303d01ac05636e6b45676666706732575136514d75576b58715946374977647571354445504f396958336d37446271616534784c38316845574a484a4272516c36597349467a566b6a2f7167454961453378565073484f6d7952743846424968576e574f7034596871564b62492b44356861552f4f5675647633765a573333334262335157365a6147414e42353365656f33432b5a6238667343413956584534496667622b664d685a54695a41334e456271474c542f755056355757342b4a6f7347393844524a45304b4f517833597652634d6a6d7a6252754b4a6e415174704c564e6e4a38744e7a74476d4c797076625a4241764c72475356572f766938357a724163704239644c68503645536537632f4f4b32364e6477466a5839455453336b3569394132594c4e552f2b39647136462b4e37596f33656a46494b5947456e4c7635562b5138766d45414677505030535847365444627270387a4e78442b436442356b6649586f716d62375761516266422b6f365a5934787756344468564e333361676751314c46762f5437674a4c72477141416a55396930554f454e5747322f3668505a6d6a6e716571354944376c43327742747541416c644f77326251705549755a392b55564b476b6a574d6147697278316639644d674d376675665a4137376866386a4b4f327a2b4d3430597255707a5678623261527175453646795472677749464d56467234543966576d6a75335a48316868336d6246416a5844563131766156536b57582f49777537374b39306b4f4f5476646a71356a504c62716d685376687945764765697168456b505a67464d542b767141564278774b78486941584353354f367a784844445151334347495a4a6f496c504e56567474714e654558345649576a532f5a6b4a396779646331727865696f723663307843474665746334737752392b77476f52453d00000100010a080004746578740031c2a730c2a730c2a739c2a739c2a766e7949fe5ad98e88085c2a772c2a7382dc2a77273616e626f6e7a616b757261c2a7380000
RangeError [ERR_OUT_OF_RANGE]: Read error for undefined : The value of "offset" is out of range. It must be >= 0 and <= 3458. Received -1973594525
at boundsError (node:internal/buffer:88:9)
at Buffer.readUInt8 (node:internal/buffer:254:5)
at Object.readVarInt [as varint] (D:\NodeJs\craft\node_modules\protodef\src\datatypes\varint.js:20:25)
at Object.string (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :103:61)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :1572:61)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :1583:11)
at Object.game_profile (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :1588:9)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3019:51)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3022:13)
at eval (eval at compile (D:\NodeJs\craft\node_modules\protodef\src\compiler.js:262:12), :3060:11) {
code: 'ERR_OUT_OF_RANGE',
field: 'play.toClient'
}
發生無法預期的錯誤: RangeError [ERR_OUT_OF_RANGE]: Deserialization error for play.toClient : Read error for undefined : The value of "offset" is out of range. It must be >= 0 and <= 3458. Received -1973594525
The text was updated successfully, but these errors were encountered: