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:
@@ -150,7 +150,7 @@ public class CommonProxy {
|
||||
Spell spell = Spell.get(scroll.getItemDamage());
|
||||
if(spell.isContinuous) spell = Spells.none;
|
||||
|
||||
return I18n.translateToLocalFormatted("item.wizardry:wizardry:scroll.name",
|
||||
return I18n.translateToLocalFormatted("item." + Wizardry.MODID + ":scroll.name",
|
||||
I18n.translateToLocal("spell." + spell.getUnlocalisedName())).trim();
|
||||
}
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ public final class Settings {
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "towerRarity", 8,
|
||||
"Rarity of wizard towers. Higher numbers are rarer. Set to 0 to disable wizard towers completely.", 0,
|
||||
50);
|
||||
property.setLanguageKey("config.wizardry.tower_rarity");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".tower_rarity");
|
||||
property.setRequiresWorldRestart(true);
|
||||
Wizardry.proxy.setToNumberSliderEntry(property);
|
||||
towerRarity = property.getInt();
|
||||
@@ -307,108 +307,108 @@ public final class Settings {
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "spellBookDropChance", 3,
|
||||
"The chance for mobs to drop a spell book when killed. The greater this number, the more often they will drop. Set to 0 to disable spell book drops. Set to 200 for guaranteed drops.",
|
||||
0, 200);
|
||||
property.setLanguageKey("config.wizardry.spell_book_drop_chance");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".spell_book_drop_chance");
|
||||
Wizardry.proxy.setToNumberSliderEntry(property);
|
||||
spellBookDropChance = property.getInt();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "oreDimensions", new int[]{0},
|
||||
"List of dimension ids in which crystal ore will generate. Note that removing the overworld (id 0) from this list will make the mod VERY difficult to play!");
|
||||
property.setLanguageKey("config.wizardry.ore_dimensions");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".ore_dimensions");
|
||||
property.setRequiresWorldRestart(true);
|
||||
oreDimensions = property.getIntList();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "flowerDimensions", new int[]{0},
|
||||
"List of dimension ids in which crystal flowers will generate.");
|
||||
property.setLanguageKey("config.wizardry.flower_dimensions");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".flower_dimensions");
|
||||
property.setRequiresWorldRestart(true);
|
||||
flowerDimensions = property.getIntList();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "towerDimensions", new int[]{0},
|
||||
"List of dimension ids in which wizard towers will generate.");
|
||||
property.setLanguageKey("config.wizardry.tower_dimensions");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".tower_dimensions");
|
||||
property.setRequiresWorldRestart(true);
|
||||
towerDimensions = property.getIntList();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "generateLoot", true,
|
||||
"Whether to generate wizardry loot in dungeon chests.");
|
||||
property.setLanguageKey("config.wizardry.generate_loot");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".generate_loot");
|
||||
property.setRequiresWorldRestart(true);
|
||||
generateLoot = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "firebombIsCraftable", true,
|
||||
"Whether firebombs can be crafted or not.");
|
||||
property.setLanguageKey("config.wizardry.firebomb_is_craftable");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".firebomb_is_craftable");
|
||||
property.setRequiresMcRestart(true);
|
||||
firebombIsCraftable = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "poisonBombIsCraftable", true,
|
||||
"Whether poison bombs can be crafted or not.");
|
||||
property.setLanguageKey("config.wizardry.poison_bomb_is_craftable");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".poison_bomb_is_craftable");
|
||||
property.setRequiresMcRestart(true);
|
||||
poisonBombIsCraftable = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "smokeBombIsCraftable", true,
|
||||
"Whether smoke bombs can be crafted or not.");
|
||||
property.setLanguageKey("config.wizardry.smoke_bomb_is_craftable");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".smoke_bomb_is_craftable");
|
||||
property.setRequiresMcRestart(true);
|
||||
smokeBombIsCraftable = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "useAlternateScrollRecipe", false,
|
||||
"Whether to require a magic crystal in the shapeless crafting recipe for blank scrolls. Set to true if another mod adds a conflicting recipe.");
|
||||
property.setLanguageKey("config.wizardry.use_alternate_scroll_recipe");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".use_alternate_scroll_recipe");
|
||||
property.setRequiresMcRestart(true);
|
||||
useAlternateScrollRecipe = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "teleportThroughUnbreakableBlocks", false,
|
||||
"Whether players are allowed to teleport through unbreakable blocks (e.g. bedrock) using the phase step spell.");
|
||||
property.setLanguageKey("config.wizardry.teleport_through_unbreakable_blocks");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".teleport_through_unbreakable_blocks");
|
||||
teleportThroughUnbreakableBlocks = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "showSummonedCreatureNames", true,
|
||||
"Whether to show summoned creatures' names and owners above their heads.");
|
||||
property.setLanguageKey("config.wizardry.show_summoned_creature_names");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".show_summoned_creature_names");
|
||||
showSummonedCreatureNames = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "friendlyFire", true,
|
||||
"Whether to allow players to damage their designated allies using magic.");
|
||||
property.setLanguageKey("config.wizardry.friendly_fire");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".friendly_fire");
|
||||
friendlyFire = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "telekineticDisarmament", true,
|
||||
"Whether to allow players to disarm other players using the telekinesis spell. Set to false to prevent stealing of items.");
|
||||
property.setLanguageKey("config.wizardry.telekinetic_disarmament");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".telekinetic_disarmament");
|
||||
telekineticDisarmament = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "discoveryMode", true,
|
||||
"For those who like a sense of mystery! When set to true, spells you haven't cast yet will be unreadable until you cast them (on a per-world basis). Has no effect when in creative mode. Spells of identification will be unobtainable in survival mode if this is false.");
|
||||
property.setLanguageKey("config.wizardry.discovery_mode");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".discovery_mode");
|
||||
property.setRequiresWorldRestart(true);
|
||||
discoveryMode = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "enableShiftScrolling", true,
|
||||
"Whether you can switch between spells on a wand by scrolling with the mouse wheel while sneaking. Note that this will only affect you; other players connected to the same server obey their own settings.");
|
||||
property.setLanguageKey("config.wizardry.enable_shift_scrolling");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".enable_shift_scrolling");
|
||||
property.setRequiresWorldRestart(false);
|
||||
enableShiftScrolling = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "minionRevengeTargeting", true,
|
||||
"Whether summoned creatures can revenge attack their owner if their owner attacks them.");
|
||||
property.setLanguageKey("config.wizardry.minion_revenge_targeting");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".minion_revenge_targeting");
|
||||
property.setRequiresWorldRestart(false);
|
||||
minionRevengeTargeting = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
@@ -419,13 +419,13 @@ public final class Settings {
|
||||
// it doesn't give fine enough control for values less than 1.
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "playerDamageScaling", 1.0,
|
||||
"Global damage scaling factor for the damage dealt by players casting spells, relative to 1.", 0, 20);
|
||||
property.setLanguageKey("config.wizardry.player_damage_scaling");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".player_damage_scaling");
|
||||
playerDamageScale = property.getDouble();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "npcDamageScaling", 1.0,
|
||||
"Global damage scaling factor for the damage dealt by NPCs casting spells, relative to 1.", 0, 20);
|
||||
property.setLanguageKey("config.wizardry.npc_damage_scaling");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".npc_damage_scaling");
|
||||
npcDamageScale = property.getDouble();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
@@ -434,13 +434,13 @@ public final class Settings {
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "castCommandMultiplierLimit", 20.0,
|
||||
"Upper limit for the multipliers passed into the /cast command. This is here to stop players from accidentally breaking a world/server. Large blast mutipliers can cause extreme lag - you have been warned!",
|
||||
1, 255);
|
||||
property.setLanguageKey("config.wizardry.cast_command_multiplier_limit");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".cast_command_multiplier_limit");
|
||||
maxSpellCommandMultiplier = property.getDouble();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "summonedCreatureTargetsWhitelist", new String[0],
|
||||
"List of names of entities which summoned creatures and wizards are allowed to attack, in addition to the defaults. Add mod creatures to this list if you want summoned creatures to attack them and they aren't already doing so. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. wizardry:Wizard).");
|
||||
property.setLanguageKey("config.wizardry.summoned_creature_targets_whitelist");
|
||||
"List of names of entities which summoned creatures and wizards are allowed to attack, in addition to the defaults. Add mod creatures to this list if you want summoned creatures to attack them and they aren't already doing so. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":Wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".summoned_creature_targets_whitelist");
|
||||
property.setRequiresWorldRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
summonedCreatureTargetsWhitelist = property.getStringList();
|
||||
@@ -452,8 +452,8 @@ public final class Settings {
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "summonedCreatureTargetsBlacklist",
|
||||
new String[]{"creeper"},
|
||||
"List of names of entities which summoned creatures and wizards are specifically not allowed to attack, overriding the defaults and the whitelist. Add creatures to this list if allowing them to be attacked causes problems or is too destructive (removing creepers from this list is done at your own risk!). Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. wizardry:Wizard).");
|
||||
property.setLanguageKey("config.wizardry.summoned_creature_targets_blacklist");
|
||||
"List of names of entities which summoned creatures and wizards are specifically not allowed to attack, overriding the defaults and the whitelist. Add creatures to this list if allowing them to be attacked causes problems or is too destructive (removing creepers from this list is done at your own risk!). Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":Wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".summoned_creature_targets_blacklist");
|
||||
property.setRequiresWorldRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
summonedCreatureTargetsBlacklist = property.getStringList();
|
||||
@@ -465,34 +465,34 @@ public final class Settings {
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "spellHUDPosition", GuiPosition.BOTTOM_LEFT.name,
|
||||
"The position of the spell HUD.", GuiPosition.names);
|
||||
property.setLanguageKey("config.wizardry.spell_hud_position");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".spell_hud_position");
|
||||
spellHUDPosition = GuiPosition.fromName(property.getString());
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "castCommandName", "cast",
|
||||
"The name of the /cast command. This is what you type directly after the /; for example if this was set to 'magic' then instead of typing /cast you would type /magic instead.");
|
||||
property.setLanguageKey("config.wizardry.cast_command_name");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".cast_command_name");
|
||||
property.setRequiresWorldRestart(true);
|
||||
castCommandName = property.getString();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "discoverspellCommandName", "discoverspell",
|
||||
"The name of the /discoverspell command. This is what you type directly after the /; for example if this was set to 'magic' then instead of typing /discoverspell you would type /magic instead.");
|
||||
property.setLanguageKey("config.wizardry.discoverspell_command_name");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".discoverspell_command_name");
|
||||
property.setRequiresWorldRestart(true);
|
||||
discoverspellCommandName = property.getString();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "allyCommandName", "ally",
|
||||
"The name of the /ally command. This is what you type directly after the /; for example if this was set to 'magic' then instead of typing /ally you would type /magic instead.");
|
||||
property.setLanguageKey("config.wizardry.ally_command_name");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".ally_command_name");
|
||||
property.setRequiresWorldRestart(true);
|
||||
allyCommandName = property.getString();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "alliesCommandName", "allies",
|
||||
"The name of the /allies command. This is what you type directly after the /; for example if this was set to 'magic' then instead of typing /allies you would type /magic instead.");
|
||||
property.setLanguageKey("config.wizardry.allies_command_name");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".allies_command_name");
|
||||
property.setRequiresWorldRestart(true);
|
||||
alliesCommandName = property.getString();
|
||||
propOrder.add(property.getName());
|
||||
@@ -507,8 +507,8 @@ public final class Settings {
|
||||
"Settings which allow entities to be made immune to certain types of magic. In multiplayer, the server/LAN host settings will apply.");
|
||||
|
||||
property = config.get(RESISTANCES_CATEGORY, "mobsImmuneToFire", new String[]{},
|
||||
"List of names of entities that are immune to fire, in addition to the defaults. Add mod creatures to this list if you want them to be immune to fire magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. wizardry:Wizard).");
|
||||
property.setLanguageKey("config.wizardry.mobs_immune_to_fire");
|
||||
"List of names of entities that are immune to fire, in addition to the defaults. Add mod creatures to this list if you want them to be immune to fire magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":Wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".mobs_immune_to_fire");
|
||||
property.setRequiresMcRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
// Converts all strings in the list to lower case, to ignore case sensitivity, and trims them.
|
||||
@@ -520,8 +520,8 @@ public final class Settings {
|
||||
propOrder1.add(property.getName());
|
||||
|
||||
property = config.get(RESISTANCES_CATEGORY, "mobsImmuneToIce", new String[]{},
|
||||
"List of names of entities that are immune to ice, in addition to the defaults. Add mod creatures to this list if you want them to be immune to ice magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. wizardry:Wizard).");
|
||||
property.setLanguageKey("config.wizardry.mobs_immune_to_ice");
|
||||
"List of names of entities that are immune to ice, in addition to the defaults. Add mod creatures to this list if you want them to be immune to ice magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":Wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".mobs_immune_to_ice");
|
||||
property.setRequiresMcRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
// Converts all strings in the list to lower case, to ignore case sensitivity, and trims them.
|
||||
@@ -533,8 +533,8 @@ public final class Settings {
|
||||
propOrder1.add(property.getName());
|
||||
|
||||
property = config.get(RESISTANCES_CATEGORY, "mobsImmuneToLightning", new String[]{},
|
||||
"List of names of entities that are immune to lightning, in addition to the defaults. Add mod creatures to this list if you want them to be immune to lightning magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. wizardry:Wizard).");
|
||||
property.setLanguageKey("config.wizardry.mobs_immune_to_lightning");
|
||||
"List of names of entities that are immune to lightning, in addition to the defaults. Add mod creatures to this list if you want them to be immune to lightning magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":Wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".mobs_immune_to_lightning");
|
||||
property.setRequiresMcRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
// Converts all strings in the list to lower case, to ignore case sensitivity, and trims them.
|
||||
@@ -546,8 +546,8 @@ public final class Settings {
|
||||
propOrder1.add(property.getName());
|
||||
|
||||
property = config.get(RESISTANCES_CATEGORY, "mobsImmuneToWither", new String[]{},
|
||||
"List of names of entities that are immune to wither effects, in addition to the defaults. Add mod creatures to this list if you want them to be immune to withering magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. wizardry:Wizard).");
|
||||
property.setLanguageKey("config.wizardry.mobs_immune_to_wither");
|
||||
"List of names of entities that are immune to wither effects, in addition to the defaults. Add mod creatures to this list if you want them to be immune to withering magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":Wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".mobs_immune_to_wither");
|
||||
property.setRequiresMcRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
// Converts all strings in the list to lower case, to ignore case sensitivity, and trims them.
|
||||
@@ -559,8 +559,8 @@ public final class Settings {
|
||||
propOrder1.add(property.getName());
|
||||
|
||||
property = config.get(RESISTANCES_CATEGORY, "mobsImmuneToPoison", new String[]{},
|
||||
"List of names of entities that are immune to poison, in addition to the defaults. Add mod creatures to this list if you want them to be immune to poison magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. wizardry:Wizard).");
|
||||
property.setLanguageKey("config.wizardry.mobs_immune_to_poison");
|
||||
"List of names of entities that are immune to poison, in addition to the defaults. Add mod creatures to this list if you want them to be immune to poison magic and they aren't already. Entity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":Wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".mobs_immune_to_poison");
|
||||
property.setRequiresMcRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
// Converts all strings in the list to lower case, to ignore case sensitivity, and trims them.
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(modid = Wizardry.MODID, name = Wizardry.NAME, version = Wizardry.VERSION, guiFactory = "electroblob." + Wizardry.MODID + ".WizardryGuiFactory")
|
||||
@Mod(modid = Wizardry.MODID, name = Wizardry.NAME, version = Wizardry.VERSION, guiFactory = "electroblob.wizardry.WizardryGuiFactory")
|
||||
public class Wizardry {
|
||||
|
||||
/** Wizardry's mod ID. */
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package electroblob.wizardry.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import electroblob.wizardry.WizardData;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.item.ItemWand;
|
||||
import electroblob.wizardry.registry.Spells;
|
||||
import electroblob.wizardry.registry.WizardryBlocks;
|
||||
@@ -19,6 +18,8 @@ import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockTransportationStone extends Block {
|
||||
|
||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625f * 5, 0, 0.0625f * 5, 0.0625f * 11, 0.0625f * 6,
|
||||
@@ -107,7 +108,7 @@ public class BlockTransportationStone extends Block {
|
||||
if(testForCircle(world, pos1)){
|
||||
data.setStoneCircleLocation(pos1, world.provider.getDimension());
|
||||
if(!world.isRemote) player.sendMessage(
|
||||
new TextComponentTranslation("tile.wizardry:transportation_stone.confirm",
|
||||
new TextComponentTranslation("tile." + Wizardry.MODID + ":transportation_stone.confirm",
|
||||
Spells.transportation.getNameForTranslationFormatted()));
|
||||
return true;
|
||||
}
|
||||
@@ -115,7 +116,7 @@ public class BlockTransportationStone extends Block {
|
||||
}
|
||||
|
||||
if(!world.isRemote)
|
||||
player.sendMessage(new TextComponentTranslation("tile.wizardry:transportation_stone.invalid"));
|
||||
player.sendMessage(new TextComponentTranslation("tile." + Wizardry.MODID + ":transportation_stone.invalid"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,8 +155,8 @@ public class ClientProxy extends CommonProxy {
|
||||
public static MixedFontRenderer mixedFontRenderer;
|
||||
|
||||
// Key Bindings
|
||||
public static final KeyBinding NEXT_SPELL = new KeyBinding("key.wizardry.next_spell", Keyboard.KEY_N, "key.categories.wizardry");
|
||||
public static final KeyBinding PREVIOUS_SPELL = new KeyBinding("key.wizardry.previous_spell", Keyboard.KEY_B, "key.categories.wizardry");
|
||||
public static final KeyBinding NEXT_SPELL = new KeyBinding("key." + Wizardry.MODID + ".next_spell", Keyboard.KEY_N, "key.categories." + Wizardry.MODID);
|
||||
public static final KeyBinding PREVIOUS_SPELL = new KeyBinding("key." + Wizardry.MODID + ".previous_spell", Keyboard.KEY_B, "key.categories." + Wizardry.MODID);
|
||||
|
||||
// Armour Model
|
||||
public static final ModelBiped WIZARD_ARMOUR_MODEL = new ModelWizardArmour(0.75f);
|
||||
@@ -246,9 +246,9 @@ public class ClientProxy extends CommonProxy {
|
||||
}
|
||||
|
||||
if(discovered){
|
||||
return I18n.format("item.wizardry:scroll.name", spell.getDisplayName()).trim();
|
||||
return I18n.format("item." + Wizardry.MODID + ":scroll.name", spell.getDisplayName()).trim();
|
||||
}else{
|
||||
return I18n.format("item.wizardry:scroll.undiscovered.name", "#" + SpellGlyphData.getGlyphName(spell, player.world) + "#").trim();
|
||||
return I18n.format("item." + Wizardry.MODID + ":scroll.undiscovered.name", "#" + SpellGlyphData.getGlyphName(spell, player.world) + "#").trim();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package electroblob.wizardry.client;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import electroblob.wizardry.SpellGlyphData;
|
||||
import electroblob.wizardry.WizardData;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
@@ -26,6 +24,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class GuiArcaneWorkbench extends GuiContainer {
|
||||
|
||||
@@ -163,7 +162,7 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
|
||||
this.fontRenderer.drawStringWithShadow("\u00A7f" + wand.getDisplayName(), xSize + 6, 6, 0);
|
||||
this.fontRenderer.drawStringWithShadow(
|
||||
"\u00A77" + I18n.format("container.wizardry:arcane_workbench.mana") + " "
|
||||
"\u00A77" + I18n.format("container." + Wizardry.MODID + ":arcane_workbench.mana") + " "
|
||||
+ (wand.getMaxDamage() - wand.getItemDamage()) + "/" + wand.getMaxDamage(),
|
||||
xSize + 6, 20, 0);
|
||||
|
||||
@@ -191,7 +190,7 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
if(WandHelper.getTotalUpgrades(wand) > 0){
|
||||
|
||||
this.fontRenderer.drawStringWithShadow(
|
||||
"\u00A7f" + I18n.format("container.wizardry:arcane_workbench.upgrades"), xSize + 6, y + 6, 0);
|
||||
"\u00A7f" + I18n.format("container." + Wizardry.MODID + ":arcane_workbench.upgrades"), xSize + 6, y + 6, 0);
|
||||
|
||||
int x = 0;
|
||||
y = 50 + spells.length * 10;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package electroblob.wizardry.client;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.util.WizardryUtilities;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
@@ -12,7 +13,7 @@ class GuiButtonApply extends GuiButton {
|
||||
|
||||
public GuiButtonApply(int id, int x, int y){
|
||||
|
||||
super(id, x, y, 32, 16, I18n.format("container.wizardry:arcane_workbench.apply"));
|
||||
super(id, x, y, 32, 16, I18n.format("container." + Wizardry.MODID + ":arcane_workbench.apply"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,13 +19,13 @@ public class GuiConfigWizardry extends GuiConfig {
|
||||
|
||||
public GuiConfigWizardry(GuiScreen parent){
|
||||
super(parent, getConfigEntries(), Wizardry.MODID, false, false,
|
||||
Wizardry.NAME + " - " + I18n.format("config.wizardry.title.general"));
|
||||
Wizardry.NAME + " - " + I18n.format("config." + Wizardry.MODID + ".title.general"));
|
||||
// this.titleLine2 = "File location: " + Wizardry.config.getConfigFile().getAbsolutePath();
|
||||
}
|
||||
|
||||
private static List<IConfigElement> getConfigEntries(){
|
||||
List<IConfigElement> configList = new ArrayList<IConfigElement>(1);
|
||||
configList.add(new DummyCategoryElement("spellsConfig", "config.wizardry.category." + Settings.SPELLS_CATEGORY,
|
||||
configList.add(new DummyCategoryElement("spellsConfig", "config." + Wizardry.MODID + ".category." + Settings.SPELLS_CATEGORY,
|
||||
SpellsCategory.class));
|
||||
configList.add(new DummyCategoryElement("resistancesConfig",
|
||||
"config.wizardry.category." + Settings.RESISTANCES_CATEGORY, ResistancesCategory.class));
|
||||
@@ -48,9 +48,9 @@ public class GuiConfigWizardry extends GuiConfig {
|
||||
(new ConfigElement(Wizardry.settings.getConfigCategory(Settings.SPELLS_CATEGORY)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Settings.SPELLS_CATEGORY, false, false,
|
||||
Wizardry.NAME + " - " + I18n.format("config.wizardry.title." + Settings.SPELLS_CATEGORY));
|
||||
Wizardry.NAME + " - " + I18n.format("config." + Wizardry.MODID + ".title." + Settings.SPELLS_CATEGORY));
|
||||
|
||||
spellsMenu.titleLine2 = I18n.format("config.wizardry.subtitle." + Settings.SPELLS_CATEGORY);
|
||||
spellsMenu.titleLine2 = I18n.format("config." + Wizardry.MODID + ".subtitle." + Settings.SPELLS_CATEGORY);
|
||||
|
||||
return spellsMenu;
|
||||
}
|
||||
@@ -70,9 +70,9 @@ public class GuiConfigWizardry extends GuiConfig {
|
||||
(new ConfigElement(Wizardry.settings.getConfigCategory(Settings.RESISTANCES_CATEGORY)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Settings.RESISTANCES_CATEGORY, false, false,
|
||||
Wizardry.NAME + " - " + I18n.format("config.wizardry.title." + Settings.RESISTANCES_CATEGORY));
|
||||
Wizardry.NAME + " - " + I18n.format("config." + Wizardry.MODID + ".title." + Settings.RESISTANCES_CATEGORY));
|
||||
|
||||
idsMenu.titleLine2 = I18n.format("config.wizardry.subtitle." + Settings.RESISTANCES_CATEGORY);
|
||||
idsMenu.titleLine2 = I18n.format("config." + Wizardry.MODID + ".subtitle." + Settings.RESISTANCES_CATEGORY);
|
||||
|
||||
return idsMenu;
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
Charsets.UTF_8));
|
||||
|
||||
} catch (IOException x){
|
||||
Wizardry.logger.error("Couldn't find file: wizardry:assets/texts/handbook_en_US.txt. The file may be"
|
||||
Wizardry.logger.error("Couldn't find file: " + Wizardry.MODID + ":assets/texts/handbook_en_US.txt. The file may be"
|
||||
+ "missing; please try re-downloading and reinstalling Wizardry.", x);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package electroblob.wizardry.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import electroblob.wizardry.WizardData;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.event.SpellCastEvent;
|
||||
@@ -10,12 +8,7 @@ import electroblob.wizardry.packet.PacketCastSpell;
|
||||
import electroblob.wizardry.packet.WizardryPacketHandler;
|
||||
import electroblob.wizardry.spell.Spell;
|
||||
import electroblob.wizardry.util.SpellModifiers;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.command.NumberInvalidException;
|
||||
import net.minecraft.command.PlayerNotFoundException;
|
||||
import net.minecraft.command.WrongUsageException;
|
||||
import net.minecraft.command.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.JsonToNBT;
|
||||
@@ -29,6 +22,8 @@ import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CommandCastSpell extends CommandBase {
|
||||
|
||||
@Override
|
||||
@@ -46,8 +41,8 @@ public class CommandCastSpell extends CommandBase {
|
||||
public String getUsage(ICommandSender sender){
|
||||
// Not ideal, but the way this is implemented means I have no choice. Only used in the help command, so in there
|
||||
// the custom command name will not display.
|
||||
return "commands.wizardry:cast.usage";
|
||||
// return I18n.format("commands.wizardry:cast.usage", Wizardry.settings.castCommandName);
|
||||
return "commands." + Wizardry.MODID + ":cast.usage";
|
||||
// return I18n.format("commands." + Wizardry.MODID + ":cast.usage", Wizardry.settings.castCommandName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,7 +61,7 @@ public class CommandCastSpell extends CommandBase {
|
||||
public void execute(MinecraftServer server, ICommandSender sender, String[] arguments) throws CommandException{
|
||||
|
||||
if(arguments.length < 1){
|
||||
throw new WrongUsageException("commands.wizardry:cast.usage", Wizardry.settings.castCommandName);
|
||||
throw new WrongUsageException("commands." + Wizardry.MODID + ":cast.usage", Wizardry.settings.castCommandName);
|
||||
}else{
|
||||
|
||||
// ===== Parameter retrieval =====
|
||||
@@ -85,7 +80,7 @@ public class CommandCastSpell extends CommandBase {
|
||||
Spell spell = Spell.get(arguments[i++]);
|
||||
|
||||
if(spell == null){
|
||||
throw new NumberInvalidException("commands.wizardry:cast.not_found", new Object[]{arguments[i - 1]});
|
||||
throw new NumberInvalidException("commands." + Wizardry.MODID + ":cast.not_found", new Object[]{arguments[i - 1]});
|
||||
}
|
||||
|
||||
boolean castAsOtherPlayer = false;
|
||||
@@ -120,7 +115,7 @@ public class CommandCastSpell extends CommandBase {
|
||||
try{
|
||||
modifiers = SpellModifiers.fromNBT(JsonToNBT.getTagFromJson(nbt));
|
||||
}catch (NBTException nbtexception){
|
||||
throw new CommandException("commands.wizardry:cast.tag_error", nbtexception.getMessage());
|
||||
throw new CommandException("commands." + Wizardry.MODID + ":cast.tag_error", nbtexception.getMessage());
|
||||
}
|
||||
|
||||
for(float multiplier : modifiers.getModifiers().values()){
|
||||
@@ -157,10 +152,10 @@ public class CommandCastSpell extends CommandBase {
|
||||
|
||||
if(castAsOtherPlayer){
|
||||
sender.sendMessage(
|
||||
new TextComponentTranslation("commands.wizardry:cast.success_remote_continuous",
|
||||
new TextComponentTranslation("commands." + Wizardry.MODID + ":cast.success_remote_continuous",
|
||||
spell.getNameForTranslationFormatted(), caster.getName()));
|
||||
}else{
|
||||
sender.sendMessage(new TextComponentTranslation("commands.wizardry:cast.success_continuous",
|
||||
sender.sendMessage(new TextComponentTranslation("commands." + Wizardry.MODID + ":cast.success_continuous",
|
||||
spell.getNameForTranslationFormatted()));
|
||||
}
|
||||
}
|
||||
@@ -183,10 +178,10 @@ public class CommandCastSpell extends CommandBase {
|
||||
}
|
||||
|
||||
if(castAsOtherPlayer){
|
||||
sender.sendMessage(new TextComponentTranslation("commands.wizardry:cast.success_remote",
|
||||
sender.sendMessage(new TextComponentTranslation("commands." + Wizardry.MODID + ":cast.success_remote",
|
||||
spell.getNameForTranslationFormatted(), caster.getName()));
|
||||
}else{
|
||||
sender.sendMessage(new TextComponentTranslation("commands.wizardry:cast.success",
|
||||
sender.sendMessage(new TextComponentTranslation("commands." + Wizardry.MODID + ":cast.success",
|
||||
spell.getNameForTranslationFormatted()));
|
||||
}
|
||||
return;
|
||||
@@ -199,7 +194,7 @@ public class CommandCastSpell extends CommandBase {
|
||||
|
||||
/** Displays the "Unable to cast [spell]" message in the chat. */
|
||||
private void displayFailMessage(ICommandSender sender, Spell spell){
|
||||
ITextComponent message = new TextComponentTranslation("commands.wizardry:cast.fail",
|
||||
ITextComponent message = new TextComponentTranslation("commands." + Wizardry.MODID + ":cast.fail",
|
||||
spell.getNameForTranslationFormatted());
|
||||
message.getStyle().setColor(TextFormatting.RED);
|
||||
sender.sendMessage(message);
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
package electroblob.wizardry.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import electroblob.wizardry.WizardData;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.event.DiscoverSpellEvent;
|
||||
import electroblob.wizardry.registry.Spells;
|
||||
import electroblob.wizardry.spell.Spell;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.command.NumberInvalidException;
|
||||
import net.minecraft.command.PlayerNotFoundException;
|
||||
import net.minecraft.command.WrongUsageException;
|
||||
import net.minecraft.command.*;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CommandDiscoverSpell extends CommandBase {
|
||||
|
||||
@Override
|
||||
@@ -41,8 +36,8 @@ public class CommandDiscoverSpell extends CommandBase {
|
||||
public String getUsage(ICommandSender sender){
|
||||
// Not ideal, but the way this is implemented means I have no choice. Only used in the help command, so in there
|
||||
// the custom command name will not display.
|
||||
return "commands.wizardry:discoverspell.usage";
|
||||
// return I18n.format("commands.wizardry:discoverspell.usage", Wizardry.settings.discoverspellCommandName);
|
||||
return "commands." + Wizardry.MODID + ":discoverspell.usage";
|
||||
// return I18n.format("commands." + Wizardry.MODID + ":discoverspell.usage", Wizardry.settings.discoverspellCommandName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,7 +56,7 @@ public class CommandDiscoverSpell extends CommandBase {
|
||||
public void execute(MinecraftServer server, ICommandSender sender, String[] arguments) throws CommandException{
|
||||
|
||||
if(arguments.length < 1){
|
||||
throw new WrongUsageException("commands.wizardry:discoverspell.usage",
|
||||
throw new WrongUsageException("commands." + Wizardry.MODID + ":discoverspell.usage",
|
||||
Wizardry.settings.discoverspellCommandName);
|
||||
}else{
|
||||
|
||||
@@ -91,7 +86,7 @@ public class CommandDiscoverSpell extends CommandBase {
|
||||
spell = Spell.get(arguments[i++]);
|
||||
|
||||
if(spell == null){
|
||||
throw new NumberInvalidException("commands.wizardry:discoverspell.not_found",
|
||||
throw new NumberInvalidException("commands." + Wizardry.MODID + ":discoverspell.not_found",
|
||||
new Object[]{arguments[i - 1]});
|
||||
}
|
||||
}
|
||||
@@ -116,21 +111,21 @@ public class CommandDiscoverSpell extends CommandBase {
|
||||
if(clear){
|
||||
properties.spellsDiscovered.clear();
|
||||
sender.sendMessage(
|
||||
new TextComponentTranslation("commands.wizardry:discoverspell.clear", player.getName()));
|
||||
new TextComponentTranslation("commands." + Wizardry.MODID + ":discoverspell.clear", player.getName()));
|
||||
}else if(all){
|
||||
properties.spellsDiscovered.addAll(Spell.getSpells(Spell.allSpells));
|
||||
sender.sendMessage(
|
||||
new TextComponentTranslation("commands.wizardry:discoverspell.all", player.getName()));
|
||||
new TextComponentTranslation("commands." + Wizardry.MODID + ":discoverspell.all", player.getName()));
|
||||
}else{
|
||||
if(properties.hasSpellBeenDiscovered(spell)){
|
||||
properties.spellsDiscovered.remove(spell);
|
||||
sender.sendMessage(new TextComponentTranslation("commands.wizardry:discoverspell.removespell",
|
||||
sender.sendMessage(new TextComponentTranslation("commands." + Wizardry.MODID + ":discoverspell.removespell",
|
||||
spell.getNameForTranslationFormatted(), player.getName()));
|
||||
}else{
|
||||
if(!MinecraftForge.EVENT_BUS
|
||||
.post(new DiscoverSpellEvent(player, spell, DiscoverSpellEvent.Source.COMMAND))){
|
||||
properties.discoverSpell(spell);
|
||||
sender.sendMessage(new TextComponentTranslation("commands.wizardry:discoverspell.addspell",
|
||||
sender.sendMessage(new TextComponentTranslation("commands." + Wizardry.MODID + ":discoverspell.addspell",
|
||||
spell.getNameForTranslationFormatted(), player.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ public class CommandSetAlly extends CommandBase {
|
||||
public String getUsage(ICommandSender p_71518_1_){
|
||||
// Not ideal, but the way this is implemented means I have no choice. Only used in the help command, so in there
|
||||
// the custom command name will not display.
|
||||
return "commands.wizardry:ally.usage";
|
||||
// return I18n.format("commands.wizardry:ally.usage", Wizardry.settings.allyCommandName);
|
||||
return "commands." + Wizardry.MODID + ":ally.usage";
|
||||
// return I18n.format("commands." + Wizardry.MODID + ":ally.usage", Wizardry.settings.allyCommandName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,7 +60,7 @@ public class CommandSetAlly extends CommandBase {
|
||||
public void execute(MinecraftServer server, ICommandSender sender, String[] arguments) throws CommandException{
|
||||
|
||||
if(arguments.length < 1){
|
||||
throw new WrongUsageException("commands.wizardry:ally.usage", Wizardry.settings.allyCommandName);
|
||||
throw new WrongUsageException("commands." + Wizardry.MODID + ":ally.usage", Wizardry.settings.allyCommandName);
|
||||
}else{
|
||||
|
||||
EntityPlayerMP allyOf = null;
|
||||
@@ -86,7 +86,7 @@ public class CommandSetAlly extends CommandBase {
|
||||
&& !WizardryUtilities.isPlayerOp((EntityPlayer)sender, server)){
|
||||
// Displays a chat message if a non-op tries to modify another player's allies.
|
||||
TextComponentTranslation TextComponentTranslation2 = new TextComponentTranslation(
|
||||
"commands.wizardry:ally.permission");
|
||||
"commands." + Wizardry.MODID + ":ally.permission");
|
||||
TextComponentTranslation2.getStyle().setColor(TextFormatting.RED);
|
||||
allyOf.sendMessage(TextComponentTranslation2);
|
||||
return;
|
||||
@@ -100,12 +100,12 @@ public class CommandSetAlly extends CommandBase {
|
||||
if(allyOf == null)
|
||||
throw new PlayerNotFoundException("You must specify which player you wish to perform this action on.");
|
||||
|
||||
if(allyOf == ally) throw new NumberInvalidException("commands.wizardry:ally.self");
|
||||
if(allyOf == ally) throw new NumberInvalidException("commands." + Wizardry.MODID + ":ally.self");
|
||||
|
||||
if(WizardData.get(allyOf) != null){
|
||||
String string = WizardData.get(allyOf).toggleAlly(ally) ? "add" : "remove";
|
||||
if(executeAsOtherPlayer){
|
||||
sender.sendMessage(new TextComponentTranslation("commands.wizardry:ally." + string + "ally",
|
||||
sender.sendMessage(new TextComponentTranslation("commands." + Wizardry.MODID + ":ally." + string + "ally",
|
||||
ally.getName(), allyOf.getName()));
|
||||
// In this case, the player whose allies have been modified is also notified.
|
||||
allyOf.sendMessage(new TextComponentTranslation("item.wand." + string + "ally", ally.getName()));
|
||||
|
||||
@@ -40,8 +40,8 @@ public class CommandViewAllies extends CommandBase {
|
||||
public String getUsage(ICommandSender p_71518_1_){
|
||||
// Not ideal, but the way this is implemented means I have no choice. Only used in the help command, so in there
|
||||
// the custom command name will not display.
|
||||
return "commands.wizardry:allies.usage";
|
||||
// return I18n.format("commands.wizardry:allies.usage", Wizardry.settings.alliesCommandName);
|
||||
return "commands." + Wizardry.MODID + ":allies.usage";
|
||||
// return I18n.format("commands." + Wizardry.MODID + ":allies.usage", Wizardry.settings.alliesCommandName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,7 +76,7 @@ public class CommandViewAllies extends CommandBase {
|
||||
&& !WizardryUtilities.isPlayerOp((EntityPlayer)sender, server)){
|
||||
// Displays a chat message if a non-op tries to view another player's allies.
|
||||
TextComponentTranslation TextComponentTranslation2 = new TextComponentTranslation(
|
||||
"commands.wizardry:allies.permission");
|
||||
"commands." + Wizardry.MODID + ":allies.permission");
|
||||
TextComponentTranslation2.getStyle().setColor(TextFormatting.RED);
|
||||
player.sendMessage(TextComponentTranslation2);
|
||||
return;
|
||||
@@ -102,14 +102,14 @@ public class CommandViewAllies extends CommandBase {
|
||||
// Cuts the last " ," off of the string.
|
||||
string = string.substring(0, string.length() - 2);
|
||||
}else{
|
||||
string = I18n.format("commands.wizardry:allies.none");
|
||||
string = I18n.format("commands." + Wizardry.MODID + ":allies.none");
|
||||
}
|
||||
|
||||
if(executeAsOtherPlayer){
|
||||
sender.sendMessage(
|
||||
new TextComponentTranslation("commands.wizardry:allies.list_other", player.getName(), string));
|
||||
new TextComponentTranslation("commands." + Wizardry.MODID + ":allies.list_other", player.getName(), string));
|
||||
}else{
|
||||
sender.sendMessage(new TextComponentTranslation("commands.wizardry:allies.list", string));
|
||||
sender.sendMessage(new TextComponentTranslation("commands." + Wizardry.MODID + ":allies.list", string));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
public interface ISummonedCreature extends IEntityAdditionalSpawnData {
|
||||
|
||||
// Remember that ALL fields are static and final in interfaces, even if they don't explicitly state that.
|
||||
String NAMEPLATE_TRANSLATION_KEY = "entity.wizardry:summonedcreature.nameplate";
|
||||
String NAMEPLATE_TRANSLATION_KEY = "entity." + Wizardry.MODID + ":summonedcreature.nameplate";
|
||||
|
||||
// Setters and getters. The subclass fields that these access should be private.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -28,7 +28,7 @@ public class PotionDecay extends Potion {
|
||||
public PotionDecay(boolean isBadEffect, int liquidColour){
|
||||
super(isBadEffect, liquidColour);
|
||||
// This needs to be here because registerPotionAttributeModifier doesn't like it if the potion has no name yet.
|
||||
this.setPotionName("potion.wizardry:decay");
|
||||
this.setPotionName("potion." + Wizardry.MODID + ":decay");
|
||||
this.registerPotionAttributeModifier(SharedMonsterAttributes.MOVEMENT_SPEED,
|
||||
"85602e0b-4801-4a87-94f3-bf617c97014e", -Constants.DECAY_SLOWNESS_PER_LEVEL, 2);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class PotionFrost extends Potion implements ICustomPotionParticles {
|
||||
public PotionFrost(boolean isBadEffect, int liquidColour){
|
||||
super(isBadEffect, liquidColour);
|
||||
// This needs to be here because registerPotionAttributeModifier doesn't like it if the potion has no name yet.
|
||||
this.setPotionName("potion.wizardry:frost");
|
||||
this.setPotionName("potion." + Wizardry.MODID + ":frost");
|
||||
// With -0.5 as the 'amount', frost 1 slows the entity down by a half and frost 2 roots it to the spot
|
||||
this.registerPotionAttributeModifier(SharedMonsterAttributes.MOVEMENT_SPEED,
|
||||
"35dded48-2f19-4541-8510-b29e2dc2cd51", -Constants.FROST_SLOWNESS_PER_LEVEL, 2);
|
||||
|
||||
@@ -73,7 +73,7 @@ public final class WizardryBlocks {
|
||||
* @param registry The registry to register the given block to.
|
||||
* @param item The block to register.
|
||||
* @param name The name of the block, without the mod ID or the .name stuff. The registry name will be
|
||||
* {@code wizardry:[name]}. The unlocalised name will be {@code tile.wizardry:[name].name}.
|
||||
* {@code ebwizardry:[name]}. The unlocalised name will be {@code tile.ebwizardry:[name].name}.
|
||||
*/
|
||||
public static void registerBlock(IForgeRegistry<Block> registry, Block block, String name){
|
||||
block.setRegistryName(Wizardry.MODID, name);
|
||||
|
||||
@@ -272,7 +272,7 @@ public final class WizardryItems {
|
||||
* @param registry The registry to register the given item to.
|
||||
* @param item The item to register.
|
||||
* @param name The name of the item, without the mod ID or the .name stuff. The registry name will be
|
||||
* {@code wizardry:[name]}. The unlocalised name will be {@code item.wizardry:[name].name}.
|
||||
* {@code ebwizardry:[name]}. The unlocalised name will be {@code item.ebwizardry:[name].name}.
|
||||
*/
|
||||
public static void registerItem(IForgeRegistry<Item> registry, Item item, String name){
|
||||
item.setRegistryName(Wizardry.MODID, name);
|
||||
|
||||
@@ -88,7 +88,7 @@ public final class WizardryPotions {
|
||||
* @param registry The registry to register the given potion to.
|
||||
* @param potion The potion to register.
|
||||
* @param name The name of the potion, without the mod ID or the .name stuff. The registry name will be
|
||||
* {@code wizardry:[name]}. The unlocalised name will be {@code potion.wizardry:[name].name}.
|
||||
* {@code ebwizardry:[name]}. The unlocalised name will be {@code potion.ebwizardry:[name].name}.
|
||||
*/
|
||||
public static void registerPotion(IForgeRegistry<Potion> registry, Potion potion, String name){
|
||||
potion.setRegistryName(Wizardry.MODID, name);
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class WizardryTabs {
|
||||
private static Comparator<ItemStack> spellItemSorter;
|
||||
|
||||
// Creative Tabs
|
||||
public static final CreativeTabs WIZARDRY = new CreativeTabs("wizardry"){
|
||||
public static final CreativeTabs WIZARDRY = new CreativeTabs("ebwizardry"){
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -45,7 +45,7 @@ public final class WizardryTabs {
|
||||
Collections.sort(items, itemSorter);
|
||||
}
|
||||
};
|
||||
public static final CreativeTabs SPELLS = new CreativeTabs("wizardryspells"){
|
||||
public static final CreativeTabs SPELLS = new CreativeTabs("ebwizardryspells"){
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -3,6 +3,7 @@ package electroblob.wizardry.tileentity;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.item.ItemWand;
|
||||
import electroblob.wizardry.item.ItemWizardArmour;
|
||||
import electroblob.wizardry.registry.WizardryBlocks;
|
||||
@@ -125,7 +126,7 @@ public class TileEntityArcaneWorkbench extends TileEntity implements IInventory,
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "container.wizardry:arcane_workbench";
|
||||
return "container." + Wizardry.MODID + ":arcane_workbench";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user