Finish changing modid to 'ebwizardry'

- Fix up translations, resource IDs, paths etc.
- Where possible, the modid part in most strings now just reuses Wizardry.MODID
This commit is contained in:
Philipp Rustemeier
2018-03-15 14:41:00 +01:00
parent 612bbdb64d
commit b9d240799d
170 changed files with 3257 additions and 3258 deletions
@@ -1,7 +1,6 @@
package electroblob.wizardry.item;
import java.util.List;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.constants.Tier;
import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.client.resources.I18n;
@@ -15,6 +14,9 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable;
import java.util.List;
public class ItemArcaneTome extends Item {
public ItemArcaneTome(){
@@ -58,8 +60,10 @@ public class ItemArcaneTome extends Item {
Tier tier = Tier.values()[stack.getItemDamage()];
Tier tier2 = Tier.values()[stack.getItemDamage() - 1];
tooltip.add(tier.getDisplayNameWithFormatting());
tooltip.add("\u00A77" + I18n.format("item.wizardry:arcane_tome.desc1", tier2.getDisplayNameWithFormatting()));
tooltip.add("\u00A77" + I18n.format("item.wizardry:arcane_tome.desc2", tier.getDisplayNameWithFormatting() + "\u00A77"));
tooltip.add("\u00A77" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":arcane_tome.desc1",
tier2.getDisplayNameWithFormatting()));
tooltip.add("\u00A77" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":arcane_tome.desc2",
tier.getDisplayNameWithFormatting() + "\u00A77"));
}
}
@@ -2,6 +2,7 @@ package electroblob.wizardry.item;
import java.util.List;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
@@ -33,9 +34,10 @@ public class ItemArmourUpgrade extends Item {
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag advanced){
tooltip.add(I18n.format("item.wizardry:armour_upgrade.desc1", "\u00A77"));
tooltip.add(I18n.format("item.wizardry:armour_upgrade.desc2", "\u00A77", "\u00A7d"));
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
tooltip.add(net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":armour_upgrade.desc1", "\u00A77"));
tooltip.add(
net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":armour_upgrade.desc2", "\u00A77", "\u00A7d"));
}
}
@@ -1,8 +1,7 @@
package electroblob.wizardry.item;
import electroblob.wizardry.WizardData;
import electroblob.wizardry.advancement.AdvancementHelper;
import electroblob.wizardry.advancement.AdvancementHelper.EnumAdvancement;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.event.DiscoverSpellEvent;
import electroblob.wizardry.registry.WizardryAdvancementTriggers;
import electroblob.wizardry.registry.WizardryTabs;
@@ -41,9 +40,9 @@ public class ItemIdentificationScroll extends Item {
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag par4){
tooltip.add(I18n.format("item.wizardry:identification_scroll.desc1", "\u00A77"));
tooltip.add(I18n.format("item.wizardry:identification_scroll.desc2", "\u00A77"));
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
tooltip.add(net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":identification_scroll.desc1", "\u00A77"));
tooltip.add(net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":identification_scroll.desc2", "\u00A77"));
}
@Override
@@ -80,7 +79,7 @@ public class ItemIdentificationScroll extends Item {
}
// If it found nothing to identify, it says so!
if(!world.isRemote) player.sendMessage(
new TextComponentTranslation("item.wizardry:identification_scroll.nothing_to_identify"));
new TextComponentTranslation("item." + Wizardry.MODID + ":identification_scroll.nothing_to_identify"));
}
return new ActionResult<ItemStack>(EnumActionResult.FAIL, stack);
@@ -152,7 +152,7 @@ public class ItemWand extends Item {
EntityPlayerSP player = Minecraft.getMinecraft().player;
if (player == null) { return; }
// +0.5f is necessary due to the error in the way floats are calculated.
if(element != null) text.add("\u00A78" + I18n.format("item.wizardry:wand.buff",
if(element != null) text.add("\u00A78" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":wand.buff",
(int)((tier.level + 1) * Constants.DAMAGE_INCREASE_PER_TIER * 100 + 0.5f) + "%",
element.getDisplayName()));
@@ -164,11 +164,11 @@ public class ItemWand extends Item {
discovered = false;
}
text.add("\u00A77" + I18n.format("item.wizardry:wand.spell",
text.add("\u00A77" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":wand.spell",
discovered ? "\u00A77" + spell.getDisplayNameWithFormatting()
: "#\u00A79" + SpellGlyphData.getGlyphName(spell, player.world)));
text.add("\u00A79" + I18n.format("item.wizardry:wand.mana",
text.add("\u00A79" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":wand.mana",
(this.getMaxDamage(itemstack) - this.getDamage(itemstack)), this.getMaxDamage(itemstack)));
}
@@ -347,8 +347,8 @@ public class ItemWand extends Item {
if(player.isSneaking() && entity instanceof EntityPlayer && WizardData.get(player) != null){
// This is one of those "the method doing the work looks as if it's just returning a value" situations.
// ... I know, right?! I feel very programmer-y. But it's not too confusing here, and it looks neat.
String string = WizardData.get(player).toggleAlly((EntityPlayer)entity) ? "item.wizardry:wand.addally"
: "item.wizardry:wand.removeally";
String string = WizardData.get(player).toggleAlly((EntityPlayer)entity) ? "item." + Wizardry.MODID + ":wand.addally"
: "item." + Wizardry.MODID + ":wand.removeally";
if(!player.world.isRemote) player.sendMessage(new TextComponentTranslation(string, entity.getName()));
return true;
}
@@ -48,11 +48,11 @@ public class ItemWizardArmour extends ItemArmor implements ISpecialArmor {
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag advanced){
if(stack.hasTagCompound() && stack.getTagCompound().getBoolean("legendary")) tooltip
.add("\u00A7d" + I18n.format("item.wizardry:wizard_armour.legendary"));
.add("\u00A7d" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":wizard_armour.legendary"));
if(element != null)
tooltip.add("\u00A78" + I18n.format("item.wizardry:wizard_armour.buff",
tooltip.add("\u00A78" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":wizard_armour.buff",
(int)(Constants.COST_REDUCTION_PER_ARMOUR * 100) + "%", element.getDisplayName()));
tooltip.add("\u00A79" + I18n.format("item.wizardry:wizard_armour.mana",
tooltip.add("\u00A79" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":wizard_armour.mana",
(this.getMaxDamage(stack) - this.getDamage(stack)), this.getMaxDamage(stack)));
}
@@ -27,8 +27,9 @@ public class ItemWizardHandbook extends Item {
}
@Override
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag advanced){
tooltip.add("\u00A77" + I18n.format("item.wizardry:wizard_handbook.desc", AUTHOR));
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
tooltip.add(
"\u00A77" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":wizard_handbook.desc", AUTHOR));
}
@Override