Fix broken localisations for spell chat readouts

This commit is contained in:
Electroblob
2018-02-21 10:51:31 +00:00
parent 15fb75a7c3
commit e0001b5d37
3 changed files with 10 additions and 10 deletions
@@ -57,7 +57,7 @@ public class Clairvoyance extends Spell {
if(caster.dimension == properties.getClairvoyanceDimension()){ if(caster.dimension == properties.getClairvoyanceDimension()){
if(properties.getClairvoyanceLocation() != null){ if(properties.getClairvoyanceLocation() != null){
if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell.clairvoyance.searching")); if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".searching"));
EntityZombie arbitraryZombie = new EntityZombie(world){ EntityZombie arbitraryZombie = new EntityZombie(world){
@Override @Override
@@ -96,13 +96,13 @@ public class Clairvoyance extends Spell {
} }
} }
if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell.clairvoyance.outofrange")); if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".outofrange"));
}else{ }else{
if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell.clairvoyance.undefined")); if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".undefined"));
} }
}else{ }else{
if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell.clairvoyance.wrongdimension")); if(!world.isRemote) caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".wrongdimension"));
} }
} }
@@ -157,7 +157,7 @@ public class Clairvoyance extends Spell {
if(!event.getWorld().isRemote){ if(!event.getWorld().isRemote){
event.getEntityPlayer().sendMessage( event.getEntityPlayer().sendMessage(
new TextComponentTranslation("spell.clairvoyance.confirm", Spells.clairvoyance.getNameForTranslationFormatted())); new TextComponentTranslation(Spells.clairvoyance.getUnlocalisedName() + ".confirm", Spells.clairvoyance.getNameForTranslationFormatted()));
} }
event.setCanceled(true); event.setCanceled(true);
@@ -31,14 +31,14 @@ public class InvokeWeather extends Spell {
// TODO: Backport these changes. // TODO: Backport these changes.
int standardWeatherTime = (300 + (new Random()).nextInt(600)) * 20; int standardWeatherTime = (300 + (new Random()).nextInt(600)) * 20;
if(world.isRaining()){ if(world.isRaining()){
caster.sendMessage(new TextComponentTranslation("spell.invoke_weather.sun")); caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".sun"));
world.getWorldInfo().setCleanWeatherTime(standardWeatherTime); world.getWorldInfo().setCleanWeatherTime(standardWeatherTime);
world.getWorldInfo().setRainTime(0); world.getWorldInfo().setRainTime(0);
world.getWorldInfo().setThunderTime(0); world.getWorldInfo().setThunderTime(0);
world.getWorldInfo().setRaining(false); world.getWorldInfo().setRaining(false);
world.getWorldInfo().setThundering(false); world.getWorldInfo().setThundering(false);
}else{ }else{
caster.sendMessage(new TextComponentTranslation("spell.invoke_weather.rain")); caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".rain"));
world.getWorldInfo().setCleanWeatherTime(0); world.getWorldInfo().setCleanWeatherTime(0);
world.getWorldInfo().setRainTime(standardWeatherTime); world.getWorldInfo().setRainTime(standardWeatherTime);
world.getWorldInfo().setThunderTime(standardWeatherTime); world.getWorldInfo().setThunderTime(standardWeatherTime);
@@ -46,15 +46,15 @@ public class Transportation extends Spell {
return true; return true;
}else{ }else{
if(!world.isRemote) if(!world.isRemote)
caster.sendMessage(new TextComponentTranslation("spell.transportation.missing")); caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".missing"));
} }
}else{ }else{
if(!world.isRemote) if(!world.isRemote)
caster.sendMessage(new TextComponentTranslation("spell.transportation.undefined")); caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".undefined"));
} }
}else{ }else{
if(!world.isRemote) if(!world.isRemote)
caster.sendMessage(new TextComponentTranslation("spell.transportation.wrongdimension")); caster.sendMessage(new TextComponentTranslation(this.getUnlocalisedName() + ".wrongdimension"));
} }
} }
return false; return false;