ContentTweaker

ContentTweaker

27M Downloads

Localization Issue

septemberWaves opened this issue ยท 4 comments

commented

The localization file does not appear to work properly for custom items.

The script functions perfectly to create custom items in-game, and there is no issue with texture files either. Here is part of the script (the rest is just replicated with different variables and unlocalized names):
#loader contenttweaker
import mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.Item;

var motor1 = VanillaFactory.createItem("basicmotor");
motor1.maxStackSize = 16;
motor1.register();

This script works to load the new item in-game. However, the localization appears to be broken. I followed the instructions on the ContentTweaker section of the CraftTweaker documentation to produce this line in the localization file:

item.contenttweaker.basicmotor=Basic Fluxfield Motor

In-game, however, the item is named "Basic Fluxfield Motor.name" and I can find no way of removing the ".name" from the in-game localization. The same thing happens for all other custom items I have attempted to register.

commented

It is possible to localize items with crafttweaker.

commented

You need to add .name at the end of that unlocalized string @eloquentJane
item.contenttweaker.basicmotor.name=Basic Fluxfield Motor

commented

Here's an example from my own pack file:

item.contenttweaker.fluxdust.name=Flux Dust
item.contenttweaker.fluxblend.name=Flux Blend
item.contenttweaker.bitumen.name=Bitumen
commented

Yep like Lanse said you need to add .name to your localization tags in the file.