-
Bug
-
Resolution: Invalid
-
None
-
24w38a
-
None
-
Community Consensus
-
Performance
The bug
Beds are considerably more resource-intensive to render compared to other blocks in the game, even those with more complex models. This is due to a multitude of factors:
- Beds still unnecessarily utilise block entities, which were previously used for distinguishing color prior to 1.13 but are no longer required due to separate alphanumeric IDs after this point. (
MC-122532) - Each whole bed renders six planes that are never visible in normal gameplay. Two of these correspond to the interior of the bed, across the edge of a block (
MC-167243), whereas the other four correspond to the top faces of each of the four feet of the bed. - When a bed is adjacent to a block of the exact same type, the occluded faces are still rendered, rather than culled as is done with most other correctly-modelled blocks. (MC-141306)
The negative effects of this can be felt quite easily in areas with large numbers of beds, such as villager breeding stations and large iron farms.
How to reproduce
Attached to this ticket is a zip file containing two worlds. A resource pack is also attached which creates equivalent bed models: copper grates are remodeled to the foot of a bed, and oxidised copper grates to the head of a bed. An item model for beds also replaces the cobweb item model.
- Download and apply the attached resource pack
- Set your render distance to 2 and FOV to default, and turn off VSync
- Open the "bed platform" world
- Use F3+2 to open performance graphs
/tp @s 8.5 -60 8.5 180 -22.5
- Observe
- Exit this world and repeat for the improved platform world, observing
Expected results
Beds would not hurt performance.
Actual results
They noticeably do.
How to fix
Should be simple enough: get rid of the block entities for beds and convert them back over to proper block models. Performance should increase considerably.
This would also permit resource pack creators to customize bed models once again, and would fix issues such as MC-69683 and MC-231102 for beds.