Skip to content

Commit 87710ba

Browse files
committed
mention registration of upgrading menu
1 parent 28842f0 commit 87710ba

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

develop/custom-recipe-types.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ To detect when the user takes the result out, we create an anonymous subclass of
9090

9191
To prevent deleting items, it is important to drop the inputs back when the screen is closed, as shown in the `removed` method.
9292

93+
You also need to add the menu to the registry:
94+
95+
<<< @/reference/latest/src/main/java/com/example/docs/recipe/ExampleModRecipes.java#upgrading-menu-registration
96+
9397
## Recipe Synchronization {#recipe-synchronization}
9498

9599
::: info

reference/latest/src/main/java/com/example/docs/recipe/ExampleModRecipes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class ExampleModRecipes implements ModInitializer {
4242
new RecipeBookCategory()
4343
);
4444

45-
//:::menuRegistration
45+
// #region upgrading-menu-registration
4646
public static final MenuType<UpgradingMenu> UPGRADING_MENU_TYPE = Registry.register(
4747
BuiltInRegistries.MENU,
4848
Identifier.fromNamespaceAndPath(ExampleMod.MOD_ID, "upgrading"),
@@ -58,7 +58,7 @@ public class ExampleModRecipes implements ModInitializer {
5858
.setId(ResourceKey.create(Registries.BLOCK, UPGRADING_BLOCK_ID))
5959
)
6060
);
61-
//:::menuRegistration
61+
// #endregion upgrading-menu-registration
6262

6363
@Override
6464
public void onInitialize() {

0 commit comments

Comments
 (0)