Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-262452

Hopper models are unoptimized and cause rendering lag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.4, 23w18a
    • Confirmed
    • Performance, Textures and models
    • Normal
    • Gameplay

      The bug

      The models that hoppers use are notably unoptimized, using many more texture planes than are neccessary. This causes rendering lag in areas where a lot of hoppers are present, such as automatic storage facilities.

      Implementation

      Both vanilla hopper models (downwards and horizontal) use 32 texture planes to render parts of the block, most of which are at the top and are used for rendering the concavity. However, many of these are coplanar, which results in flat surfaces using more than a single quad to render when only one is neccessary. This also causes MC-246224 to be visible upon close inspection.

      It's possible to do both hopper models using just 21 texture planes instead. The end result is the same, and MC-246224 is eliminated (although MC-73186 can take its place).

      How to reproduce

      1. Download the optimized hopper resource pack attached to this ticket
      2. Create the following superflat world:
        minecraft:barrier,10*minecraft:hopper;minecraft:the_void
      3. Set your render distance to 2 and simulation distance to 5
      4. Execute the command
        /tp @s 0 -50 0 0 90
      5. Open the performance debug bars using Alt-F3
      6. Compare the performance you get when using vanilla's hopper model versus the optimized hopper model from the resource pack attached

      How to fix

      I've made this fix very simple - you just need to replace the current hopper model files (hopper.json and hopper_side.json) with the ones in the resource pack. The hopper_top.png texture file, in both the current default textures and Programmer Art, will also have to be replaced with the textures included in the resource pack as well (see MC-262453 for more information). I give full 100% permission and encouragement to Mojang to use these assets in the game.

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            13 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              CHK: