Skip to content

Conversation

@ahnsunggwan45
Copy link

Bedrock 1.21.130 enforces a new schema for minecraft:collision_box that requires a boxes list defining min/max coordinates for collision shapes.
Customies previously generated only origin and size, which caused the client to crash shortly after joining.

This commit adds the required boxes: ListTag<CompoundTag> entry using local block coordinates (0 → size), ensuring the collision box matches the new format and preventing client-side crashes.

Only the collision_box component was modified; all existing behavior and APIs remain unchanged.

image

@HydroGames-dev
Copy link

HydroGames-dev commented Dec 11, 2025

Using AxisAlignedBB for it would be better
or method similar to Digger etc..
a array of boxes
and limits too (-8, 0, -8) to (8, 24, 8) since going outside of bound will break it

// "minecraft:collision_box": false
"minecraft:collision_box": {
  "boxes": [],
  "enabled": 0
}

// "minecraft:collision_box": true
"minecraft:collision_box": {
  "boxes": [],
  "enabled": 1
}

// "minecraft:collision_box": {
//    "origin": [-8, 0, -8],
//    "size": [16, 8, 16]
// }
"minecraft:collision_box": {
  "boxes": [
    {
      "maxX": 16,
      "maxY": 8,
      "maxZ": 16,
      "minX": 0,
      "minY": 0,
      "minZ": 0
    }
  ],
  "enabled": 1
}
// "minecraft:collision_box": [
//     {
//         "origin": [-8, 0, -8],
//		   "size": [16, 16, 16]
//     },
//     {
//         "origin": [-8, 0, -8],
//         "size": [8, 24, 8]
//     }
// ]
"minecraft:collision_box": {
	"boxes": [
	{
		"maxX": 16,
		"maxY": 16,
		"maxZ": 16,
		"minX": 0,
		"minY": 0,
		"minZ": 0
	},
	{
		"maxX": 8,
		"maxY": 24,
		"maxZ": 8,
		"minX": 0,
		"minY": 0,
		"minZ": 0
	}
	],
	"enabled": 1
}

@unickorn
Copy link
Member

Could you fix the formatting / indentation of the file, so we can see the diff more clearly?

@unickorn unickorn self-assigned this Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants