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

Explosion-related NBT tags for TNT and TNT Minecarts don't save if set to their default values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 24w44a
    • None
    • Confirmed
    • Commands, Entities, Save Data

      This applies to explosion_power in both entities, as well as explosion_speed_factor in TNT Minecarts.

      The default value for explosion_power is 4.0f for both entities, and the default value for explosion_speed_factor in TNT Minecart entities is 1.0f

      Steps to Reproduce

      1. Open a world and stand on the ground
      2. Summon or place a tnt_minecart
      3. Run these commands:
        /data get entity @n[type=tnt_minecart] explosion_power
        
        /data get entity @n[type=tnt_minecart] explosion_speed_factor

        and observe that neither find any values.

      1. Modify them with any of these commands:
        /data modify @n[type=tnt_minecart] explosion_power set value 10f
        
        /data modify @n[type=tnt_minecart] explosion_speed_factor set value 10f
      1. Run the same commands from step 3 and see that the values are saved.
      2. Run the same commands from step 4 but change the values to each field's respective default values.
      3. Run the same commands from step 3 and see that the values are not saved.

       

      You can do the same with a TNT entity and its explosion_power field, but it's easiest to test with a TNT Minecart.

      Expected Result

      The values are saved, regardless of whether they are the default values so that they are consistent with other types of values and so that the default values can be stored without additional logic for handling the default values.

            Unassigned Unassigned
            Deoxyribonucleic Evans DorkOrc
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: