-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New mountaineering module #789
New mountaineering module #789
Conversation
(blindly gives speed 3)
to pack.mcmeta
when on cold blocks, but cannot use OR (e.g. cannot check ice OR snow)
and slowness when not on snowy block
poles_item, for differentiation
references to a "descending" predicate
- tripwire hook NBT not preserved - changed custom crafter output slot (replace boots, or bottom right) - removed lore Also - added cooldown for jump boost with poles (can't continually use) - removed some unnecessary predicates/tests - changed some conditions for when speed is applied with skis - changed end rod to iron bars in poles recipe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thank you for your PR! We like the basic principles of this module and would love to see it be a part of Gamemode 4, especially with added Orbis compatibility to make these appear in loot chests!
Our in-game tests have shown some issues and necessary feature changes that are outlined below.
We have also found some more technical issues with the code, however, these may not need to be addressed individually, as some parts of this module should receive some refactoring to improve the end user experience. Though below you can still find a couple of out suggestions; bear in mind that this is not a comprehensive code review, though.
Skies:
- the block checks need to be refined, the
stepping_on
condition sadly only checks the block below the player, neglecting, for example, snow layers entirely. This should be replaced with a smarter "snow detection system" which respects snow layers as a snowy surface, regardless of the block below the snow layer. - the falling condition seems to be somewhat flawed (
air
1.3 blocks below the player yields plenty of false positives). Use the scoreboard objectiveminecraft.custom:minecraft.fall_one_cm
or advancement conditionminecraft:fall_from_height
instead, however, bear in mind that these only yield values once the player has landed making them less useful as it seems like what you want to track is players having a negative y-velocity (running downhill). The latter may be achieved by spawning markers and reading their y-coordinate to get a rough velocity approximation. - instead of using potion effects, consider using attributes instead to apply speed (allows for more precise control, better stacking control)
- it would be nice if skis ramped up in speed when going downhill and if the skis emulated the slipperiness of skiing instead of the hard turns you can do when walking
Poles & Crampons:
- Whereas the skis have their unique niche and have the interesting snow interaction the crampons & poles seem to be lacking a bit. We suggest spicing them up quite a bit to make them useful, here are our suggestions:
- Turn the crampons into boots that let you climb vertical walls by placing temporary Shulkers as temporary platforms.
- Rework the poles -- tripwire hooks can't be used as the player can place them down. Instead, use an unplaceable item and increase the synergy with the skis (making you speed up quicker?). These should be early-game to give them the most use.
Recipes
The current recipes seem a bit awkward and could use a bit of a re-vamp. Our points of concern are:
- iron pressure plates seem weird in a recipe
- dripstone seems weird in a recipe
Take some inspiration from our latest recipe re-vamp for custom crafters in which we fixed some of our old recipes.
This PR will also have to be updated to comply with @BluePsychoRanger's latest Custom Crafters update (CC Shifting #787 ). @BluePsychoRanger will give you a detailed review as well to add more info on this topic.
Orbis Compatibility
Making these generate in Orbis Chests will advertise them to players, consider adding Orbis Compatibility. CC @kruthers who's currently updating Orbis.
gm4_mountaineering/data/gm4_custom_crafters/tags/functions/check_recipes.json
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/check_recipes.mcfunction
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/new_crampons.mcfunction
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/new_skis.mcfunction
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/main.mcfunction
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/ski_effects/skis_equipped.mcfunction
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/ski_effects/poles_equipped.mcfunction
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/ski_effects/skis_equipped.mcfunction
Outdated
Show resolved
Hide resolved
system', but function 'main' only runs when directly commanded
snow layer)
smarter fall detection system (further speed boost for faster falling going to be added soon)
rather than tripwire hook
Firstly, thank you for the feedback. A quick update, in part to prove that I'm still working on this
The adding-speed functionality generally follows the mechanism used in speed paths, but it feels a bit clunky/I don't know if it puts an unnecessary burden lag-wise. A way to increase the speed attribute as a function of the player's y-velocity would probably be the gold standard, but the current method didn't seem horrific so I went with it. Further updates will come for poles/crampons to make them more whole, bearing in mind Bloo's feedback. And adjusting to conform to BPR's CC update + Orbis compatibility (but I need to learn how to do that first.. :) I can't guarantee any timeframe right now; sorry for that, but I haven't forgotten this. |
increase speed with skis. When holding poles, jump boost 1 is given, or jump boost 2 when having an upwards velocity. There is cooldown on the jump boost.
Since you're still working on this I won't do a full in-depth review. On the functionality side I've tested the skis and they feel great to use now! On the technical side you should attempt to limit the amount of Directly calling a function will keep any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty much everything looks good, but there's some updates needed to make the module compatible with 1.20+, I'd also suggest trying to improve climbing a bit more, but that is up to you.
gm4_mountaineering/data/gm4_mountaineering/predicates/on_snowy_block_or_air.json
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/predicates/on_snowy_block.json
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/predicates/holding_poles.json
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/loot_tables/items/crampons.json
Outdated
Show resolved
Hide resolved
gm4_mountaineering/data/gm4_mountaineering/functions/player_fast_main.mcfunction
Outdated
Show resolved
Hide resolved
(I don't know why this is getting changed)
from resistance effect, minor reformatting
Thanks for the comments. Translations have been updated to the latest standard, and the formatting changed as requested. Some notes about the climbing:
I'll continue to think of possible improvements to the climbing system over the next days, but this is where I am now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two minor problems, other than that it looks good!
execute if entity @s[gamemode=!spectator,tag=gm4_mountaineering_using_crampons,predicate=gm4_mountaineering:hands_empty] anchored eyes if block ^ ^ ^1 #gm4_mountaineering:climbable_blocks run function gm4_mountaineering:climbing_effects/add_climb_effects | ||
execute if entity @s[gamemode=!spectator,tag=gm4_mountaineering_using_crampons,predicate=gm4_mountaineering:hands_empty] anchored eyes if block ^ ^-1 ^1 #gm4_mountaineering:climbable_blocks run function gm4_mountaineering:climbing_effects/add_climb_effects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this means the gm4_mountaineering:climbing_effects/add_climb_effects
can run twice if both checks are true, it's better to set a dummy score to 0 first, then set it to 1 if the function is called, only running the second check if the first one failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added unless block ^ ^ ^1 #gm4_mountaineering:climbable_blocks
into the second condition - that is, only run add_climb_effects
in the second check if the condition for the first check was not met. I think this should achieve the same result? (in my own test, it makes climbing a little cleaner)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will work as well, but using the score method is a little bit more optimized as it only does the score check if the first check succeeds, by using unless block
it needs to do a block check, which is worse for performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, makes sense. Changed to a scoreboard approach (it seems a little clunky, so I don't know if there's a better way to do it, but I know at least that it works)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple more points found during the meeting
gm4_mountaineering/data/gm4_mountaineering/functions/pole_effects/poles_equipped.mcfunction
Show resolved
Hide resolved
...untaineering/data/gm4_mountaineering/functions/climbing_effects/add_climb_effects.mcfunction
Show resolved
Hide resolved
The Ski Poles should be called "Ski Pole" which would make it more clear that the player needs two of them and that they need one in each hand. We also discussed making them unstackable, but that can be done later and isn't an immediate issue. Ping me on discord for info about making items unstackable. |
We now have a planned timeline for this: Once all the multiplayer issues (second review by @TheThanathor) and the fixes listed by @TheThanathor above have been applied, this will get one more feature-check just to make sure all the item names and Advancements follow Gamemode 4 Guidelines and be merged after. This is due to us having ideas on how to make the skis feel better and us wanting to apply some advanced beet stuff to make the Crampons easier to use:
These changes are not to be made by you (unless you really want to) but will be added as a later update. |
two (different) conditions get met
(formerly skis only)
still called 'poles' on the backend.
Okay, thanks for the update and comments; some changes have been made.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me! There's def some opportunity to improve things with the new ride command, but that can be a thing for a later update
to prevent adding climbing effects twice
Final tweaks:
|
gm4_mountaineering/data/gm4_mountaineering/functions/check_recipes.mcfunction
Outdated
Show resolved
Hide resolved
Alright it looks like this is all set to merge 🎉 Thanks for all your patience and hardwork @AdequateUsername. We've got a marketing plan laid out for the next few weeks to publicize newish modules in various discord servers: Mountaineering is slated for next week's spotlight. |
* Added skis and some test functionality (blindly gives speed 3) * Fixed a typo in _pack.mcmeta * Fixed a few typos and renamed _pack.mcmeta to pack.mcmeta * Crafting now works * Speed boost now (blindly) applied * Added (possibly) functionality to give speed when on cold blocks, but cannot use OR (e.g. cannot check ice OR snow) * Gives speed when wearing skis and on snowy block, and slowness when not on snowy block * Added poles * Renamed "Item" (to store NBT) to ski_item and poles_item, for differentiation * Added jump boost effects for poles, and removed references to a "descending" predicate * Added crampons * Given jump boost functionality to crampons * Response to initial feedback - tripwire hook NBT not preserved - changed custom crafter output slot (replace boots, or bottom right) - removed lore Also - added cooldown for jump boost with poles (can't continually use) - removed some unnecessary predicates/tests - changed some conditions for when speed is applied with skis - changed end rod to iron bars in poles recipe * Fixed formatting, attempted adding 'snow detection system', but function 'main' only runs when directly commanded * Working snow detection system (now includes snow layer) * Smarter fall detection system implemented * Speed boost applied for travelling downhill using smarter fall detection system (further speed boost for faster falling going to be added soon) * Further speed added for faster descent * Adjusted recipes and changed poles to be a stick rather than tripwire hook * When holding poles, a lower v_y is needed to increase speed with skis. When holding poles, jump boost 1 is given, or jump boost 2 when having an upwards velocity. There is cooldown on the jump boost. * Crampons add slowness, and give a tag when facing a climbable block (=stone, grass, or dirt) * Crampons now allow for vertical scaling of walls (but shulkers still create death particles) * Shulkers now killed without particles (teleported to void first) * General clean-up, and need empty hands to climb * Changed advancement name to 'craft skis' * Particles added when skiing * Player can now look around when climbing, and lengthened the climbing cooldown * Using poles reduces fall damage * Added advancement for reaching maximum speed boost (but needs better name) * Some recipe tweaks (but I don't think this is compatible with BPR's recent update?) * Shulkers now summoned in a more precise way Climbing runs on a faster clock Shulkers no longer all killed when removing crampons * Simplified shulker killing mechanism * Changed context for kill_shulkers * Removed all "execute run" before function calls * Crampon removal commands only called once when crampons removed * New function to initiate crampon effects (those that only need running once) * Check for whether a player stands in front of a climbable block now uses a block tag * Further implementation of block tag for check of facing a climbable block * Moved function calls in main to a new player_main * Removed some unnecessary predicate calls * General cleanup * Fixed some incorrect headers * Should now use latest custom crafting system * Changed poles recipe and advancement names * Simplified climbing mechanism * Simplified poles system * Moved poles to fast_main (renamed from climbing_main) so NBT check isn't needed * Climbing shulker damage system moved to slow clock * Slowness is now an attribute of crampons * Changed jump boost conditions with poles: - with skis, get JB1 - without skis, get JB2 - always get JB3 when moving upwards (vy>=2) * Slowness effects called directly from check_snowy_block * Expanded range of climbable blocks, and general cleanup * Ordered climbable_blocks and removed settings.json changes (I don't even know how those got there?) * Simplified player_main, updated custom crafting loading to lib_machines warning message * Moved crampon tag-adding and -removing to main * Added a submain function for the fast clock * Moved kill_shulkers into damage_shulkers and reworked commands for check_steep_downhill_ski_speed * Reduced if score subcommands in check_downhill_ski_speed * Reduced score-checking subcommands in poles_equipped * Updated contributors.json with my own name (I don't have links) * Updated pack.png, removed pack.svg * Added snowy_blocks block tag and reduced particle count for skis * Removed HideFlags:64 from items * Summon shulkers high up, then tp down to avoid visual glitch (but doesn't work) * Moved damage_shulkers call to main from player_main * Another attempt at teleporting shulkers down * Moved at @s to fast_main from player_fast_main * Added blank links field to contributors and put my name in right place alphabetically * Renamed poles to ski poles * Set shulker peek 1t after teleporting to avoid player getting stuck * minor optimisation to reset_shulker_peek * Empty commit to run workflow * Shulkers will no longer spawn in air, and only one shulker will spawn in a given place * Crampons provide correct armour * Easier to maintain speed on flat, but harder to maintain uphill * Downhill ski speed effects removed if the player stops moving * Replacing pack.mcmeta with beet.yaml * Updated beet.yaml to 1.4.0 standard * Revert .vscode/settings.json to how it was (I don't know why this is getting changed) * Update translations, remove particles from resistance effect, minor reformatting * A few more formatting tweaks * Made it easier to climb walls of odd-valued height * Stop add_climbing_effects from running twice when two (different) conditions get met * Velocity updated whenever poles or skis equipped (formerly skis only) * Add a new tag to track the shulker peek setting * Rename 'Ski Poles' to 'Ski Pole'. Note the item is still called 'poles' on the backend. * Ski pole unstackable, and a scoreboard-based way to prevent adding climbing effects twice * Can only craft one ski pole at a time * Add Experimental Module Note * Add a README --------- Co-authored-by: Misode <[email protected]> Co-authored-by: Bloo-dev <[email protected]>
Adds some mountaineering-related gear to the game: skis, poles and crampons.
Skis
Poles
Crampons
Remarks
I can't see any changes needed to meet BPR's CC update, in that what I have looks similar to other modules. I might have missed something thoughI realise some changes are needed; going to look at thisCC should all be correct now