diff options
Diffstat (limited to 'src/main/java/me')
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DHelpCommand.java | 1 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/SetAngleCommand.java | 40 |
3 files changed, 42 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 619b6e6..fe5d7ac 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -176,7 +176,7 @@ public class DankersSkyblockMod { ClientCommandHandler.instance.registerCommand(new SkyblockPlayersCommand()); ClientCommandHandler.instance.registerCommand(new SlayerCommand()); ClientCommandHandler.instance.registerCommand(new ToggleCommand()); - + ClientCommandHandler.instance.registerCommand(new SetAngleCommand()); ClientCommandHandler.instance.registerCommand(new Crypt()); ClientCommandHandler.instance.registerCommand(new DarkAuction()); diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index d5f3617..207e700 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -63,6 +63,7 @@ public class DHelpCommand extends CommandBase { EnumChatFormatting.GOLD + HowlingCave.usage(arg0) + EnumChatFormatting.AQUA + " - Warps you to the Howling Cave in the Park. \n" + EnumChatFormatting.GOLD + Magma.usage(arg0) + EnumChatFormatting.AQUA + " - Warps you to the Magma Fields in the Blazing Fortress. \n" + EnumChatFormatting.GOLD + SpidersNest.usage(arg0) + EnumChatFormatting.AQUA + " - Warps you to the Top of the Spider's Nest in the Spider's Den. \n" + + EnumChatFormatting.GOLD + SetAngleCommand.usage(arg0) + EnumChatFormatting.AQUA + " - Sets your yaw and pitch. \n" + EnumChatFormatting.GREEN + " Open Maddox Menu" + EnumChatFormatting.AQUA + " - M by default.\n" + EnumChatFormatting.GREEN + " Start/Stop Skill Tracker" + EnumChatFormatting.AQUA + " - Numpad 5 by default.\n")); } diff --git a/src/main/java/me/Danker/commands/SetAngleCommand.java b/src/main/java/me/Danker/commands/SetAngleCommand.java new file mode 100644 index 0000000..3b288c4 --- /dev/null +++ b/src/main/java/me/Danker/commands/SetAngleCommand.java @@ -0,0 +1,40 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import net.minecraft.client.Minecraft; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.util.ChatComponentText; + + +public class SetAngleCommand extends CommandBase { + + @Override + public String getCommandName() { + return "setangle"; + } + + @Override + public String getCommandUsage(ICommandSender sender) { + return "/" + getCommandName() + " [yaw] [pitch]"; + } + + public static String usage(ICommandSender arg0) { + return new SetAngleCommand().getCommandUsage(arg0); + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + if (args.length < 2) return; + + Minecraft.getMinecraft().thePlayer.rotationPitch = Float.parseFloat(args[1]); + Minecraft.getMinecraft().thePlayer.rotationYaw = Float.parseFloat(args[0]); + sender.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Set your rotation to y=" + DankersSkyblockMod.SECONDARY_COLOUR + args[0] + DankersSkyblockMod.MAIN_COLOUR + ", x=" + DankersSkyblockMod.SECONDARY_COLOUR +args[1])); + } +} |