Carpet

Carpet

2M Downloads

`query(e, 'portal_timer')` and `query(e, 'portal_cooldown')` are reversed

YotaXP opened this issue ยท 0 comments

commented

query(e, 'portal_cooldown') results in how long the player has been standing in a nether portal, while query(e, 'portal_timer') results in the player's portal cooldown, counting down as they exit a portal. This is backwards to what the docs indicate.

Note, the inverse modify() code appears to be correct. This issue only applies to query().

Tested with 1.4.79
It appears to have been this way since they were added to the API.

Relevant code:

put("portal_cooldown", (e , a) ->new NumericValue(((EntityInterface)e).getPortalTimer()));
put("portal_timer", (e , a) ->new NumericValue(((EntityInterface)e).getPublicNetherPortalCooldown()));