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

modifying valid_spawn crashes the game

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.13-pre9
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed

      Description

      Modifying the file /datapacks/MyDatapack/data/minecraft/tags/blocks/valid_spawn.json to contain less then 2 values will crash the game (Crash Report attached)
       

      (the game crashes once a mob is tryed to be spawned.)

       

      Depending on the Crash report i woud assume the game is trying to choose a random block of that list using the Random class. I guess the value "2" is hardcoded in such a way that the bound will be below 0 if the amount of blocks in the list isnt 2 or higher.
      Depending on this, i also assume any block above the second element will be ignore, but i had to investigate further for that.

      Edit 1: It appears that any edit to the file will crash the game

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Hurricankai HurricanKai
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: