aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker
diff options
context:
space:
mode:
authorCuzImClicks <bruno778.whiteelfie@gmail.com>2021-04-28 12:48:15 +0200
committerCuzImClicks <bruno778.whiteelfie@gmail.com>2021-04-28 12:48:15 +0200
commit06565f0136aebc720b24d0c1b1b79c9043ed01bf (patch)
treec49052ed69045b3e8982bb932292fe9ea693f5bf /src/main/java/me/Danker
parentc673d8bd0d9857ca0f04782d903208c5f8ec23d0 (diff)
downloadSkyblockMod-06565f0136aebc720b24d0c1b1b79c9043ed01bf.tar.gz
SkyblockMod-06565f0136aebc720b24d0c1b1b79c9043ed01bf.tar.bz2
SkyblockMod-06565f0136aebc720b24d0c1b1b79c9043ed01bf.zip
added a command to set your yaw and pitch
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java2
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java1
-rw-r--r--src/main/java/me/Danker/commands/SetAngleCommand.java40
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]));
+ }
+}