Adding five more commands to simplifying operations involving items

This commit is contained in:
Pahimar 2015-02-18 10:47:59 -05:00
parent 7afcdf8d9a
commit 4b4abb84f1
9 changed files with 200 additions and 0 deletions

View file

@ -64,15 +64,20 @@ public class CommandEE extends CommandBase
static
{
modCommands.add(new CommandSetEnergyValue());
modCommands.add(new CommandSetEnergyValueCurrentItem());
modCommands.add(new CommandSyncEnergyValues());
modCommands.add(new CommandPlayerLearnEverything());
modCommands.add(new CommandPlayerLearnItem());
modCommands.add(new CommandPlayerLearnCurrentItem());
modCommands.add(new CommandPlayerForgetEverything());
modCommands.add(new CommandPlayerForgetItem());
modCommands.add(new CommandPlayerForgetCurrentItem());
modCommands.add(new CommandTemplateLearnEverything());
modCommands.add(new CommandTemplateLearnItem());
modCommands.add(new CommandTemplateLearnCurrentItem());
modCommands.add(new CommandTemplateForgetEverything());
modCommands.add(new CommandTemplateForgetItem());
modCommands.add(new CommandTemplateForgetCurrentItem());
modCommands.add(new CommandSetItemLearnable());
modCommands.add(new CommandSetItemNotLearnable());
modCommands.add(new CommandSetItemRecoverable());

View file

@ -0,0 +1,33 @@
package com.pahimar.ee3.command;
import com.pahimar.ee3.reference.Messages;
import com.pahimar.ee3.reference.Names;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
public class CommandPlayerForgetCurrentItem extends CommandBase
{
@Override
public String getCommandName()
{
return Names.Commands.PLAYER_FORGET_CURRENT_ITEM;
}
@Override
public int getRequiredPermissionLevel()
{
return 2;
}
@Override
public String getCommandUsage(ICommandSender commandSender)
{
return Messages.Commands.PLAYER_FORGET_CURRENT_ITEM_USAGE;
}
@Override
public void processCommand(ICommandSender commandSender, String[] args)
{
}
}

View file

@ -0,0 +1,33 @@
package com.pahimar.ee3.command;
import com.pahimar.ee3.reference.Messages;
import com.pahimar.ee3.reference.Names;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
public class CommandPlayerLearnCurrentItem extends CommandBase
{
@Override
public String getCommandName()
{
return Names.Commands.PLAYER_LEARN_CURRENT_ITEM;
}
@Override
public int getRequiredPermissionLevel()
{
return 2;
}
@Override
public String getCommandUsage(ICommandSender commandSender)
{
return Messages.Commands.PLAYER_LEARN_CURRENT_ITEM_USAGE;
}
@Override
public void processCommand(ICommandSender commandSender, String[] args)
{
}
}

View file

@ -0,0 +1,33 @@
package com.pahimar.ee3.command;
import com.pahimar.ee3.reference.Messages;
import com.pahimar.ee3.reference.Names;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
public class CommandSetEnergyValueCurrentItem extends CommandBase
{
@Override
public String getCommandName()
{
return Names.Commands.SET_ENERGY_VALUE_CURRENT_ITEM;
}
@Override
public int getRequiredPermissionLevel()
{
return 2;
}
@Override
public String getCommandUsage(ICommandSender commandSender)
{
return Messages.Commands.SET_ENERGY_VALUE_CURRENT_ITEM_USAGE;
}
@Override
public void processCommand(ICommandSender commandSender, String[] args)
{
}
}

View file

@ -0,0 +1,33 @@
package com.pahimar.ee3.command;
import com.pahimar.ee3.reference.Messages;
import com.pahimar.ee3.reference.Names;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
public class CommandTemplateForgetCurrentItem extends CommandBase
{
@Override
public String getCommandName()
{
return Names.Commands.TEMPLATE_FORGET_CURRENT_ITEM;
}
@Override
public int getRequiredPermissionLevel()
{
return 2;
}
@Override
public String getCommandUsage(ICommandSender commandSender)
{
return Messages.Commands.TEMPLATE_FORGET_CURRENT_ITEM_USAGE;
}
@Override
public void processCommand(ICommandSender commandSender, String[] args)
{
}
}

View file

@ -0,0 +1,33 @@
package com.pahimar.ee3.command;
import com.pahimar.ee3.reference.Messages;
import com.pahimar.ee3.reference.Names;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
public class CommandTemplateLearnCurrentItem extends CommandBase
{
@Override
public String getCommandName()
{
return Names.Commands.TEMPLATE_LEARN_CURRENT_ITEM;
}
@Override
public int getRequiredPermissionLevel()
{
return 2;
}
@Override
public String getCommandUsage(ICommandSender commandSender)
{
return Messages.Commands.TEMPLATE_LEARN_CURRENT_ITEM_USAGE;
}
@Override
public void processCommand(ICommandSender commandSender, String[] args)
{
}
}

View file

@ -23,6 +23,9 @@ public final class Messages
public static final String SET_ENERGY_VALUE_USAGE = COMMAND_PREFIX + Names.Commands.SET_ENERGY_VALUE + ".usage";
public static final String SET_ENERGY_VALUE_SUCCESS = COMMAND_PREFIX + Names.Commands.SET_ENERGY_VALUE + ".success";
public static final String SET_ENERGY_VALUE_CURRENT_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.SET_ENERGY_VALUE_CURRENT_ITEM + ".usage";
public static final String SET_ENERGY_VALUE_CURRENT_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.SET_ENERGY_VALUE_CURRENT_ITEM + ".success";
public static final String SYNC_ENERGY_VALUES_USAGE = COMMAND_PREFIX + Names.Commands.SYNC_ENERGY_VALUES + ".usage";
public static final String SYNC_ENERGY_VALUES_SUCCESS = COMMAND_PREFIX + Names.Commands.SYNC_ENERGY_VALUES + ".success";
public static final String SYNC_ENERGY_VALUES_DENIED = COMMAND_PREFIX + Names.Commands.SYNC_ENERGY_VALUES + ".denied";
@ -33,24 +36,36 @@ public final class Messages
public static final String PLAYER_LEARN_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.PLAYER_LEARN_ITEM + ".usage";
public static final String PLAYER_LEARN_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.PLAYER_LEARN_ITEM + ".success";
public static final String PLAYER_LEARN_CURRENT_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.PLAYER_LEARN_CURRENT_ITEM + ".usage";
public static final String PLAYER_LEARN_CURRENT_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.PLAYER_LEARN_CURRENT_ITEM + ".success";
public static final String PLAYER_FORGET_EVERYTHING_USAGE = COMMAND_PREFIX + Names.Commands.PLAYER_FORGET_EVERYTHING + ".usage";
public static final String PLAYER_FORGET_EVERYTHING_SUCCESS = COMMAND_PREFIX + Names.Commands.PLAYER_FORGET_EVERYTHING + ".success";
public static final String PLAYER_FORGET_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.PLAYER_FORGET_ITEM + ".usage";
public static final String PLAYER_FORGET_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.PLAYER_FORGET_ITEM + ".success";
public static final String PLAYER_FORGET_CURRENT_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.PLAYER_FORGET_CURRENT_ITEM + ".usage";
public static final String PLAYER_FORGET_CURRENT_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.PLAYER_FORGET_CURRENT_ITEM + ".success";
public static final String TEMPLATE_LEARN_EVERYTHING_USAGE = COMMAND_PREFIX + Names.Commands.TEMPLATE_LEARN_EVERYTHING + ".usage";
public static final String TEMPLATE_LEARN_EVERYTHING_SUCCESS = COMMAND_PREFIX + Names.Commands.TEMPLATE_LEARN_EVERYTHING + ".success";
public static final String TEMPLATE_LEARN_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.TEMPLATE_LEARN_ITEM + ".usage";
public static final String TEMPLATE_LEARN_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.TEMPLATE_LEARN_ITEM + ".success";
public static final String TEMPLATE_LEARN_CURRENT_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.TEMPLATE_LEARN_CURRENT_ITEM + ".usage";
public static final String TEMPLATE_LEARN_CURRENT_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.TEMPLATE_LEARN_CURRENT_ITEM + ".success";
public static final String TEMPLATE_FORGET_EVERYTHING_USAGE = COMMAND_PREFIX + Names.Commands.TEMPLATE_FORGET_EVERYTHING + ".usage";
public static final String TEMPLATE_FORGET_EVERYTHING_SUCCESS = COMMAND_PREFIX + Names.Commands.TEMPLATE_FORGET_EVERYTHING + ".success";
public static final String TEMPLATE_FORGET_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.TEMPLATE_FORGET_ITEM + ".usage";
public static final String TEMPLATE_FORGET_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.TEMPLATE_FORGET_ITEM + ".success";
public static final String TEMPLATE_FORGET_CURRENT_ITEM_USAGE = COMMAND_PREFIX + Names.Commands.TEMPLATE_FORGET_CURRENT_ITEM + ".usage";
public static final String TEMPLATE_FORGET_CURRENT_ITEM_SUCCESS = COMMAND_PREFIX + Names.Commands.TEMPLATE_FORGET_CURRENT_ITEM + ".success";
public static final String SET_ITEM_LEARNABLE_USAGE = COMMAND_PREFIX + Names.Commands.SET_ITEM_LEARNABLE + ".usage";
public static final String SET_ITEM_LEARNABLE_SUCCESS = COMMAND_PREFIX + Names.Commands.SET_ITEM_LEARNABLE + ".success";

View file

@ -123,15 +123,20 @@ public class Names
{
public static final String BASE_COMMAND = Reference.LOWERCASE_MOD_ID;
public static final String SET_ENERGY_VALUE = "set-energy-value";
public static final String SET_ENERGY_VALUE_CURRENT_ITEM = "set-energy-value-current-item";
public static final String SYNC_ENERGY_VALUES = "sync-energy-values";
public static final String PLAYER_LEARN_EVERYTHING = "player-learn-everything";
public static final String PLAYER_LEARN_ITEM = "player-learn-item";
public static final String PLAYER_LEARN_CURRENT_ITEM = "player-learn-current-item";
public static final String PLAYER_FORGET_EVERYTHING = "player-forget-everything";
public static final String PLAYER_FORGET_ITEM = "player-forget-item";
public static final String PLAYER_FORGET_CURRENT_ITEM = "player-forget-current-item";
public static final String TEMPLATE_LEARN_EVERYTHING = "template-learn-everything";
public static final String TEMPLATE_LEARN_ITEM = "template-learn-item";
public static final String TEMPLATE_LEARN_CURRENT_ITEM = "template-learn-current-item";
public static final String TEMPLATE_FORGET_EVERYTHING = "template-forget-everything";
public static final String TEMPLATE_FORGET_ITEM = "template-forget-item";
public static final String TEMPLATE_FORGET_CURRENT_ITEM = "template-forget-current-item";
public static final String SET_ITEM_LEARNABLE = "set-item-learnable";
public static final String SET_ITEM_NOT_LEARNABLE = "set-item-not-learnable";
public static final String SET_ITEM_RECOVERABLE = "set-item-recoverable";

View file

@ -107,6 +107,8 @@ commands.ee3.player-not-found.error=Player with name %s was not found on the ser
commands.ee3.invalid-nbt-tag.error=Data tag parsing failed: %s
commands.ee3.set-energy-value.usage=/ee3 set-energy-value <pre> <item> <value> [data] [dataTag] OR /ee3 set-energy-value <post> <item> <value> [data] [dataTag]
commands.ee3.set-energy-value.success=%s set a %s EnergyValue of %s to %s
commands.ee3.set-energy-value-current-item.usage=/ee3 set-energy-value-current-item <pre> <value> OR /ee3 set-energy-value-current-item <post> <value>
commands.ee3.set-energy-value-current-item.success=%s set a %s EnergyValue of %s to %s
commands.ee3.sync-energy-values.usage=/ee3 sync-energy-values
commands.ee3.sync-energy-values.success=Successfully synchronized energy values with the server
commands.ee3.sync-energy-values.denied=Please wait %s more seconds and try again
@ -114,18 +116,26 @@ commands.ee3.player-learn-everything.usage=/ee3 player-learn-everything <playern
commands.ee3.player-learn-everything.success=%s taught %s how to transmute everything
commands.ee3.player-learn-item.usage=/ee3 player-learn-item <playername> <item> <data> [dataTag]
commands.ee3.player-learn-item.success=%s taught %s how to transmute %s
commands.ee3.player-learn-current-item.usage=/ee3 player-learn-current-item <playername>
commands.ee3.player-learn-current-item.success=%s taught %s how to transmute %s
commands.ee3.player-forget-everything.usage=/ee3 player-forget-everything <playername>
commands.ee3.player-forget-everything.success=%s made %s forget how to transmute everything
commands.ee3.player-forget-item.usage=/ee3 player-forget-item <playername> <item> <data> [dataTag]
commands.ee3.player-forget-item.success=%s made %s forget how to transmute %s
commands.ee3.player-forget-current-item.usage=/ee3 player-forget-current-item <playername>
commands.ee3.player-forget-current-item.success=%s made %s forget how to transmute %s
commands.ee3.template-learn-everything.usage=/ee3 template-learn-everything
commands.ee3.template-learn-everything.success=%s taught the knowledge template how to transmute everything
commands.ee3.template-learn-item.usage=/ee3 template-learn-item <item> <data> [dataTag]
commands.ee3.template-learn-item.success=%s taught the knowledge template how to transmute %s
commands.ee3.template-learn-current-item.usage=/ee3 template-learn-current-item
commands.ee3.template-learn-current-item.success=%s taught the knowledge template how to transmute %s
commands.ee3.template-forget-everything.usage=/ee3 template-forget-everything
commands.ee3.template-forget-everything.success=%s made the knowledge template forget how to transmute everything
commands.ee3.template-forget-item.usage=/ee3 template-forget-item <item> <data> [dataTag]
commands.ee3.template-forget-item.success=%s made the knowledge template forget how to transmute %s
commands.ee3.template-forget-current-item.usage=/ee3 template-forget-current-item
commands.ee3.template-forget-current-item.success=%s made the knowledge template forget how to transmute %s
commands.ee3.set-item-learnable.usage=/ee3 set-item-learnable <item> <data> [dataTag]
commands.ee3.set-item-learnable.success=%s set %s as learnable for transmutations
commands.ee3.set-item-not-learnable.usage=/ee3 set-item-not-learnable <item> <data> [dataTag]