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

Some entities are not rendered as bright as they should be when part of any spawner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, 1.14.4, 19w45b, 1.15 Pre-release 1, 1.15.2, 20w11a, 20w12a, 20w15a, 1.16.2, 20w51a, 1.16.5, 21w06a, 21w08b, 21w40a, 1.20.3, 1.20.4 Release Candidate 1, 1.20.4, 23w51b, 24w07a, 1.20.5 Pre-Release 1, 1.20.5
    • Confirmed
    • Rendering

      Some entities are not rendered as bright as they should be when used as the 'displayEntity' (or rather, the 'summoned mob') of a spawner.

      Steps to Reproduce:

      1. Place down a monster spawner, or trial spawner
      2. Use a blaze spawner on it
      3. Tick freeze for easy observation
        /tick freeze

      Observed & Expected Results:

      - The blaze is rendered very dim compared to when the blaze is spawned as an entity.
      - The blaze would be rendered exactly how it is rendered in entity form.

      Screenshots/Videos:

      Notes:

      1. This also affects all entities that are burning:
        /give @p spawner{BlockEntityTag:{SpawnData:{entity:{id:"minecraft:zombie",Fire:1000,HasVisualFire:1b}}}} 1
        
      2. Currently affected entities are:

      Code Analysis:

      The entities listed are affected because they override the `getBlockLightLevel()` method inside `net.minecraft.world.entity.Entity` by always returning 15 (the brightest block light level) instead of using a shader to render brighter like done with the emissive 'eye' layers of entities such as spiders, endermen, or phantoms (which all behave normally inside spawners).

      The regular behavior for entities:

      net.minecraft.world.entity.Entity
      
         protected int getBlockLightLevel(T entityType, BlockPos blockPos) {
            return entityType.isOnFire() ? 15 : entityType.level().getBrightness(LightLayer.BLOCK, blockPos);
         }
      

      (As an example) The behavior for blazes:

      net.minecraft.client.renderer.entity.BlazeRenderer
      
         protected int getBlockLightLevel(Blaze entityType, BlockPos blockPos) {
            return 15;
         }
      

        1. MC-138488.mp4
          5.86 MB
        2. affected_entities.png
          affected_entities.png
          82 kB
        3. 2023-12-06_19.09.24.png
          2023-12-06_19.09.24.png
          1.41 MB
        4. 2021-10-10_18.40.52.png
          2021-10-10_18.40.52.png
          166 kB
        5. 2018-10-30_12.48.30.png
          2018-10-30_12.48.30.png
          514 kB
        6. 2018-10-30_12.45.07.png
          2018-10-30_12.45.07.png
          297 kB

            Unassigned Unassigned
            Jingy [Helper] Jiingy
            Votes:
            13 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              CHK: