mojira.dev
MC-277953

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

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
    /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
    /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.

Comments 1

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

DorkOrc

(Unassigned)

Confirmed

Commands, Entities, Save Data

24w44a

Retrieved