JoshuaBaert / mc-node-wrapper

1 stars 0 forks source link

uncommon crash when getting rotation entity data #59

Open Gobsmack90 opened 4 years ago

Gobsmack90 commented 4 years ago

undefined:1
([-2.008453E-4f, 0.4508]
   ^^^^^^^^^^^

SyntaxError: Invalid or unexpected token
    at Server.parseEntityData (D:\Programming\Misc Code\mine-node\app\lib\entity.js:35:25)
    at Socket.listenForData (D:\Programming\Misc Code\mine-node\app\lib\entity.js:48:39)
    at Socket.emit (events.js:194:15)
    at addChunk (_stream_readable.js:284:12)
    at readableAddChunk (_stream_readable.js:265:11)
    at Socket.Readable.push (_stream_readable.js:220:10)
    at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
[nodemon] app crashed - waiting for file changes before starting...```

i think the main issue is that your regex isn't handling when there's an E in the middle of the number