Gamepiaynmo / CustomPlayerModel

Customize your player model in Minecraft.
MIT License
16 stars 2 forks source link

Request: An entity function to check if the entity using the model is currently on a ladder (or other climbable block) #10

Closed floral-qua-floral closed 3 years ago

floral-qua-floral commented 3 years ago

This could be useful for models which have specific aerial animations, such as a jump animation or a freefalling animation, which might look awkward on a character who's climbing a ladder. Having a function to check if the entity is in such a state would be useful so that the model can switch to a simple standing pose, or even a distinct climbing animation. Vanilla Minecraft seems to have a block tag called #minecraft:climbable which might be useful for making such a function.

It might also be handy if, rather than a boolean, the function returns a string with six possible values: "none" if the entity isn't intersecting any climbable blocks, "north"/"east"/"south"/"west" if the block has the 'facing' block state such as ladders and vines, or "neutral" for things such as scaffolding and weeping/twisting vines which aren't attached to any walls. Having a direction-based return would allow model creators to set up custom animations for using ladders that can rotate the body to face the right direction, raise the arms to grip the ladder, etc., which would be pretty neat. Although just a boolean return would be adequate for disabling aerial animations.

Gamepiaynmo commented 3 years ago

Added function isClimbing() in 2.2.4.