EDIT:Found the problem, I'm actually building and running Minecraft 1.8, which needs JSON files to render items apparently. So off to the 1.8 item tutorial to fix my code xD
EDIT2: So, I don't know what I messed up, but now the item doesn't even show in the creative inventory at all...Yes, I called the item renderer in the main class, as well as redoing the bits of code appropriate to the 1.8 basic item tutorial. No errors show and the game loads fine, but, no item....
He was referring to this method, the parameter "String name" isn't getting used anywhere so it can be removed. It is probably there because the tutorial intends to make use of it latter on though.
I haven't worked with 1.8 code but for what you have it looks like all you will be doing is making an ingot, you shouldn't need a renderer for that, you should only need a png with image you want it to look like. I would recommend going a bit farther through the tutorial before trying to run it, because it seems like there is some unfinished stuff.
Rollback Post to RevisionRollBack
"If It Is To Be It Is Up To Me" simple quote and I don't know where it comes from but I enjoy it.
Current Mod: Armerger | Light Drafter
He was referring to this method, the parameter "String name" isn't getting used anywhere so it can be removed. It is probably there because the tutorial intends to make use of it latter on though.
I haven't worked with 1.8 code but for what you have it looks like all you will be doing is making an ingot, you shouldn't need a renderer for that, you should only need a png with image you want it to look like. I would recommend going a bit farther through the tutorial before trying to run it, because it seems like there is some unfinished stuff.
Okay, thank you! I will continue in the tutorial, I got it to appear now it just still doesn't have a texture.
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
Is there much difference between adding a basic block in 1.7 and in 1.8? Because it Seems AdFocus is down meaning I can't access the 1.8 tutorial for basic block but I already have the 1.7 one...
I do not honestly know, but I don't believe that it would be very different, at least not for a basic block. At worst it should only be a deprecated method difference, meaning that in a later version you might have to change a method call if you want to keep the mod updated to new versions.
Rollback Post to RevisionRollBack
"If It Is To Be It Is Up To Me" simple quote and I don't know where it comes from but I enjoy it.
Current Mod: Armerger | Light Drafter
Hey, I know this is a dumb question to ask but I'm a little confused about the introduction/setup tutorial. To which folder do I need to download the Forge files using the gradlew setupDecompWorkspace eclipsecommand?
My folder path is like this: C:/Users/MY_NAME/Documents/Minecraft/Modding/MY_MOD_NAME/
Should I download the files to the /Modding/ folder or /MY_MOD_NAME/ folder?
Sorry for any english mistakes by the way! Not my first language
Hey, I know this is a dumb question to ask but I'm a little confused about the introduction/setup tutorial. To which folder do I need to download the Forge files using the gradlew setupDecompWorkspace eclipsecommand?
My folder path is like this: C:/Users/MY_NAME/Documents/Minecraft/Modding/MY_MOD_NAME/
Should I download the files to the /Modding/ folder or /MY_MOD_NAME/ folder?
Sorry for any english mistakes by the way! Not my first language
Once you've extracted the forge files into your MY_MOD_NAME folder, you run the command in that same folder.
I think I did in fact follow the tutorials, please don't be rude and assume things.
My registerItemRenderer method is the exact same as the one in the tutorial.
Done. That was obviously added by the program when I clicked to do a quick fix for an error.
What parameter? Maybe I'm stupid and don't understand what a parameter is yet, but seems to me like my code is the exact same as the tutorial.
I've actually been scouring the tutorials vigorously looking for my errors, thank you.
Um...no it's not. Don't say I'm rude just to defend yourself. I said "I don't think you even follow the tutorials", not "You don't even follow the tutorials" which would have been a blind assumption. The tutorial gives this:
public static void registerItemRenderer(Item item)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
while your RegisterHelper class gives this:
public static void registerItemRenderer(Item kryptoniteIngot) {
// TODO Auto-generated method stub
}
By "follow the tutorials" I meant pay attention to them. You obviously didn't, looking at your registerItemRenderer method. Looks like your scouring wasn't so efficient...
EDIT: Remember to put this in your RegisterHelper class (after the registerItemRenderer method) as well:
public static void registerBlockRenderer(Block block)
{
Item item = Item.getItemFromBlock(block);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
I also recommend you this, since your Java knowledge seems low.
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
I'm getting a crash saying "Can't free registry slot 198 occupied by [email protected]" after fiddling with code from another tutorial trying to get my block to have a texture in the inventory/hotbar. It has a texture in world just fine.
Code: [Note: Some code is from another tutorial at https://www.youtube.com/watch?v=LlJ6v3R3Gt0]
I'm getting a crash saying "Can't free registry slot 198 occupied by [email protected]" after fiddling with code from another tutorial trying to get my block to have a texture in the inventory/hotbar. It has a texture in world just fine.
Code: [Note: Some code is from another tutorial at https://www.youtube.com/watch?v=LlJ6v3R3Gt0]
Yes, the .json files I'm assuming you mean, they are in the right places, as well as the .png texture files.
Sorry for keeping you waiting. It might be because of your mod ID. Make sure the folder path is correct, such as src/main/resources/assets/yourmodid/textures etc. If the folder with your mod ID's name has uppercase letters, lowercase them. Make sure your MODID variable in Reference is also lowercase.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI don't think you even follow the tutorials...
The registerItemRenderer method is messed up. Read the tutorial for that again.
Delete the second constructor in your ItemMod class. It's not needed.
Delete the parameter in the first constructor of your ItemMod class. Again, it's not needed.
Please pay attention to the tutorials before asking questions.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI think I did in fact follow the tutorials, please don't be rude and assume things.
My registerItemRenderer method is the exact same as the one in the tutorial.
Done. That was obviously added by the program when I clicked to do a quick fix for an error.
What parameter? Maybe I'm stupid and don't understand what a parameter is yet, but seems to me like my code is the exact same as the tutorial.
I've actually been scouring the tutorials vigorously looking for my errors, thank you.
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumpublic ItemTheop(String name)
{
super();
this.setCreativeTab(CreativeTabs.tabMisc);
}
He was referring to this method, the parameter "String name" isn't getting used anywhere so it can be removed. It is probably there because the tutorial intends to make use of it latter on though.
I haven't worked with 1.8 code but for what you have it looks like all you will be doing is making an ingot, you shouldn't need a renderer for that, you should only need a png with image you want it to look like. I would recommend going a bit farther through the tutorial before trying to run it, because it seems like there is some unfinished stuff.
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOkay, thank you! I will continue in the tutorial, I got it to appear now it just still doesn't have a texture.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIs there much difference between adding a basic block in 1.7 and in 1.8? Because it Seems AdFocus is down meaning I can't access the 1.8 tutorial for basic block but I already have the 1.7 one...
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI do not honestly know, but I don't believe that it would be very different, at least not for a basic block. At worst it should only be a deprecated method difference, meaning that in a later version you might have to change a method call if you want to keep the mod updated to new versions.
Current Mod: Armerger | Light Drafter
Hey, I know this is a dumb question to ask but I'm a little confused about the introduction/setup tutorial. To which folder do I need to download the Forge files using the gradlew setupDecompWorkspace eclipse command?
My folder path is like this: C:/Users/MY_NAME/Documents/Minecraft/Modding/MY_MOD_NAME/
Should I download the files to the /Modding/ folder or /MY_MOD_NAME/ folder?
Sorry for any english mistakes by the way! Not my first language
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOnce you've extracted the forge files into your MY_MOD_NAME folder, you run the command in that same folder.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumUm...no it's not. Don't say I'm rude just to defend yourself. I said "I don't think you even follow the tutorials", not "You don't even follow the tutorials" which would have been a blind assumption. The tutorial gives this:
public static void registerItemRenderer(Item item)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
while your RegisterHelper class gives this:
public static void registerItemRenderer(Item kryptoniteIngot) {
// TODO Auto-generated method stub
}
By "follow the tutorials" I meant pay attention to them. You obviously didn't, looking at your registerItemRenderer method. Looks like your scouring wasn't so efficient...
EDIT: Remember to put this in your RegisterHelper class (after the registerItemRenderer method) as well:
public static void registerBlockRenderer(Block block)
{
Item item = Item.getItemFromBlock(block);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
I also recommend you this, since your Java knowledge seems low.
Phew, it has been a while, and I'm sorry for that, but tutorial six has been finished, covering the en_US.lang file.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIs there a different way of doing this in 1.8? Because my mod is for 1.8 and when I did what this tutorial said for 1.7 it doesn't work...
No, it is the same. Double check that your naming and such is correct, and the format is too.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI'm getting a crash saying "Can't free registry slot 198 occupied by [email protected]" after fiddling with code from another tutorial trying to get my block to have a texture in the inventory/hotbar. It has a texture in world just fine.
Code: [Note: Some code is from another tutorial at https://www.youtube.com/watch?v=LlJ6v3R3Gt0]
RegisterHelper Class:
http://pastebin.com/VjBQxkZh
ModBlocks Class:
http://pastebin.com/EubqZf6C
ModItems Class
http://pastebin.com/af4w2Ra3
Just let me know if you need other code.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYour BlockTheop class.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHere it is:
http://pastebin.com/Ph0Y6JCZ
Also the ItemTheop Class:
http://pastebin.com/WiTT16RH
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOdd... Are the models for those items there?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYes, the .json files I'm assuming you mean, they are in the right places, as well as the .png texture files.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumRight click on the source folder(src/main/java something like that) expand the Run As and click configure.
In the tab section that goes across the top, make sure you are in the source tab, should be default tab.
There will be two text boxes near the top.
In the first one, browse to you source folder(src/main/java something like that) and set that.
In the second one, look for "gradlew start".
Do the same thing for Debug as.
If that doesn't work then there is likely a bug somewhere in the code from switching to 1.8.
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumGlad it worked, and yea I thought I might have it a little off, I was working from memory since I don't have eclipse where I am right now.
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSorry for keeping you waiting. It might be because of your mod ID. Make sure the folder path is correct, such as src/main/resources/assets/yourmodid/textures etc. If the folder with your mod ID's name has uppercase letters, lowercase them. Make sure your MODID variable in Reference is also lowercase.