Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-180257

Crash when setting LodestonePos of compass to something other than NBT compound

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 20w17a, 20w18a, 20w19a, 20w20a, 20w20b
    • Fix Version/s: 20w21a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Crash
    • Mojang Priority:
      Very Important

      Description

      The bug

      The game crashes when changing or creating a compass item with a LodestonePos having a value other than an NBT compound tag.

      Description: Ticking player
      
      java.lang.ClassCastException: lp cannot be cast to la
      	at bhr.a(SourceFile:144)
      	at bje.a(SourceFile:454)
      	at bcw.j(SourceFile:290)
      	at bcx.l(SourceFile:575)
      	at anz.h(SourceFile:2217)
      	at bcx.h(SourceFile:274)
      	at ys.i(SourceFile:411)
      	at zj.b(SourceFile:199)
      	at ma.a(SourceFile:234)
      	at zi.c(SourceFile:171)
      	at net.minecraft.server.MinecraftServer.b(SourceFile:839)
      	at net.minecraft.server.MinecraftServer.a(SourceFile:766)
      	at enn.a(SourceFile:89)
      	at net.minecraft.server.MinecraftServer.run(SourceFile:625)
      	at java.lang.Thread.run(Thread.java:745)
      

      How to reproduce

      Do this in a test world

      /give @s compass{LodestoneDimension:"minecraft:overworld",LodestonePos:"This is not an NBT compound"}
      

      The game freezes and you will see in the log file that it has crashed

        Attachments

          Activity

            People

            Assignee:
            mgatland [Mojang] Matthew Gatland
            Reporter:
            Ning1253 Amos Lastmann
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              CHK: