Jump to content

Recommended Posts

Posted

Recently got into modding and I've been following a few tutorials to help me get an idea of how it all works together. The tutorial I'm following is for 1.9, but I figured I'd use a 1.10 base so that I'd be using the latest version when I eventually make my mod.

 

I followed the tutorial to the letter and most of it works, but I have a problem naming my item. Has there been a change to the way items are named in 1.10?

 

Here's the relevant code.

 

reference.java

package azated.geothermal;

public class Reference {

public static final String MOD_ID = "azatedGeothermalMod";
public static final String NAME = "Azated Geothermal Mod";
public static final String VERSION = "1.0";
public static final String ACCEPTED_VERSIONS = "[1.10]";

public static final String CLIENT_PROXY_CLASS = "azated.geothermal.proxy.ClientProxy";
public static final String SERVER_PROXY_CLASS = "azated.geothermal.proxy.ServerProxy";

public static enum TutorialItems  {
	CHEESE("cheese", "ItemCheese");

	private String unlocalizedName;
	private String registryName;

	TutorialItems(String unlocalizedName, String registryName) {
		this.unlocalizedName = unlocalizedName;
		this.registryName = registryName;
	}

	public String getRegistryName() {
		return registryName;
	}

	public String getUnlocalizedName() {
		return unlocalizedName;
	}
}
}

 

ItemCheese.java

package azated.geothermal.items;

import azated.geothermal.Reference;
import net.minecraft.item.Item;

public class ItemCheese extends Item {

public ItemCheese() {
	setUnlocalizedName(Reference.TutorialItems.CHEESE.getUnlocalizedName());
	setRegistryName(Reference.TutorialItems.CHEESE.getRegistryName());
}
}

 

en_US.lang

item.cheese.name=Cheese

Posted

What does the item name look like in game?

 

if it is item.cheese.name then the problem is something else but if u aren't using the prefix in ur lang file its not gonna work.

 

I followed the same tutorial as you btw =p

Posted

Yup, it's item.cheese.name, no matter what I change. I'm guessing it just can't find the 'cheese' code to reference back to, but my knowledge of java's not good enough to figure out any more than that.

 

I followed the same tutorial as you btw =p

 

Yeah Mrcrayfish is brilliant with his tutorials. Always clear and easy to understand.

Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

 

From what I can tell, I've done exactly the same thing as you, just with cheese instead of test, and yet It still doesn't work.

 

registryName needs a modid like so

modID + ":" + name

 

Could you give me an example? I'm not sure where to include that in the code.

Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Are those meant to be examples for me? I thought you were referring to kutsushadow, the code in your links are not my uploads.

 

lang file entry in my code for cheese

item.cheese.name=Cheese

 

The path to my assets directory

E:\MC modding\Geothermal Energy\src\main\resources\assets

Posted

Are those meant to be examples for me? I thought you were referring to kutsushadow, the code in your links are not my uploads.

 

Sorry, thought they were.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Are those meant to be examples for me? I thought you were referring to kutsushadow, the code in your links are not my uploads.

 

lang file entry in my code for cheese

item.cheese.name=Cheese

 

The path to my assets directory

E:\MC modding\Geothermal Energy\src\main\resources\assets

Are the assets located at

E:\MC modding\Geothermal Energy\src\main\resources\assets\azatedGeothermalMod

?

 

Posted

They are. I've checked with all of my other files and they all seem to be in the right spot. I'm apparently having issues with my emails so I can't upload the project, but as soon as it's all fixed I'll see what I can do.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.