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

Structure size and offset still limited to 32 for dedicated servers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a
    • Fix Version/s: 20w28a
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      Structures
    • Mojang Priority:
      Normal

      Description

      The bug

      When trying to set a structure's size or offset to be larger than 32 via the GUI, it gets capped at 32 when the GUI closes.

      Code analysis (Mojang mappings)

      This bug is caused by the fact that the offset and size are still capped to 32 upon reading the incoming packet (ServerboundSetStructureBlockPacket).

      net.minecraft.network.protocol.game.ServerboundSetStructureBlockPacket

      this.offset = new BlockPos(Mth.clamp(friendlyByteBuf.readByte(), -32, 32), Mth.clamp(friendlyByteBuf.readByte(), -32, 32), Mth.clamp(friendlyByteBuf.readByte(), -32, 32));
      this.size = new BlockPos(Mth.clamp(friendlyByteBuf.readByte(), 0, 32), Mth.clamp(friendlyByteBuf.readByte(), 0, 32), Mth.clamp(friendlyByteBuf.readByte(), 0, 32));
      

      Workaround

      To work around this, use data modify to set the size or offset instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              slicedlime [Mojang] slicedlime
              Reporter:
              AlexMCool Alex³
              Votes:
              13 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: