mojira.dev
MC-190098

Structure size and offset still limited to 32 for dedicated servers

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.

Linked issues

Comments 0

No comments.

AlexMCool

slicedlime

Confirmed

Normal

Structures

structure_block

1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a

20w28a

Retrieved