Forge Modding Tutorial - Minecraft 1.20: Custom Items & Creative Mode Tab | #2
Вставка
- Опубліковано 4 лип 2023
- In this Minecraft Modding Tutorial for Forge, we are adding a Custom Item to Minecraft 1.20, as well as a Custom Creative Mode Tab!
== MODDING COURSES ==
FORGE ▶️ url.kaupenjoe.net/CourseForge...
FABRIC ▶️ url.kaupenjoe.net/CourseFabri...
== COMPATIBILITY ==
▶️ Compatible with 1.20 & 1.20.1
== ASSETS & DOWNLOAD LINKS ==
GitHub Repo: github.com/Tutorials-By-Kaupe...
Assets Zipped: url.kaupenjoe.net/mbkj48/assets
== SUPPORT ME ON PATREON ==
▶️ / kaupenjoe
== 25% OFF FOR GAMING SERVERS ==
▶️ www.bisecthosting.com/Kaupenjoe
== TAKE A LOOK AT MY COURSES WITH COUPON CODES ==
▶️ NEW Forge Modding with Minecraft 1.20.X:
url.kaupenjoe.net/CourseForge...
▶️ NEW Fabric Modding with Minecraft 1.20.X:
url.kaupenjoe.net/CourseFabri...
▶️ Complete and Roblox Lua Game Development:
url.kaupenjoe.net/RobloxCoupon *
▶️ Learn Forge Modding with Minecraft 1.18:
url.kaupenjoe.net/CourseForge118 *
▶️ Learn Fabric Modding with Minecraft 1.18:
url.kaupenjoe.net/CourseFabri... *
== SUPPORT ME ON PATREON ==
▶️ / kaupenjoe
== SOCIALS ==
Discord: / discord
Personal Twitter: / kaupenjoe
Instagram: url.kaupenjoe.net/tutorials/i...
Facebook: url.kaupenjoe.net/tutorials/f...
Twitter: url.kaupenjoe.net/tutorials/t...
TikTok: url.kaupenjoe.net/tutorials/t...
Written Tutorials: url.kaupenjoe.net/tutorials/blog
== LICENSE ==
Source Code is distributed under the MIT License. Additional Licenses for other assets can be seen below or in the accompanying CREDITS.txt on download.
== AFFILIATE DISCLAIMER ==
* Some of the links and other products that appear in the video description are from companies which I will earn an affiliate commission or referral bonus from or are my own products. This means that if you click on one of the product links, I’ll receive a small commission or additional kickback without any additional cost for you. This helps support the channel and allows me to continue to make videos. Thank you for the support!
== HASHTAGS ==
#Minecraft #MinecraftModding #MinecraftTutorial #Kaupenjoe
roughly 16:00, "pParameters, pOutput" should be replaced with "itemDisplayParameters, output". and the "pOutput" below that line should be replaced with "output"
Thank you so much. I was having issues with the auto complete, tried to have Intellij mirror what I saw in the video and kept getting the "wrong" outcome. Followed your comment here and it worked!
You 1.20 kids have it sooooo good. Back in my day we modded in ZIRCON, and it was ROUGHLY THE SAME
This means WAR
🤣🤣🤣🤣🤣🤣
@@ModdingByKaupenjoe I am having a texture problem, the texture is not rendering what do I do? I used your models json files and added my own textures despite all that it is pink and black
Is this a 16x16 texture problem?
@@meherabhossain2194 probably yes, your textures have to be 16x16 like every minecraft texture :)
Moreover, make sure that your png file’s name is the same as the one specified in the « layer0 » line in your item’s model :)
back in my day minecraft never existed we had to play with toys and we had only 20 minutes before our perents took them, we had to go through mountains and through aether fricking portals (how the heck is my brain even working this out aether portals is that even a thing in minecraft 😂 😂)[anyway] from there we had to get some fireworks and elyt 😭😭😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂 i can't do this enymore
AAHAAAA I LOVE THIS, man I got really excited seeing that Sapphire in-game.
I do have trouble understanding the bits of code, but just knowing it works is incredible, I'll now try adding my own textures and items to the game so that I can better understand everything!
Thank you!!
Thank you for taking the time to explain everything from start to finish yet another time for a new version!
You are so helpful!
Thank you for this tutorial! One note for .displayItems at [16:00] : you can use a for loop here to add the custom items without adding every item on its own. That looks like this: .displayItems((pParameters, pOutput) -> {
for(RegistryObject item : ModItems.ITEMS.getEntries()) {
pOutput.accept(item.get());
}
})
Very true! There are some instances where you might not want to add all items to one tab, but want to split them up, then it can make this more complicated. However, it it's a very good solution for this :)
like I understand java a bit, but doing any minecraft java coding is soo confusing. I dont understand what half of this stuff means
@@GurpefyThat's a for each loop, it's creating a variable of type RegistryObject named item for each object contained in the return of getEntries(), and it runs the code inside the loop body for each one.
They're a much more compact way of writing a for loop whenever you have a list of objects of the same type.
This is awesome! It felt so good seeing my custom mod tab in the creative menu! Thank you for making such high-quality tutorials.
Thank you so much for the kind words, awesome to see you making some mods. Excited to see when your first mod comes out 😁😁💙
If school was as exciting to learn new things as this i would've never wanted to come back home again😂. Phenomenal series you are amazing!!
Thank you so much for the kind words 💙
This is very useful thank you so much for this brilliant tutorial!!!
this guy is the goat🔥
💙🙏🏻
Truuueee
so true
I was looking for this for an hour
I like the idea to make some reusable things at the start like the creative tab where we can place our items. The syntax is kinda hard for me to understand as a complete java beginner ( Finished your Java course, took me 3 days ) but I think it's about coding, coding and coding and I will get used to it. Thanks for your amazing job helping noobs to understand crazy things ;D
Absolutely! It all comes down to repetition and at some point you'll get the Eureka moment and it'll make all the repetition so freaking worth it 😁😎 Best of luck on your continued journey and thank you for kind words 💙💙
I am very For this clear tutorial.This tutorial is very beginner friendly.I am very happy to make my own new mods in minecraft java by this tutorial. Now i am working with a World generation mod :)
Thank You...
thanks for the tutorial
You're the best tysm
everything has worked just can't get the png files for the item textures to load
Make sure that your mod ID and package name are the same.
@@prajplayz still doesn't work and I quadrupled checked evrything
had the same problem here didn't know why, but I made a "item" folder(directory) inside of the textures folder(directory) and but the images in there and it worked fine. (my issue anyway)@layer1547
@@prajplayz😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅 3:00 3:00 3:00 bis bis zur 3:01 letzten 3:01 3:01 3:01 3:01 3:02 und neun 3:50 und und die 3:53 waren auch die die man 4:00 in die 4:09 4:11 in die 4:13 4:13 4:14 der der 4:15 4:16 4:16 4:17 4:17 4:17 in in in die Mitte Mitte 4:20 4:20 4:20 von von den 4:22 4:23 der 4:24 4:24 4:27 4:27 4:31 4:31 😅3:57
I had the same issue. I don’t know what was wrong but to fix it I went to the GitHub repository and replaced everything with the names of my stuff. I probably just misformatted something I hope this helps.
the thumbnail is great
These vids are amazing i can tell u put effort into them
I appreciate that, thank you so much for the kind words 💙💙
@@ModdingByKaupenjoe your welcome i really enjoy your tutorials have a good day
모딩 기본 세팅이 안돼서 모딩을 포기했는데 Modding by Kaupenjoe님의 영상덕분의 성공했어요!
nice concise and up to datee.
thx
: )
.
Is it possible to set the position of the creative tabs? I tried creating two of them but one of them got generated on the first page right next to building blocks, while moving the spawn eggs tab to the second page. Can't figure out if I am doing something wrong
can you show how to make the item have a custom amount of damage?
Hey man, great video, at 13:35 when you created the java class for the custom creative mode tab, you wrote "ModCreativeModTabs" instead of "ModCreativeModeTabs", does that change anything??
nah
How did you make the item textures? I made one but it is showing up semi transparent when I really don't want it too. How would I fix that?
love you video's
hey i want to ask something i watched your ore and tree generation videos and did the same thing but it doesnt work can u help?
How do i add attributes to a weapon? is there a better video to watch for making a weapon with altered stats (I want to make a sword that does very little damage but has no swing cooldown)
can you go over how to make a sword or tool with special abilities?
I understand needing to make sure the video isn't long but dang, you're zooming. Great tutorial though! It's super helpful
how can i make the pictures for the items, just out of curiosity as I am in the process of making my first Minecraft mod
got it to work, but the Sapphire has the untextured texture. I got confused where he added the png because it just popped up when he didn't seem to press anything. I'm not sure how to get the texture to show up as any change I make seems to cause something in the lang to make an error and the game crashes.
How does the en_us.json file actually connect to the rest of the code? I understand its supposed to make the name for the item in-game, but it seems totally isolated. is there another file that is reading it somewhere that i missed? it may not actually help with coding, but I am interested
i love this, making my own mod is a good little project while i'm on vacation. I have a question tho, how should I name the lang json file for the name of my objects in spanish? is it sp_mx.json or...?
thank you so much in advance
Any idea how to fix this error : UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable I believe it is specific to mac, but I can't find a solution :( so my textures won't load
Are rideable entities, baby entities coming????
Amazing videos! though, i have a problem; i've checked against both the video and the repo, and in the tutorial for the custom creative mode tab, my code looks exactly like yours except my public static final RegistryObject TUTORIAL_TAB shows no usages when i finished that section, any suggestions?
Instead of initializing a static variable you can just add the line of code he wrote into the register method. So in register write CREATIVE_MODE_TABS.register("tutorial_tab"...) and so on. Make sure you write it after CREATIVE_MODE_TABS.register(eventBus).
I'm getting an error that "Could not reserve enough space for 3145728KB object heap". Why is my object heap so insanely huge? And how can I fix this?
I love your "AAAAAAAAAAAAALright everybody!"
Don't know why, but it won't let me run the script, do you have any idea why? (The run button is gray)
is there any website where i can find texture for the items??
i very like this video😃😃😃😃😃😃😃😃😃😃😃
Great video. I was wondering why when I got to make a directory i works fine and then I go to make the second directory that is the mod ID and it doesnt add a dropdown to the previous directory. It simply changes the name of assets directory to assets.tutorialmod. Any clue why this would happen?
This is just a view setting. Under the project tab in the navigation window, just click the three dots => Tree Appearance => and make sure "Flatten Packages" and "Compact Middle Packages" are unchecked. The directories are there, the IDE just mashes them together in the navigation to keep the directory tree looking clean.
I’m assuming there is some sort of change in between writing this and the publish of the video but the “BuildCreativeModeTabContentEvent” is red for me, and it says I could
Create Class
Create Interface
Create enum
Creat inner class
Create type parameter
What do I do, or is there a different way?
Strange, there really shouldn't be 🤔 what forge version are you using? 🤔
@@ModdingByKaupenjoeI was using 1.16.5! I used your 1.16.5 tutorial to get into the game. Thanks!
Thanks! I was trying to add the creative tab with your 1.19.3 series but it didn't work, so I guess they changed the way its done
Same with 1.19.4. I will just keep watching the 1.20 series i guess since they changed some things apparently.
Nevermind its still not working. I dont have any Deferred register for this. Can you help?
Hey I was following the tutorial to a T exception being me changing names of stuff to fit my own mod and for some reason the creative tab thing isn't detecting the translation, if I click the option to make it automatically create one (me inputting what it translates to) it makes the translation in the correct file (en_us.json) but for some reason it's not detecting the translation is in there even when it puts it there itself, did I mess something up? How do I fix this?
Hey, did you manage to fix it? I seem to have the same issue
I am also having this problem.
@@0O7 I did but I don't know what I did in the first place to fix it.
When I try running my mod I get a warning that it failed to load a valid ResourcePackInfo. So none of my textures for items nor the names set in en_us.json show up properly. What is causing this?
I figured it out. For some reason my files were missing the pack.mcmeta inside of the resources folder.
im having a problem every time i try to open up my inventory it just freezes and crashes
1stly you explained it very well
2ndly in 14:05 When I write DefferedRegister.Create(Registries. i am not able to find CREATIVE_MODE_TAB it says it isn't existing
Try to use creativemodtab
Will you do again videos abaut datagen or does the 1.19 version work on 1.20
Absolutely Datagen videos coming soon 😎👀
It's been a long time since I messed with Minecraft modding and I can't remember, do I need to have a forge server running on my computer for this client to connect to so I can get into creative mode? Or can you do that in SinglePlayer mode?
Nah, you can do everything in single player mode. It does make sense later down the late to also test things with both server and client, but for most of the early things, testing it in single player should be fine :)
@@ModdingByKaupenjoe Thanks Joe, I had forgotten you can pick the mode when you create a new world in SinglePlayer mode.
At 3:28 bus automatically fills in but it’s not doing it for me it just has the brackets
how do i add it as a .jar mod into the mod folder? do i just rename the folder im working on as a .jar and add it?
You open the terminal put in ./gradlew build and hit enter
Open your project folder in the explorer. You will find the JAR file in build > libs :)
@@ModdingByKaupenjoe Thanks Kaupen
The black magic to get the sapphire.png blew my mind for a moment. There is a zip in the description where he dragged from another screen or something
yes, you can download the png file from the description 😅 you just have to then drag the png into the folder 🙏🏻🙏🏻
i cant get the pOutput to work
epic
What button did u press for that copy thing to come up
If you also need it, that Ctrl + V. You also have to cope your file
Your videos are amazing and are helping me to make some adjustments to a mod I really like! including putting in a creative menu tab, as it was not present.
But in Intellij I am seeing p_ numbers not pNames and I can't figure out how to change it. For example, I get this:
.displayItems (p_259814_: ((p_270258_, p_259752_) ->
rather than seeing
.displayItems ((pParameters, pOutput) ->
I cannot find the setting to change this---it wasn't always like that so I must have messed something up, but their help menu doesn't appear to have an answer---but its driving me crazy! Any ideas how to fix it? thank you!!
Thank you💙💙 Take another look at the first tutorial starting at 10:17, you wanna use parchment mappings and that should hopefully fix it :)
@@ModdingByKaupenjoe Thank you!!
5:44 I am having error with getTabKey and accept, do you know why? (I am codding in version 1.20.2)
same
did u make sure to do if (event.getTabKey() == CreativeModeTabs.INGREDIENTS) has TWO (==) equal signs and not just one =?
hey make sure you name thing right it is a must
Hey I tried running "BuildClient" but got this error:
Execution failed for task ':runClient'.
> Process 'command 'C:\Users\Astral\.jdks\jbr-17.0.9\bin\java.exe'' finished with non-zero exit value 1
I had the same issue and it turns out it was because my mod id was invalid since it contained hyphens "-". I removed hyphens and also updated my jvm to temurin version 19 and minecraft launches now. Hope it works for you.
Hello! I have a problem with the textures, it doesn´t load in my game and i tried everything, anyone has an idea of what could it be?
i have the same problem. it does the black and pink checkerboard texture instead of mine
for some reason deferredRegister doesnt come up when i type it in, do you know how i could fix this?
make sure you have imports above your class
also the capital D is important in Deferred
This is my first time using Java for something that isn't just a simple introduction to programming, and my god the code required to register a creative tab is making me need a minute...
Ye, it's quite rough 😅 That's why the modding community always pleads with people to learn java before jumping immediately into modding 🙏🏻
@@ModdingByKaupenjoe it's actually not that bad reading it a second time. I'm just not used to literally every line of code storing at least 1 reference to something across various files because in programming tutorials it's usually just one or two files with everything hard coded. Plus I've never used the builder pattern until now. (and doing the dots on each new line (I think it's called calling methods but I don't know if the java term is different (sorry for nested brackets I'm sure you're used to reading them though)) is not something I've ever seen before)
How did you make the textures for the sapphire?
I actually ordered them from an artist on fiverr. If you wanna make your own textures, you can use gimp or paint.net - I personally use photoshop, but that's usually too expensive for people 🙏🏻🙏🏻
@@ModdingByKaupenjoe Thank you so much!
my name isn't showing up and is hwoing up as item.modid.itemname and my commas, semicolons, colons are all white instead of orange
samne, nay solution?
How Can I export my mod?
Whenever I add an item to the creative tab, it appears invisible in the creative tab, but the name is visible when i hover over it. How can I fix that?
This usually means you have a typo somewhere in the item model json file in the names. Double check that, including casing!
@@ModdingByKaupenjoe Wow thanks, I checked 3 times if I wrote everything right, but I had texture instead of textures lmao
Sometimes you sound like xQc lmao, great tutorials
WHAT 🤣 that is some crazy comment! But kinda funny ngl 🤣😜
is anyone else having an issue that says the registry object not present?
I can't create a new texture and use it, I looked at your blockbench tutorial and created my own texture. I just followed your steps but used my texture instead, but whenever I load into minecraft to see it, I get the no texture block
Same issue
Same issue
Did you name your texture file "textures"?
@@wolfieboy09 dont worry about it I switched to fabric because I thought it was better and the problem fixed itself
Make sure you made an "item" folder in BOTH the "textures" folder AND the "models" folder. Had the same problem. The " means its case sensitive you HAVE to name it that.
My register function for ModCreativeModeTabs isn’t registering and my item textures aren’t working. What could I have done wrong? I already checked everything from the video multiple times.
From someone elses comment: "Hey man, great video, at 13:35 when you created the java class for the custom creative mode tab, you wrote "ModCreativeModTabs" instead of "ModCreativeModeTabs", does that change anything??" So could be a spelling mistake
@@blokmachinist8870 I fixed that already. Too late though, already figured it out!
Im getting an error message that says "java.lang.NullPointerException: Cannot invoke "java.lang.Class.getname()" because "this.modClass" is null".
same
DeferredRegister won’t pop up for me
when i do "CreativeModeTabs.INGREDIENTS" it says it can't resolve the name and "INGREDIENTS" shows up red. What am I doing wrong?
Make sure it's CreativeModeTabs plural and not CreativeModeTab singular
whenever i test at 11:03 minecraft gives me an error and says mods.toml missing metadata for modid assets/tutorialmod. anybody know how to fix this?
When changing the name, it changed your mod id in the TutorialMod class to "assets/tutorialmod" for some reason this sometimes happens. Just change it back to tutorialmod and you should be good to go.
@@ModdingByKaupenjoe thanks!
how do others download this???????????????
I can never figure out github i follow the direction to commit and it always fails. I set it up right and I get git is not installed. I install it and when i go to push and commit it says it already exist but it is empty I wished when people make these tutorials they would not forget to tell how to set it up if they are going to use it in the tutorials. also the discord is crap noone ever seems to help and they have in the rues you cant message anyone directly and I purchased several of his classes
Couple of things, firstly I have answered every one of your comments in the comments section.
Secondly, git/github is not necessarily required to follow any of the tutorials. It might be very useful, but can be skipped.
Thirdly, yes all help given in the discord is 100% voluntary, that's why there is no direct messages, because it gets way too much.
Fourthly, all my classes have a way of asking questions within the website itself, be it a Q&A or a comment section.
Fifthly, the last question you asked on the discord server was at 2 AM my time. Many people who would be able to help are from European Time zones, including myself, and might sleep or have lives to live.
If you cannot see that I and people on the server are trying our best to help where we can, then I don't know what to tell you.
And I can't find the sapphire
Possible Texture Solution: Silly me didn't get my textures to load properly because I did not have my sapphire.json file INSIDE the item folder. I'd make sure all files (sapphire.json, en_us.json, and sapphire.png) is inside their respective folders.
for what ever reason textures dont show up even though there nothing wrong and i cant figure it out
Well, if the textures won't show up something is wrong. Double check the spelling of each folder and the folder structure, as well as the texture file. Then make sure the json file has the correct name and spelling as well, then check the contents of the json file and make sure there's no typos in there either. Including casing, that's an easy thing to miss :)
How do we get the textures to work? (they appear pink/black/checkered)
Then you have a typo in your folder structure, the time model JSON file or your texture file. Double check all those 🤔
@@ModdingByKaupenjoe Turns out I had to add .png to the file names. Thanks for the reply and the awesome videos!
@@rithtruong hey wdym I’m having the same issue how do u fix it?
@@Shroomland1738 if you’re on MacOS, when you save the image from chrome don’t forget to add .png to the file name
@@rithtruong got it thxxxx
guys how did he get the texture of the sapphire automatically pls help I want to know how to import my own 3d model
he had it before
my editer is action like command prompt and idk how to make it like a text editer again
fixed that but if i have a item model will i be able to us it by doing item/modelname
the pParameters dose not exsist
No matter what I do, it keeps telling me the .item package doesn't exist, despite the fact I did everything exactly as it was show here.
same
Why we didnt use datagen?
Datagen will be introduced in a later tutorial 🙏🏻🙏🏻
i skipped from first vedeo and i got to this howww i just came here
please help, the sapphire appeared as a null block :(
Must be a typo either in your folder structure or in the item model json file. Double check all the spelling and casing too🙏🏻
@@ModdingByKaupenjoeindeed was a typo, thanks a lot for the help and also great tutorial btw!
Why am I loading in as a KaupenJoe skin? lmao
How do I get the Png file?
The assets are always linked in the description below for download. They are sometimes zipped, which means you need to extract them 🙏🏻
thanks!!!
@@ModdingByKaupenjoe
This new method to add items/blocks into a creative tab is ridiculous, what is the problem to use a property ".creativeTab" in a Item.Properties for example?
Nah, the tiem/items mistake isn't something I've seen in a long while, since the 1.7 to 1.8 switch in naming conventions
hi,i can't see the texture and the name when i open the game,i checked everything,what this may be?
11:00
6:20
why do i get a course if i can get fuckin mcreator for free
The textures are still black and pink, I made sure the json was correct, the name was item.tutorialmod.sapphire when i held it in my hand, so maybe it didnt load right? Please clarify.
If both the name and the name texture don't work, there's most likely a typo or mistake in your folder structure. Make sure the names are all spelled correctly, the folder structure is correct and your mod id is spelled correctly
i didn't understand anything at all
this is the easy parts of modding
hello for somereason i am getting a java.lang.reflect.InvocationTargetException: null error when I followed along to the . what would cause it because it says that it has failed to load correctly
never mind i found the error i had a stray Capital that was hiding in the registry object. loving the tutorials so far cant wait to see whats next
whenever i try and launch it to test it @11:03 I get this failure
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-3"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Server thread"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Render thread"
> Task :runClient FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':runClient'.
> Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot\bin\java.exe'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at help.gradle.org
BUILD FAILED in 2m 1s
Try making sure your MOD_ID does NOT have hyphens (dashes). I named mine with a hyphen thinking it would work but it needs to be only letters or underscores. All letters is probably best.
I also have the same error
mods.toml missing metadata for modid ...
Not sure what I did wrong but I'm getting this when i try to run it "Caused by: java.lang.ClassFormatError: Duplicate method name "lambda$createSearchTrees$18" with signature "(Lnet.minecraft.world.item.ItemStack;)Ljava.util.stream.Stream;" in class file net/minecraft/client/Minecraft" followed by this > Process 'command 'C:\Users\valex\.gradle\jdks\eclipse_adoptium-17-amd64-windows\jdk-17.0.10+7\bin\java.exe'' finished with non-zero exit value 1