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

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w28a
    • 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a
    • Confirmed
    • Structures
    • Normal

      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.

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

              Created:
              Updated:
              Resolved:
              CHK: