Remove usage of deprecated server-side I18n
This commit is contained in:
@@ -11,7 +11,6 @@ import net.minecraft.entity.EntityList;
|
|||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
|
||||||
import net.minecraftforge.common.config.ConfigCategory;
|
import net.minecraftforge.common.config.ConfigCategory;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
import net.minecraftforge.common.config.Property;
|
import net.minecraftforge.common.config.Property;
|
||||||
@@ -53,7 +52,6 @@ import java.util.regex.Pattern;
|
|||||||
*/
|
*/
|
||||||
// For the time being, I'm sticking with the old config system because @Config doesn't support custom config entry classes
|
// For the time being, I'm sticking with the old config system because @Config doesn't support custom config entry classes
|
||||||
// @Config(modid = Wizardry.MODID)
|
// @Config(modid = Wizardry.MODID)
|
||||||
@SuppressWarnings("deprecation") // Used server I18n deliberately; we want to write the comments in the actual config file in english.
|
|
||||||
public final class Settings {
|
public final class Settings {
|
||||||
|
|
||||||
// Category names
|
// Category names
|
||||||
@@ -447,7 +445,7 @@ public final class Settings {
|
|||||||
|
|
||||||
for(Spell spell : Spell.getAllSpells()){
|
for(Spell spell : Spell.getAllSpells()){
|
||||||
property = config.get(SPELLS_CATEGORY, spell.getRegistryName().toString(), true,
|
property = config.get(SPELLS_CATEGORY, spell.getRegistryName().toString(), true,
|
||||||
I18n.translateToLocal("spell." + spell.getUnlocalisedName() + ".desc"));
|
"Set to false to disable this spell");
|
||||||
// Uses the same config key as the spell name, because - well, that's what it's called!
|
// Uses the same config key as the spell name, because - well, that's what it's called!
|
||||||
property.setLanguageKey("spell." + spell.getUnlocalisedName());
|
property.setLanguageKey("spell." + spell.getUnlocalisedName());
|
||||||
Wizardry.proxy.setToNamedBooleanEntry(property);
|
Wizardry.proxy.setToNamedBooleanEntry(property);
|
||||||
|
|||||||
@@ -621,8 +621,8 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unlocalised name of the spell, without any prefixes or suffixes, e.g. "flame_ray". <b>This should
|
* Returns the unlocalised name of the spell, which is now its registry name as a string, e.g. "ebwizardry:flame_ray".
|
||||||
* only be used for translation purposes.</b>
|
* <b>This should only be used for translation purposes.</b>
|
||||||
*/
|
*/
|
||||||
public final String getUnlocalisedName(){
|
public final String getUnlocalisedName(){
|
||||||
return unlocalisedName;
|
return unlocalisedName;
|
||||||
|
|||||||
Reference in New Issue
Block a user