mojira.dev
MCPE-234752

Disabling custom block icon auto-scaling in GUIs results in incorrect visual shift

Custom block model definitions support defining item display transformations to change how the auto-generated icon for a block appears in various contexts. The GUI context supports a special property, fit_to_frame, that determines if the generated icon should be auto-scaled to a constrained frame context (such as inventory slots). This property is enabled by default. Manually setting this property to false causes otherwise correctly framed icons to be shifted to the right in the command auto-complete interface.

Workaround possible

This bug can be manually worked around by carefully injecting zero-size cubes at specific locations into a separate model provided to the minecraft:item_visual component.

Demonstration

The following screenshot shows this bug in action:

CleanShot 006673.png

Note that the icon for bug_icon:custom_block_with_bugged_icon is incorrectly offset to the right. Despite this, the general UI icon is the same between both blocks:

CleanShot 006674.png

Reproduction

This example is taken from the behavior pack in the following world attached for convenience:

[media]

This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such. Also included is a parallel block whose icon is not bugged in the command auto-complete list.

Attachments

Comments 0

No comments.

Ciosciaa

(Unassigned)

1545734

Confirmed

Multiple

26.0.27 Preview

Retrieved