-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Feature: Add recipe unlocking on Bedrock edition #4016
Merged
onebeastchris
merged 30 commits into
GeyserMC:master
from
onebeastchris:recipe-unlocking
Nov 10, 2023
Merged
Feature: Add recipe unlocking on Bedrock edition #4016
onebeastchris
merged 30 commits into
GeyserMC:master
from
onebeastchris:recipe-unlocking
Nov 10, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…?), and dont send trims if Java doesn't
…er caching - Bedrock does not need the smelting recipe, and doesn't (un)lock stonecutter recipes (yet...?)
# Conflicts: # core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java
Konicai
requested changes
Sep 2, 2023
core/src/main/java/org/geysermc/geyser/session/GeyserSession.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java
Outdated
Show resolved
Hide resolved
# Conflicts: # core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java # core/src/main/java/org/geysermc/geyser/session/GeyserSession.java
Camotoy
reviewed
Nov 4, 2023
...main/java/org/geysermc/geyser/translator/protocol/java/JavaClientboundRecipesTranslator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java
Outdated
Show resolved
Hide resolved
Camotoy
reviewed
Nov 4, 2023
.../src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java
Outdated
Show resolved
Hide resolved
Camotoy
approved these changes
Nov 10, 2023
Konicai
approved these changes
Nov 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
PR: Feature
When a PR implements a new feature
PR: Needs review
Indicates that a PR is functional and review-ready.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey!
Since 1.20.10, there's a recipe unlocking system. Since it is currently still experimental, we would have to enable "recipe_unlocking", but the good thing here is, that old versions would be unaffected by this change.
Changes necessary:
While we could still just use random uuid's as the recipe identifiers, using the java identifiers wherever possible could allow reducing the stored recipe identifiers to only those that do have multiple Bedrock recipesDoesn't really matterLeft to do:
Add java recipe identifiers to our recipe.json mappings - otherwise, those would never be unlockedTurns out: While Java edition has recipe identifiers for these special recipes (e.g. minecraft:suspicious_stew, or minecraft:shulker_box_coloring, or minecraft:tipped_arrow), which do show up as autocomplete options with the /recipe command, those cannot be given/taken away, and they do not show up in the recipe book on Java edition - hence, we probably shouldn't either :pEdit # 2: while java doesnt unlock these, we probably will do so forcefully - to make sure it works similarly as it does on Bedrock edition itself.
Add furnace/blasting/smoker recipes - while there is no use for them on Bedrock as far as i can see, BDS sends them, so i would assume they might add that in the future. Also, the pop-up is still thereI was mistaken. Bedrock seemingly sends them during recipe definition, but doesn't actually lock/unlock them - however, this might allow us to define custom furnace recipes? probably not though. EDIT: No need to add/translate these currently - custom recipes already work, and since they're not (un)locked, no need to store recipe identifiers. Heck, don't even need to send the recipe :pNot strictly related to recipe unlocking, but.. why not:
- [x] Only send smithing template recipes if the server does tooImplemented in 706d1b9-Fix hanging sign crafting recipe, presumably related to the chains in the recipeGeyser broken vs BDS: https://paste.gg/p/anonymous/b62c8fa3ad1247c7bc37e2f17da91760
Geyser works vs broken: https://paste.gg/p/anonymous/38c4eabd01a146af9e68477fd81bbd9d
Seems to be due to the block definition sent in the recipe result.
Not fixing it in this PR, not sure how to fix.
There are two new multirecipe uuids, one for decorated pots (added in 1.19.70.23, see here, and one in 1.19.80; presumably for then added trims?) Java edition also sends a sort of multirecipe once, so an extra case where we also send that multirecipe should do the trick here.
RFC: What would be the best way to handle storing Java -> Bedrock recipe identifiers? Per session, or versioned registry?
More fun things:
https://paste.gg/p/anonymous/dbafa96a204a40a8a04c997ac4a9c171 all bedrock recipe identifiers (1.20.12 BDS)
https://paste.gg/p/anonymous/fd13b5a490ba47caae96e76eb0e58d86 all MultiRecipes, probably worth checking out what the rest does
Would appreciate some feedback, just for cleaner impl