Skip to content

Commit

Permalink
fix(docs): Add IHH's suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: IchHabeHunger54 <[email protected]>
  • Loading branch information
ChampionAsh5357 and IchHabeHunger54 authored Nov 14, 2024
1 parent 18e58d6 commit 4980454
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/resources/server/recipes/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class RightClickBlockRecipe implements Recipe<RightClickBlockInput> {
}

// When true, will prevent the recipe from being synced within the recipe book or awarded on use/unlock.
// This should only be true if the recipe shouldn't appear in a recipe book, such as extended a map.
// This should only be true if the recipe shouldn't appear in a recipe book, such as map extending.
// Although this recipe takes in an input state, it could still be used in a custom recipe book using
// the methods below.
@Override
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/server/recipes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ A full list of types provided by Minecraft can be found in the [Built-In Recipe

## Using Recipes

Recipes are loaded, stored and obtained via the `RecipeManager` class, which is in turn obtained via `ServerLevel#recipeAccess` or - if you don't have a `ServerLevel` available - `ServerLifecycleHooks.getCurrentServer()#getRecipeManager`. The server does not sync the recipes to the client by default, instead it only sends the `RecipePropertySet`s for restricting inputs on menu slots. Additionally, whenever a recipe is unlocked for the recipe book, its `RecipeDisplay`s via `RecipeDisplayEntry`s are sent to the client (excluding all recipes where `Recipe#isSpecial` returns true) As such, recipe logic should always run on the server.
Recipes are loaded, stored and obtained via the `RecipeManager` class, which is in turn obtained via `ServerLevel#recipeAccess` or - if you don't have a `ServerLevel` available - `ServerLifecycleHooks.getCurrentServer()#getRecipeManager`. The server does not sync the recipes to the client by default, instead it only sends the `RecipePropertySet`s for restricting inputs on menu slots. Additionally, whenever a recipe is unlocked for the recipe book, its `RecipeDisplay`s and the corresponding `RecipeDisplayEntry`s are sent to the client (excluding all recipes where `Recipe#isSpecial` returns true) As such, recipe logic should always run on the server.

The easiest way to get a recipe is by its resource key:

Expand Down

1 comment on commit 4980454

@neoforged-pages-deployments
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploying with Cloudflare Pages

Name Result
Last commit: 49804541f492b16f42cfb07f934d307be98417d9
Status: ✅ Deploy successful!
Preview URL: https://4f485fc7.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-178.neoforged-docs-previews.pages.dev

Please sign in to comment.