Lenient Death

Lenient Death

134k Downloads

[Feature Request] Disable gravity on items upon death

Disketaa opened this issue ยท 2 comments

commented

I found this mod very useful on skyblock experience! :)
Especially the feature when the items can be saved from void.

But if I fell off from flying-slime machine or other moving blocks, the items get destroyed.
Maybe instead of teleporting them to last-stand-solid block, if there is no a block underneath an item, it gravity sets on 0. So item doesn't fall

commented

Also it could help with item spreading, when you dies.
Because when you died in the void, all the items tp in one place, but when you just died on blocks, all of items get spreading around

commented

@Disketaa
I wanted to let you know that in my Pull Request [feat] added lava recovery (logic, commands and config) aswell as german translations I have kinda addressed the issue you mentioned.

When the last grounded position block is no longer valid (e.g., due to being in air or lava), the system now searches for a safe block where the items can land. This ensures that items are not destroyed if you fall off from a flying slime machine or other moving blocks. If the validity check fails, a spiral search pattern is used to find the nearest safe block. If no valid block is found within the specified range, the spawn location is used as a fallback.

Here's a brief overview of the changes:

Safe Block Search: When the last grounded position is invalid, a safe position is determined using a spiral search.

Fallback to Spawn Location: If no safe block is found, the spawn location is used as a fallback.