Tutorials-By-Kaupenjoe / Forge-Tutorial-1.20.X

Repository for my Forge 1.20.X Tutorial Series on YouTube. Playlist link below!
https://www.youtube.com/playlist?list=PLKGarocXCE1H9Y21-pxjt5Pt8bW14twa-
MIT License
113 stars 30 forks source link

i have everything like the tutorial on ep 2 and it still does not work #5

Open salty-g80 opened 7 months ago

salty-g80 commented 7 months ago

ive spent two days trying to fix this

Caused by: net.minecraftforge.fml.ModLoadingException: Tutorial Mod has class loading errors

Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getName()" because "this.modClass" is null

idk if im missing something

lain-e commented 7 months ago

ive spent two days trying to fix this

Caused by: net.minecraftforge.fml.ModLoadingException: Tutorial Mod has class loading errors

Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getName()" because "this.modClass" is null

idk if im missing something

Hi! I just took a look as well, it seems that the instantiation of the "public class" (aka line 13 of src/main/java/net/kaupenjoe/tutorialmod/item/ModCreativeModTabs.java) reads "mod" where it should be "mode". Essentially, java doesn't know how to deal with the new tab you created (for creative mode) as a class since it has a different name in the main structure. TLDR go to the "item" folder holding java in your Intellij build, scroll to line 13, slap an e to change mod->mode. Hope that helps!

salty-g80 commented 6 months ago

Hi! I just took a look as well, it seems that the instantiation of the "public class" (aka line 13 of src/main/java/net/kaupenjoe/tutorialmod/item/ModCreativeModTabs.java) reads "mod" where it should be "mode". Essentially, java doesn't know how to deal with the new tab you created (for creative mode) as a class since it has a different name in the main structure. TLDR go to the "item" folder holding java in your Intellij build, scroll to line 13, slap an e to change mod->mode. Hope that helps!

ive done what you said to do it fixed it but now theres a new problem

it says error: cannot find symbol import net.salty.tutorialmod.TutorialMod; ^ symbol: class TutorialMod location: package net.salty.tutorialmod

Unknown303YT commented 5 months ago

@salty-g80 Could you potentially upload your src/main/java folder as a zip?