From 5715928dbd741ed0d1f939ab7145daaf88147339 Mon Sep 17 00:00:00 2001 From: Electroblob <35599699+Electroblob77@users.noreply.github.com> Date: Thu, 22 Feb 2018 12:21:05 +0000 Subject: [PATCH] Actually fix spell chat readout localisations --- .../java/electroblob/wizardry/spell/Clairvoyance.java | 10 +++++----- .../java/electroblob/wizardry/spell/InvokeWeather.java | 4 ++-- .../electroblob/wizardry/spell/Transportation.java | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/electroblob/wizardry/spell/Clairvoyance.java b/src/main/java/electroblob/wizardry/spell/Clairvoyance.java index 1532e08e..8b6fa959 100644 --- a/src/main/java/electroblob/wizardry/spell/Clairvoyance.java +++ b/src/main/java/electroblob/wizardry/spell/Clairvoyance.java @@ -57,7 +57,7 @@ public class Clairvoyance extends Spell { if(caster.dimension == properties.getClairvoyanceDimension()){ if(properties.getClairvoyanceLocation() != null){ - if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".searching")); + if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".searching")); EntityZombie arbitraryZombie = new EntityZombie(world){ @Override @@ -96,13 +96,13 @@ public class Clairvoyance extends Spell { } } - if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".outofrange")); + if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".outofrange")); }else{ - if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".undefined")); + if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".undefined")); } }else{ - if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".wrongdimension")); + if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".wrongdimension")); } } @@ -157,7 +157,7 @@ public class Clairvoyance extends Spell { if(!event.getWorld().isRemote){ event.getEntityPlayer().sendMessage( - new TextComponentTranslation(Spells.clairvoyance.getUnlocalisedName() + ".confirm", Spells.clairvoyance.getNameForTranslationFormatted())); + new TextComponentTranslation("spell." + Spells.clairvoyance.getUnlocalisedName() + ".confirm", Spells.clairvoyance.getNameForTranslationFormatted())); } event.setCanceled(true); diff --git a/src/main/java/electroblob/wizardry/spell/InvokeWeather.java b/src/main/java/electroblob/wizardry/spell/InvokeWeather.java index 4b8cd86d..edf5f0d6 100644 --- a/src/main/java/electroblob/wizardry/spell/InvokeWeather.java +++ b/src/main/java/electroblob/wizardry/spell/InvokeWeather.java @@ -31,14 +31,14 @@ public class InvokeWeather extends Spell { // TODO: Backport these changes. int standardWeatherTime = (300 + (new Random()).nextInt(600)) * 20; if(world.isRaining()){ - caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".sun")); + caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".sun")); world.getWorldInfo().setCleanWeatherTime(standardWeatherTime); world.getWorldInfo().setRainTime(0); world.getWorldInfo().setThunderTime(0); world.getWorldInfo().setRaining(false); world.getWorldInfo().setThundering(false); }else{ - caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".rain")); + caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".rain")); world.getWorldInfo().setCleanWeatherTime(0); world.getWorldInfo().setRainTime(standardWeatherTime); world.getWorldInfo().setThunderTime(standardWeatherTime); diff --git a/src/main/java/electroblob/wizardry/spell/Transportation.java b/src/main/java/electroblob/wizardry/spell/Transportation.java index 439256e2..51b8cedd 100644 --- a/src/main/java/electroblob/wizardry/spell/Transportation.java +++ b/src/main/java/electroblob/wizardry/spell/Transportation.java @@ -46,15 +46,15 @@ public class Transportation extends Spell { return true; }else{ if(!world.isRemote) - caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".missing")); + caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".missing")); } }else{ if(!world.isRemote) - caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".undefined")); + caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".undefined")); } }else{ if(!world.isRemote) - caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".wrongdimension")); + caster.sendMessage(new TextComponentTranslation("spell." + this.getUnlocalisedName() + ".wrongdimension")); } } return false;