Description
Wall-Climbing lets players climb on any walls at the cost of their stamina.
Features
To climb you have to face a solid block and tilt your head slightly in the direction where you want to climb when in mid-air. The easiest way to do that is to just jump at a wall while looking at it, if you want to stop climbing simply look away from the wall (eventually will be tied to inputs such as holding jump when that becomes possible for modders).
Climbing consumes stamina very quickly so you should not be able to climb for long (meant to not make it too strong, can be configured).
Configuration
Commands
You can configure the mod using commands, these commands are only available to server operators.
/wallclimb config listgives you a list of properties you can edit and their current value./wallclimb config set <setting> <value>sets a property to the value you want./wallclimb config get <setting>gives you the value of a single property./wallclimb config blacklist add/remove <blockid>adds or removes a block from the blacklist.
Properties
General
- BaseStaminaDrainRate: the speed at which stamina drains (default is 10)
- BaseMinimumStaminaToClimb: The minimum stamina a player needs to start climbing (default is 1)
- BaseClimbSpeed: The speed at which the players climb (default is 2)
- BaseClimbStillSpeedMultiplier: controls how much the stamina drain is multiplied by when you are still against a wall, e.g. 0.1 = 10% of the BaseStaminaDrainRate (default is 0.1).
- MinVerticalSpeedToClimb: the minimum vertical speed the players need to be able to start climbing. Used to prevent players from canceling high fall damage by grabbing onto a wall at the last second (default is -30.0).
Struggle climbing
- SlowDownThresholdPercentage: Controls when players enter the "struggle" phase of the climb where both the speed and stamina drain will start slowing. The players will start this when the stamina bar reaches a percentage lower than this value. Ranges from 0.0, meaning the players will never struggle, to 1.0, meaning the players will start struggling immediately (default is 0.2).
- MinClimbSpeed: Control the minimum speed the players will climb at when nearly out of stamina (default is 0.5).
- MinDrainRate: Control the minimum speed at which the stamina drains when reaching the end of the bar (default is 0.01).
Advanced
- ClimbDetachLookThreshold: How much the player has to look away from the wall they are climbing to detach from it and stop climbing. Value ranges from 1.0(Looking perfectly straight at the wall) to -1.0(Looking perfectly away from the wall), however you should always leave some leeway for the player not to be stuck climbing or unable to climb (default is 0).
- ClimbStillThreshold: Similar to ClimbDetachLookThreshold, this controls how much you have to look away from the wall to stop being "still" against it and start moving. Value ranges from 1.0(Looking perfectly straight at the wall) to -1.0(Looking perfectly away from the wall), however you should always leave some leeway under 1 and above your ClimbDetachLookThreshold for the player to be able to move (default is 0.7).
- BlacklistedBlocks: A list of blocks that players can't climb on. Useful to not conflict with vanilla climbable blocks such as ladders or to implement your own logic such as unclimbable ice.
Early Access
This mod is still in development so bugs are expected.
Here is a little roadmap of things I wish to add or change:
Can dos:
- Make stamina drain vary depending on if you are actively climbing or just holding still against a wall ☑
- Slow you down when you're low on stamina ☑
- Config Options ☑
- Items that make you climb longer and faster (low priority because I want to flesh out the climbing itself first, which would mean I would need to do the things listed below)
Can't currently because of modding limitations but want to:
- WASD Inputs to control climb direction (They are nowehere to be found and used in the codebase, my running theory is that movement is handled on the client side)
- Hold and release space to control when you want to start and stop climbing (Same issue as for WASD)
- Make it play the climbing animations like when you are on a ladder (Also same issue, I think animations for the movement of the player and handling of the various movement states is done client side as well)
