Plethora777 / mcpe_viz

Minecraft Pocket Edition (MCPE) World Visualization & Reporting Tool with Web App
GNU General Public License v2.0
167 stars 39 forks source link

fix exception when id ==-1 #3

Closed Christian-X closed 8 years ago

Christian-X commented 8 years ago

some block in my NBT had -1 set for id - i don't know why. This keeps the programm from failing in this case

Plethora777 commented 8 years ago

Nice catch -- thanks!

I'm curious what caused this. Did you investigate the NBT?

Christian-X commented 8 years ago

looking at the log you're writing, the broken record seems to be this one: ParsedEntity: [Player Name=The Player Dimension=0 Pos=(1542.5, 65.62, -128.5 @ image 20374, 4527) Rotation=(0, 0) BedPos=(1548, 73, -95 @ image 20380, 4561) Spawn=(1547, 73, -95 @ image 20379, 4561) [Armor:] [Inventory: [Block:info_reserved6 Damage=10 Slot=0] [Block:info_reserved6 Damage =11 Slot=1] [Block:info_reserved6 Damage=19 Slot=2] [Block:info_reserved6 Damage=13 Slot=3] [Block:info_reserved6 Damage=9 Slot=4] [Block:info_r eserved6 Damage=14 Slot=5] [Block:info_reserved6 Damage=20 Slot=6] [Block:info_reserved6 Damage=16 Slot=7] [Block:info_reserved6 Damage=17 Slot= 8] [(UNKNOWN: id=-1 0xffffffff) Slot=9] [(UNKNOWN: id=-1 0xffffffff) Slot=10] [(UNKNOWN: id=-1 0xffffffff) Slot=22] [(UNKNOWN: id=-1 0xffffffff) Slot=23]] OnGround=0 (0x0) Persistent=1 (0x1)]

... not really sure what in MCPE has caused that. So there is a record for some player with invalid inventory blocks?

Plethora777 commented 8 years ago

Weird. It does look like a player with some invalid stuff in their inventory. If you figure out what that stuff is, I'd be curious :)