mojira.dev
MCPE-119301

Durability Queries Don't Work In Resource Packs

When attempting to make animations, render controllers, etc. Using the query.remaining_durability or query.max_durability queries, the queries always return 0, despite held items having some durability.

 

Steps To Reproduce:

  1. Download, install and start a world with the supplied pack

  2. Hold any durable item, go into third person and observe nothing strange

  3. Go into the players resource file and in animate -> Durability Bug, change the comments so that the durability test equal to 0 us uncommented

  4. Reload and observe that when holding any item (durable or not, even no item) you'll begin to constantly spin forwards

Expected Behavior:

  • Durability queries work in resource packs

Actual Behavior:

  • Durability queries always return 0 in resource packs

Attachments

Comments 4

it was my understanding that this query can only be referenced from an item. It does not assume that the target is the item even if an entity is holding it. This doesnt seem like a bug, although it would be nice if it could be run from the holding entity.

Resolving temporarily as Awaiting Response. Could you please attach the add-ons you're using to this ticket?

Added example pack and redid the steps to reproduce

Is this still an issue for you?

Gruntastic

(Unassigned)

784640

Confirmed

Multiple

QueryResult, add-on, durability, query, resource-pack

1.18.10.27 Beta, 1.18.10.26 Beta, 1.18.0.24 Beta, 1.18.0.22 Beta, 1.18.0.20 Beta, ..., 1.19.11 Hotfix, 1.19.63, 1.20.50.22 Preview, 1.20.50.23 Preview, 1.20.41 Hotfix

Retrieved