Earthcomputer / clientcommands

Adds useful client-side commands
Other
1.04k stars 116 forks source link

/cgetdata for entity missing attributes #657

Closed Dark-Phoenix-01 closed 3 weeks ago

Dark-Phoenix-01 commented 2 months ago

When performing /cgetdata command on some entity, very often lot of the attributes are missing. For example when checking a leader zombie data, here's the comparison.

NBT data from /data get command ``` Zombie has the following entity data: {DeathTime: 0s, OnGround: 1b, LeftHanded: 0b, AbsorptionAmount: 0.0f, IsBaby: 0b, Invulnerable: 0b, Brain: {memories: {}}, Rotation: [37.98845f, 0.0f], HurtByTimestamp: 0, ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], HandDropChances: [0.085f, 0.085f], CanBreakDoors: 1b, attributes: [{base: 0.23000000417232513d, id: "minecraft:generic.movement_speed"}, {modifiers: [{amount: 0.5861681693676828d, id: "minecraft:leader_zombie_bonus", operation: "add_value"}], base: 0.03319467453311349d, id: "minecraft:zombie.spawn_reinforcements"}, {modifiers: [{amount: 0.030858318074534607d, id: "minecraft:random_spawn_bonus", operation: "add_value"}], base: 0.0d, id: "minecraft:generic.knockback_resistance"}, {modifiers: [{amount: 2.6414639806218307d, id: "minecraft:leader_zombie_bonus", operation: "add_multiplied_total"}], base: 20.0d, id: "minecraft:generic.max_health"}, {modifiers: [{amount: 0.007293420674694934d, id: "minecraft:random_spawn_bonus", operation: "add_multiplied_base"}], base: 35.0d, id: "minecraft:generic.follow_range"}], InWaterTime: -1, ArmorItems: [{}, {}, {}, {}], Air: 300s, HandItems: [{}, {}], UUID: [I; -1877554765, -760133020, -1763644339, 521401789], FallDistance: 0.0f, DrownedConversionTime: -1, Motion: [0.0d, -0.0784000015258789d, 0.0d], Fire: -1s, Pos: [231.74624474615766d, -55.0d, -97.8144790014777d], CanPickUpLoot: 0b, Health: 20.0f, HurtTime: 0s, FallFlying: 0b, PersistenceRequired: 0b, PortalCooldown: 0} ```
Data from /cgetdata command ``` Zombie has the following entity data: {DeathTime: 0s, OnGround: 1b, LeftHanded: 0b, AbsorptionAmount: 0.0f, IsBaby: 0b, Invulnerable: 0b, Brain: {memories: {}}, Rotation: [37.96875f, 0.0f], HurtByTimestamp: 0, ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], HandDropChances: [0.085f, 0.085f], CanBreakDoors: 1b, attributes: [{base: 0.23000000417232513d, id: "minecraft:generic.movement_speed"}, {base: 20.0d, id: "minecraft:generic.max_health"}], InWaterTime: -1, ArmorItems: [{}, {}, {}, {}], Air: 300s, HandItems: [{}, {}], UUID: [I; -1877554765, -760133020, -1763644339, 521401789], FallDistance: 0.0f, DrownedConversionTime: -1, Motion: [0.0d, -0.05339160692480155d, 0.0d], Fire: -1s, Pos: [231.746337890625d, -55.0d, -97.814453125d], CanPickUpLoot: 0b, Health: 20.0f, HurtTime: 0s, FallFlying: 0b, PersistenceRequired: 0b, PortalCooldown: 0} ```

Now, I understand some data may not be visible due to permission issue, but there are some data that is visible but not pulled by the command. Like max health of the zombie which I know is visible because I have mob health mod which correctly shows max health as 73.

xpple commented 1 month ago

I also see the max health in the result of cgetdata, am I missing something?