Jumper251 / AdvancedReplay

Minecraft plugin to record players on your server
GNU General Public License v3.0
141 stars 62 forks source link

Block Damage Effect #177

Open PedroMPagani opened 1 month ago

PedroMPagani commented 1 month ago

2024-07-16_12 35 02 Currently without any possible solution for this, I am not so sure but it seems the client that replicates this.. I think there's probably a BLOCK_DIG sort of way to "create this behavior but I am very unsure.)

PedroMPagani commented 1 month ago

Maybe listening to ARM_ANIMATION and detect on block damage and block damage abort? or something like that, to create sort of a startBreaking tick and stopBreakingFInishTick then create damage in between

PedroMPagani commented 1 month ago

This is not as simple without the packet, or maybe it is, but there's a need to schedule per-tick basis, when teh player starts to break a block hte event BLockDamage is triggered, and once only, at the end or so of the block break, the event for break triggers on that specific tick, if we can follow up with the current action:

Then in here we run math to detect the block position, as well as when the block damage was registered, then we can schedule "multiple actions", with tick damage math calculation, since it has a sequence of damage, we can play this apart by scheduling "an action" across ticks, could be even something like a ATomicINteger that just increments you know.

PedroMPagani commented 1 month ago

Nevermind, not necessary, the server has an API for the block update progress.