Jump to content

Recommended Posts

Posted (edited)

Description of the issue:

Textures, registration and item localisation all work correctly, but I am currently stuck on getting tiles to localise.

Here's a visual example of the issue...

  Reveal hidden contents

As you can see from the pictures, my copper ingot works perfectly, but the tile (Copper ore) doesn't.

 

Here is the code stuff:

  Reveal hidden contents

Here is the directory in the IntelliJ IDE

  Reveal hidden contents

And finally the main attraction...

en_us.lang

# Blocks
tile:copper_ore.name=Copper Ore
item:copper_ore.name=Copper Ore
block:copper_ore.name=Copper Ore
# Items
item.copper_ingot.name=Copper Ingot

 

I was testing with numerous ways of trying to get the localisation file to recognise the block but to no avail.

Note: I do not use the mod id of the mod in my localisation files because I pass in the registry path string, I would doubt blocks and items have different unlocalised names based on the same parameters inputted... But feel free to explain if they do.

 

[17:43:57] [main/INFO] [tau/tau]: Copper Ore unlocalised name: tile.copper_ore
[17:43:57] [main/INFO] [tau/tau]: Copper Ore registry name: tau:copper_ore
[17:43:57] [main/INFO] [tau/tau]: Copper Ore Item unlocalised name: tile.copper_ore
[17:43:57] [main/INFO] [tau/tau]: Copper Ore Item registry name: tau:copper_ore
[17:43:57] [main/INFO] [tau/tau]: Copper Ingot unlocalised name: item.copper_ingot
[17:43:57] [main/INFO] [tau/tau]: Copper Ingot registry name: tau:copper_ingot

Finally the registry names and unlocalised names of the blocks/items in question, outputted using the logger during post initialisation, for my own verification that I haven't missed anything when registering the objects.

 

On the same context as the post itself, is the technique I am using to register blocks better or the same as doing:

public CopperOre() {
    super(Material.ROCK);
    setRegistryName(new ResourceLocation(Ref.MOD_ID, Ref.COPPER_ORE));
    setUnlocalizedName(getRegistryName().toString());
}

Or does it not exactly matter for Forge conventions?

 

fml-client-latest.logFetching info...

Edited by Nayrisian
Issue solved

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.