I am brand new, tried looking at fabric documentation but I have no idea on how to do this. all I need is an item with a texture so i can use it as an icon for an origin (origins mod). the icon requires an item so i thought it couldn't be too challenging and tried my best. someone walking me through how to make an item and where i should put things would probably be the best solution for me.
#making an item
27 messages · Page 1 of 1 (latest)
Docs and the vanilla src are your best friend 👍
the docs have a fully working example
registering a simple item is trivial and covered by the docs
how would I find this?
the vanilla src
If you use IntelliJ, in the project bar the External Libraries
right now i have vscode and jdk, that's all i have been using
as my post says, I went through that and still don't know how to do it. right now, I'm looking through the wiki instead (https://wiki.fabricmc.net/tutorial:items)
the wiki is outdated
Maybe they use older versions 🤷
well in any case, they seem to be struggling with the java aspect
if someone asks "where" to put the code, i take it as an indication of a... java skill issue
does "brand new" not clarify that?
not specifically, what's important is the when code is called during initialization, not where
the code in the docs is from a fully working mod, have a look at that if you need a full example
in
fabric-docs/reference/latest/src/main/java/com/example/docs/item/ModItems.java
to understand it, I'm separating it into parts.
from line 54 to 90, they seem to be registering the items. i heard of this elsewhere being the second sentence in "creating your first item"
in 94-98 they make what seems to be a category. (the creative?)
then they make a poison food component and apply it to a poisonous apple.
they then make a suspicious substance which i will refer to and rom the "creating your first item"
138-157 seems to be putting the items into the game on initialization. (assuming I can use common sense, I know what this is)
162-175 puts the categories - called item groups (don't know why) - into the game on initialization (again I'll assume common sense)
after that, it makes the suspicious substance compostable then useable as a fuel
is that what these things are doing?
If there is one, following something such as a kaupenjoe tutorial (on YouTube) for the version of minecraft that you’re modding would be helpful
I'm assuming you're requesting I send a tutorial video
no
as in you could just follow a mod tutorial up to adding an item
then go from there
unless im misunderstanding what you are having trouble with
Look up the Youtube account Modding by Kaupenjoe, specifically titled Fabric Modding Tutorial - Minecraft 1.21: Custom Items. I had basically no experience prior and was able to do a lot after checking out those videos. You can also check source on mods with your version as a lot of them are open source. Good way to find examples (and how I figured out fluids)