mojira.dev
MCPE-240708

Custom block snowlogging incorrectly allows blocks for full collision

The snowlogging precipitation_behavior in the minecraft:precipitation_interactions is supposed to check the defined minecraft:collision_box to ensure it is zero-sized. The check on this is incorrect in some cases:

  • Collision is defined as []: considered to have no collision, allowing snowlogging (demonstrated below)

  • Collision has one (but not all 3) size values set to 0: considered to have some collision, incorrectly erroring.

In the former case, it’s honestly preferable to redefine "minecraft:collision_box": [] as meaning “having no collision” (or false). It currently is the same as using "minecraft:collision_box": true. The latter case misinterprets collision size behavior. If any element of a box’s size is 0, that box will not contribute to the collision; the current behavior assumes this is only true if all elements are 0.

In summary, the desired outcome is:

  • Redefine [] on minecraft:collision_box to mean false instead of true.

  • Fail block loading and error when snowlogging is enabled on related permutations whose defined collision box is truly non-zero:

    • Not provided (defaults to true)

    • Explicitly true

    • For a single collision box, if all size values are non-0

    • For multiple collision boxes, if any single collision box fails the above

Demonstration

The 2 attached images demonstrate the first above case of this issue. A custom block (cross-shaped glowstone) has a collision of [] with snowlogging enabled. Note that with no snow layers in the block (red concrete demo), it is being stood on. With snow layers in place (green concrete demo), there is no collision.

Reproduction

This example is taken from the behavior pack in the attached world for convenience. This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such.

Attachments

Comments 4

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media]

Hi!
Thank you for your report!
After consideration, the issue is being closed as Invalid.

You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit https://feedback.minecraft.net

Quick Links: 
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

I’d like to contest this. This is not a feature request. This is a mishandling of the cases where minecraft:collision_box is considered for the sake of allowing snowlogging. [] defines full-block collision, just the same as true. In every way in the engine except this one, [] equals true. This is a special handling oversight on the end of the precipitation interactions component.

As for the summary, I wouldn’t have minded if they’d instead redefined [] as false: that would make things more sensible and simpler. But until they do, the point still stands.

This bug has been indirectly fixed in the latest block format versions. Newer versions do not allow [] for minecraft:collision_box, and the 0-sized case is a non-issue anymore, so far as I can tell.

Ciosciaa

(Unassigned)

Unconfirmed

Multiple

26.40.31 Preview

Retrieved