Carpet

Carpet

2M Downloads

Scarpet: No way to directly access an entity's `FallDistance` without querying NBT

James103 opened this issue ยท 1 comments

commented

As of Carpet Mod 1.4.57 and Minecraft 1.18.1, there is no way that I know of to access an entity's fall distance from Scarpet without querying full NBT.

To fix this, a new function query(e, 'fall_distance') and modify(e, 'fall_distance', value) will need to be added, which directly gets the current fall distance using available methods.

For example, I would like to allow survival players to fly in certain conditions, but disable flying capabilities when the player is falling more than a short distance to ensure that players that are knocked out of the air still take fall damage.

commented

I wonder if this'd be compatible with vanilla clients or how the server needs to send a change on this (if there even is a packet).