-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add verbosity and clarification to First Item tutorial page #161
base: main
Are you sure you want to change the base?
Conversation
Add more wording to fill in gaps in tutorial
✅ Deploy Preview for nimble-elf-d9d491 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for nimble-elf-d9d491 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
develop/items/first-item.md
Outdated
|
||
To do this, you can add a public static initialize method to your class and call it from your `ModInitializer` class. Currently, this method doesn't need anything inside it. | ||
ModItems.java |
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.
If you want to label these code blocks, use h4 headings.
develop/items/first-item.md
Outdated
@[code transcludeWith=:::1](@/reference/latest/src/main/java/com/example/docs/item/FabricDocsReferenceItems.java) | ||
|
||
Calling a method on a class statically initializes it if it hasn't been previously loaded - this means that all `static` fields are evaluated. This is what this dummy `initialize` method is for. | ||
|
||
With that added, running your mod will now allow you to /give yourself your {mod-id}:suspicious_substance. |
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.
Wrap templates in `` please. Eg; {mod-id}: suspicious_substance.
You could alternatively have:
Once you've added this method, you can run your mod and use the following command to give you the suspicious substance item;
\`\`\`command
/give @s <mod-id>:suspicious_substance
\`\`\`
Make sure to replace \`<mod-id>\` with your mod's ID!
develop/items/first-item.md
Outdated
@[code transcludeWith=:::1](@/reference/latest/src/main/java/com/example/docs/item/FabricDocsReferenceItems.java) | ||
|
||
Calling a method on a class statically initializes it if it hasn't been previously loaded - this means that all `static` fields are evaluated. This is what this dummy `initialize` method is for. | ||
|
||
With that added, running your mod will now allow you to /give yourself your {mod-id}:suspicious_substance. | ||
|
||
But it still won't show up when you press 'E', for that, you will need to register the item to an Item Group, described next. |
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.
Be more specific;
It wont show up within the creative inventory...
Keybinds aren't fixed, especially vanilla ones like Open Inventory
develop/items/first-item.md
Outdated
@@ -36,18 +39,28 @@ If you want to change your item's stack size, you can use the `maxCount` method | |||
This will not work if you've marked the item as damageable, as the stack size is always 1 for damageable items to prevent duplication exploits. | |||
::: | |||
|
|||
For example, you can create a new "Suspicious Substance" by adding this static field to your ModItems class. |
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.
For example, you can create a new "Suspicious Substance" by adding this static field to your ModItems class. | |
In this example, we will create a "Suspicious Substance" item, by adding this static field to your `ModItems` class. |
No description provided.