-
Notifications
You must be signed in to change notification settings - Fork 121
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
Improve Reference Mod Awareness #255
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Hi, thanks for making an issue, I'm not sure what you mean by "register context", do you mean an explanation on what the |
no, i mean explanation of where the function is called, because sometimes it is not very clear |
There is other contextual information missing earlier in this same document. In the 'Preparing your Items Class', there is nothing showing where all the classes needed to actually implement the example code come from. A new user (like myself) has no idea where you import Item, Identifier, Registry, Registries, and that the 'FabricDocsReference' should reference your own 'new item' class. The doc should note that your class must use these imports or show a full code example that includes the references, snippets of code aren't great in a tutorial. A link to a fabric/yarn class documentation would also be very helpful. I found one at: https://maven.fabricmc.net/docs/yarn-1.16.4+build.1/allclasses-noframe.html although I don't know if that is an official source or note. The example code in the 'preparing your items class' should include these lines: |
we expect Java developers to be at least a little familiar with some coding concepts, such as importing classes.
we recently added a note in the starting page for developers with a link to the full
you can find those from the official fabric website, albeit I'll admit that's not mentioned in the docs. |
I'm a long time developer and expecting the reader to know to import classes is a safe assumption. However, if this is intended as a tutorial, this is a huge API with hundreds of classes. Where do you import them from? I jumped directly to the 'Getting Started' section, followed through all the setup and didn't see the link to the full reference mod, maybe some repetition of that link would be helpful. That said, I was able to find the class locations with some searching on my own and get the snippets built into a working project. |
I think it would be beneficial to automatically add a references section to the end of any developer pages that provides links to any transcluded code blocks. Also see the discussion on Discord |
It looks like the referenced code project doesn't match up with the tutorial anyways. It may be a completed mod, but none of the code shown in the tutorial is actually present in the referenced project making it of limited use to someone trying to figure things out for the first time. It is useful for attempting to extract reference locations and project structure, but not as a side-kick to the tutorial snippets. |
could you elaborate on how that is? the docs (not the wiki!) literally embed code from the reference mod |
Yes. the docs reference the 'sample mod' code on the docs page located at 'Developer Guides': There are three versions of code located there and it looks like the 'latest' section contains the example code, but the project is further advanced from the 'Create your First Item' page. For instance, it references adding your translation to src/main/resources/assets//lang/en_us.json If we go to that location in the sample at: We can get down to the level, but there is no Lang folder and no translation json in this location. It must be somewhere else? I was able to find ModItems.java in the location referenced by the documentation, but some of the other files aren't in the locations referenced in the docs. Here are some more examples: Docs tell you to put your item model description json in: assets//items I'm sure these files are somewhere, and they probably get put into different places as the example becomes more complex, but that makes referencing the code as you work through the tutorial in the beginning stages fairly difficult. I'm sure once you have more time working with this particular object model and project structure, you know where these things live. |
Huh. That one file is the only one from that page not transcluded. I would have thought there would be a lint for inlining code |
All the assets are datagen'd to ensure that the JSON files can be easily updated if the format changes in future updates. You can find them in the src/main/generated folder, not src/main/resources. |
Docs page: https://docs.fabricmc.net/develop/items/first-item
referencing fabric wiki, there should be a context for some points
1 - downloaded texture name is not matching the texture mapping name in the tutorial which should be equal
2 - in the fuel section, there is no clarification about the register context, in fabric wiki there is an example with context provided. Also, this is a frequent problem occuring in some other articles like Custom Groups
there's a lot of moments like this but i assume that you are planning to rewrite it for newer versions
The text was updated successfully, but these errors were encountered: