[Feature request]: Allow teleportation to cost hunger
James103 opened this issue ยท 1 comments
Currently, there is no way to make Fabric Waystones waypoint teleportation cost hunger. I would like to suggest adding a configuration option to do exactly that.
When a teleport is attempted for a cost in food points,
- Due to the vanilla exhaustion cap of 40, if your hunger plus your saturation exceeds 10, teleportation always succeeds.
- Else, it checks to see if the following condition is satisfied:
Food + Sat - Exh/4 >= Cost
Where,Food
is your hunger,Sat
is your saturation rounded up,Exh
is your exhaustion,Cost
is the hunger cost. - If teleportation succeeds, it runs
player.getHungerManager().addExhaustion(4 * Cost)
to deduct the food stats.
Possible use cases:
- You want teleportation to cost something, but it can't be an item and you don't feel like taking away their health or hard-earned experience.
- You want to make sure that players must be able to sprint in order to teleport. (Teleport cost: 7 food points)