Command rework (#1434)
* Network part finished. * Should be more reasonable now * This should be good enough. * Orb finished, needs strings * Bind finished. Needs strings. * Reformat & Help subcommand * Cleanup, strings, no negative amounts * Removed TODOs * Added missing MaxTier check for Blood Orbs. Added TODO: Test with custom Blood Orbs. * Ritual commands finished. Check for valid placement might be optimized. (TODO) * Access modifiers, moved TODO * Added TODOs for localized strings * DrainUtils postponed until the necessary functionality is available with SoulTickets (telling SoulTicket network from soul ticket, a list of all registered soul tickets per network) * Replaced all occurrences of TextHelper with TextComponentTranslation in the commands section * - Moved Teleports.java to teleport package - added teleposer command - added missing strings - cleanup * Fixed spelling of "Successful(ly)" * getUsage() now returns translation keys. getInfo() is now an explicit String ritual creation command now has proper tab completions help is an additional argument with "-h" or "?" cleanup * teleposerSet final cleanup. * Removed ritual removal command Signed-off-by: tobias <angryaeon@icloud.com> * Check if the tile has a ritual first Signed-off-by: tobias <angryaeon@icloud.com> * A bit more optimisation Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 1 Signed-off-by: tobias <angryaeon@icloud.com> * Cleanup part 2 Signed-off-by: tobias <angryaeon@icloud.com> * Part 3 Signed-off-by: tobias <angryaeon@icloud.com> * Part 4 Signed-off-by: tobias <angryaeon@icloud.com> * Updated language file to reflect cleanup & continuity changes. Signed-off-by: tobias <angryaeon@icloud.com> * Change to use an abstract class that gets called instead of calling super on overriden execute() for commands Signed-off-by: tobias <angryaeon@icloud.com> * Use player facing for ritual creation. Signed-off-by: tobias <angryaeon@icloud.com>
This commit is contained in:
parent
2a8e1f1271
commit
95d99c0a01
13 changed files with 990 additions and 323 deletions
|
@ -1,18 +1,19 @@
|
|||
package WayofTime.bloodmagic.command;
|
||||
|
||||
import WayofTime.bloodmagic.command.sub.SubCommandBind;
|
||||
import WayofTime.bloodmagic.command.sub.SubCommandNetwork;
|
||||
import WayofTime.bloodmagic.command.sub.SubCommandOrb;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import WayofTime.bloodmagic.command.sub.*;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.server.command.CommandTreeBase;
|
||||
import net.minecraftforge.server.command.CommandTreeHelp;
|
||||
|
||||
public class CommandBloodMagic extends CommandTreeBase {
|
||||
|
||||
public CommandBloodMagic() {
|
||||
addSubcommand(new SubCommandBind());
|
||||
addSubcommand(new SubCommandNetwork());
|
||||
addSubcommand(new SubCommandOrb());
|
||||
addSubcommand(new SubCommandRitual());
|
||||
addSubcommand(new SubCommandTeleposer());
|
||||
addSubcommand(new CommandTreeHelp(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,15 +31,4 @@ public class CommandBloodMagic extends CommandTreeBase {
|
|||
return 2;
|
||||
}
|
||||
|
||||
public static void displayHelpString(ICommandSender commandSender, String display, Object... info) {
|
||||
commandSender.sendMessage(new TextComponentString(TextHelper.localizeEffect(display, info)));
|
||||
}
|
||||
|
||||
public static void displayErrorString(ICommandSender commandSender, String display, Object... info) {
|
||||
commandSender.sendMessage(new TextComponentString(TextHelper.localizeEffect(display, info)));
|
||||
}
|
||||
|
||||
public static void displaySuccessString(ICommandSender commandSender, String display, Object... info) {
|
||||
commandSender.sendMessage(new TextComponentString(TextHelper.localizeEffect(display, info)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue