Paper icon indicating copy to clipboard operation
Paper copied to clipboard

EntityAirChangeEvent "change" getters

Open RedVortexDev opened this issue 4 months ago • 2 comments

Is your feature request related to a problem?

Currently the air change event only returns the new oxygen ticks, if you wanted to, let's say, make air deplete twice as fast, you would need to know what was the change and multiply that by two, which the API does not currently provide.

Describe the solution you'd like.

To fix the issue the API should provide either a "getOldAmount" or a "getChange" method (or both!)

Describe alternatives you've considered.

The only alternative I could think of is tracking the old tick amount every time the event is called and compare it with the current event, but that's janky

Other

No response

RedVortexDev avatar Jul 24 '26 11:07 RedVortexDev

events usually fire before mutation, you should just be able to get the current air level from the entity itself

electronicboy avatar Jul 24 '26 11:07 electronicboy

That feels a bit inconsistent with other events, but if that's the response then I'm fine with that

RedVortexDev avatar Jul 24 '26 11:07 RedVortexDev