aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-04-28 02:37:21 -0400
committerbowser0000 <bowser0000@gmail.com>2022-04-28 02:37:21 -0400
commit827fb6fc502e1e7159d15c1decfa35968668bb6f (patch)
tree210df625e8d1bc9604c72d651741f54aaf48e406 /src/main/java/me/Danker/features
parentd35e43b33b98796acc7b8dc76bc06848d0ee3129 (diff)
downloadSkyblockMod-827fb6fc502e1e7159d15c1decfa35968668bb6f.tar.gz
SkyblockMod-827fb6fc502e1e7159d15c1decfa35968668bb6f.tar.bz2
SkyblockMod-827fb6fc502e1e7159d15c1decfa35968668bb6f.zip
Add keybind for adding waypoint
Diffstat (limited to 'src/main/java/me/Danker/features')
-rw-r--r--src/main/java/me/Danker/features/CrystalHollowWaypoints.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/features/CrystalHollowWaypoints.java b/src/main/java/me/Danker/features/CrystalHollowWaypoints.java
index 795c49c..a8ee0f9 100644
--- a/src/main/java/me/Danker/features/CrystalHollowWaypoints.java
+++ b/src/main/java/me/Danker/features/CrystalHollowWaypoints.java
@@ -2,10 +2,12 @@ package me.Danker.features;
import me.Danker.DankersSkyblockMod;
import me.Danker.commands.ToggleCommand;
+import me.Danker.gui.crystalhollowwaypoints.CrystalHollowAddWaypointGui;
import me.Danker.handlers.ScoreboardHandler;
import me.Danker.utils.RenderUtils;
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.event.ClickEvent;
@@ -15,6 +17,7 @@ import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import java.util.ArrayList;
@@ -178,6 +181,18 @@ public class CrystalHollowWaypoints {
}
@SubscribeEvent
+ public void onKey(InputEvent.KeyInputEvent event) {
+ if (!Utils.tabLocation.equals("Crystal Hollows")) return;
+
+ if (DankersSkyblockMod.keyBindings[3].isPressed()) {
+ Minecraft mc = Minecraft.getMinecraft();
+ EntityPlayer player = mc.thePlayer;
+
+ mc.displayGuiScreen(new CrystalHollowAddWaypointGui((int) player.posX, (int) player.posY, (int) player.posZ));
+ }
+ }
+
+ @SubscribeEvent
public void onWorldRender(RenderWorldLastEvent event) {
if (ToggleCommand.crystalHollowWaypoints && Utils.tabLocation.equals("Crystal Hollows")) {
for (Waypoint waypoint : waypoints) {