From 71f54129ed3c257f9bc7cf4f9817ccae22691be2 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Fri, 20 Jan 2023 21:47:23 +0100 Subject: Just commits change i forgot to commit some todos will follow --- .../skyblock/quicknav/QuickNavButton.java | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index ac381240..985cbd22 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -49,8 +49,10 @@ public class QuickNavButton extends ClickableWidget { int w = ((HandledScreenAccessor)handledScreen).getBackgroundWidth(); int h = ((HandledScreenAccessor)handledScreen).getBackgroundHeight(); if (h > 166) --h; // why is this even a thing - this.x = x + this.index % 6 * 28 + 4; - this.y = this.index < 6 ? y - 28 : y + h - 4; + // this.x = x + this.index % 6 * 28 + 4; + this.setX(x + this.index % 6 * 28 + 4); + // this.y = this.index < 6 ? y - 28 : y + h - 4; + this.setY(this.index < 6 ? y - 28 : y + h - 4); this.u = 28; this.v = (index < 6 ? 0 : 64) + (toggled ? 32 : 0); } @@ -60,7 +62,8 @@ public class QuickNavButton extends ClickableWidget { public void onClick(double mouseX, double mouseY) { if (!this.toggled) { this.toggled = true; - CLIENT.player.sendChatMessage(command, Text.of(command)); + // CLIENT.player.sendChatMessage(command, Text.of(command)); + CLIENT.player.sendMessage(Text.of(command)); } } @@ -72,21 +75,28 @@ public class QuickNavButton extends ClickableWidget { // render button background if (!this.toggled) { if (this.index >= 6) - this.drawTexture(matrices, this.x, this.y + 4, this.u, this.v + 4, this.width, this.height - 4); + // this.drawTexture(matrices, this.x, this.y + 4, this.u, this.v + 4, this.width, this.height - 4); + this.drawTexture(matrices, this.getX(), this.getY() + 4, this.u, this.v + 4, this.width, this.height - 4); else - this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height - 4); - } else this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height); + // this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height - 4); + this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height - 4); + // } else this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height); + } else this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height); // render button icon if (!this.toggled) { if (this.index >= 6) - CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); + // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 6); else - CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); + // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 9); } else { if (this.index >= 6) - CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); + // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 9); else - CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); + // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 6); } RenderSystem.enableDepthTest(); } -- cgit From ce27cbf8a193bda4bef348de017255d9a20f9274 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Fri, 20 Jan 2023 22:04:54 +0100 Subject: fix the registry thingy and add todos --- .../java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index 985cbd22..d977a400 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -64,6 +64,7 @@ public class QuickNavButton extends ClickableWidget { this.toggled = true; // CLIENT.player.sendChatMessage(command, Text.of(command)); CLIENT.player.sendMessage(Text.of(command)); + // TODO : add null check with log error } } -- cgit From 93aeeb903f80d87b35553bbb1b29ae7472e679cb Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 16 Mar 2023 20:01:36 -0400 Subject: Fix Recipe Book Crash --- .../skyblocker/skyblock/quicknav/QuickNavButton.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index d977a400..d976b86b 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -1,6 +1,7 @@ package me.xmrvizzy.skyblocker.skyblock.quicknav; import com.mojang.blaze3d.systems.RenderSystem; + import me.xmrvizzy.skyblocker.mixin.HandledScreenAccessor; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -11,7 +12,6 @@ import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder; import net.minecraft.client.gui.widget.ClickableWidget; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.item.ItemStack; -import net.minecraft.text.LiteralTextContent; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -20,11 +20,6 @@ public class QuickNavButton extends ClickableWidget { private static final MinecraftClient CLIENT = MinecraftClient.getInstance(); private static final Identifier BUTTON_TEXTURE = new Identifier("textures/gui/container/creative_inventory/tabs.png"); - @Override - public void appendNarrations(NarrationMessageBuilder builder) { - - } - private int index; private boolean toggled; private int u; @@ -101,4 +96,10 @@ public class QuickNavButton extends ClickableWidget { } RenderSystem.enableDepthTest(); } + + @Override + protected void appendClickableNarrations(NarrationMessageBuilder builder) { + // TODO Auto-generated method stub + + } } -- cgit From 48f747d47a97c71ccdb9cc4733a38e7debdd49cc Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 16 Mar 2023 20:25:01 -0400 Subject: Fix QuickNav Button Positions --- .../skyblocker/skyblock/quicknav/QuickNavButton.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index d976b86b..de609c52 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -28,7 +28,7 @@ public class QuickNavButton extends ClickableWidget { private final ItemStack icon; public QuickNavButton(int index, boolean toggled, String command, ItemStack icon) { - super(0, 0, 28, 32, Text.empty()); + super(0, 0, 26, 32, Text.empty()); this.index = index; this.toggled = toggled; this.command = command; @@ -45,10 +45,10 @@ public class QuickNavButton extends ClickableWidget { int h = ((HandledScreenAccessor)handledScreen).getBackgroundHeight(); if (h > 166) --h; // why is this even a thing // this.x = x + this.index % 6 * 28 + 4; - this.setX(x + this.index % 6 * 28 + 4); + this.setX(x + this.index % 6 * 26 + 4); // this.y = this.index < 6 ? y - 28 : y + h - 4; - this.setY(this.index < 6 ? y - 28 : y + h - 4); - this.u = 28; + this.setY(this.index < 6 ? y - 26 : y + h - 4); + this.u = 26; this.v = (index < 6 ? 0 : 64) + (toggled ? 32 : 0); } } @@ -68,6 +68,9 @@ public class QuickNavButton extends ClickableWidget { this.updateCoordinates(); RenderSystem.setShaderTexture(0, BUTTON_TEXTURE); RenderSystem.disableDepthTest(); + //Move buttons 1 pixel up + matrices.push(); + matrices.translate(0f, -1f, 0f); // render button background if (!this.toggled) { if (this.index >= 6) @@ -78,6 +81,7 @@ public class QuickNavButton extends ClickableWidget { this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height - 4); // } else this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height); } else this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height); + matrices.pop(); // render button icon if (!this.toggled) { if (this.index >= 6) -- cgit From 0b40408151b1c6552d6baffcb9af7033e0ac64a5 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 16 Mar 2023 20:30:48 -0400 Subject: Fix QuickNav Icon Positions --- .../me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index de609c52..c60dec3c 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -86,17 +86,17 @@ public class QuickNavButton extends ClickableWidget { if (!this.toggled) { if (this.index >= 6) // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 6); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 5); else // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 9); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 8); } else { if (this.index >= 6) // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 9); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 8); else // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 6, this.getY() + 6); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 5); } RenderSystem.enableDepthTest(); } -- cgit From d27e15f8f346e9859edf5d034d258462e5a4871c Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 16 Mar 2023 20:40:07 -0400 Subject: Properly send commands over the network --- .../skyblocker/skyblock/quicknav/QuickNav.java | 20 ++++++++++---------- .../skyblocker/skyblock/quicknav/QuickNavButton.java | 3 +-- 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java index bcc57a00..9c1ed300 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java @@ -14,19 +14,19 @@ public class QuickNav { public static List init(String screenTitle) { List buttons = new ArrayList<>(); try { - buttons.add(new QuickNavButton(0, screenTitle.contains("Your Skills"), "/skills", new ItemStack(Items.DIAMOND_SWORD))); - buttons.add(new QuickNavButton(1, screenTitle.contains("Collection"), "/collection", new ItemStack(Items.PAINTING))); + buttons.add(new QuickNavButton(0, screenTitle.contains("Your Skills"), "skills", new ItemStack(Items.DIAMOND_SWORD))); + buttons.add(new QuickNavButton(1, screenTitle.contains("Collection"), "collection", new ItemStack(Items.PAINTING))); - buttons.add(new QuickNavButton(3, screenTitle.contains("Pets"), "/pets", new ItemStack(Items.BONE))); - buttons.add(new QuickNavButton(4, screenTitle.contains("Wardrobe"), "/wardrobe", ItemStack.fromNbt(StringNbtReader.parse("{id:\"minecraft:leather_chestplate\", Count:1, tag:{display:{color:8991416}}}")))); - buttons.add(new QuickNavButton(5, screenTitle.contains("Storage"), "/storage", new ItemStack(Items.ENDER_CHEST))); + buttons.add(new QuickNavButton(3, screenTitle.contains("Pets"), "pets", new ItemStack(Items.BONE))); + buttons.add(new QuickNavButton(4, screenTitle.contains("Wardrobe"), "wardrobe", ItemStack.fromNbt(StringNbtReader.parse("{id:\"minecraft:leather_chestplate\", Count:1, tag:{display:{color:8991416}}}")))); + buttons.add(new QuickNavButton(5, screenTitle.contains("Storage"), "storage", new ItemStack(Items.ENDER_CHEST))); - buttons.add(new QuickNavButton(6, false, "/warp hub", ItemStack.fromNbt(StringNbtReader.parse(skyblockHubIconNbt)))); - buttons.add(new QuickNavButton(7, false, "/warp dungeon_hub", ItemStack.fromNbt(StringNbtReader.parse(dungeonHubIconNbt)))); + buttons.add(new QuickNavButton(6, false, "warp hub", ItemStack.fromNbt(StringNbtReader.parse(skyblockHubIconNbt)))); + buttons.add(new QuickNavButton(7, false, "warp dungeon_hub", ItemStack.fromNbt(StringNbtReader.parse(dungeonHubIconNbt)))); - buttons.add(new QuickNavButton(9, screenTitle.contains("Enchant Item"), "/etable", new ItemStack(Items.ENCHANTING_TABLE))); - buttons.add(new QuickNavButton(10, screenTitle.contains("Anvil"), "/anvil", new ItemStack(Items.ANVIL))); - buttons.add(new QuickNavButton(11, screenTitle.contains("Craft Item"), "/craft", new ItemStack(Items.CRAFTING_TABLE))); + buttons.add(new QuickNavButton(9, screenTitle.contains("Enchant Item"), "etable", new ItemStack(Items.ENCHANTING_TABLE))); + buttons.add(new QuickNavButton(10, screenTitle.contains("Anvil"), "anvil", new ItemStack(Items.ANVIL))); + buttons.add(new QuickNavButton(11, screenTitle.contains("Craft Item"), "craft", new ItemStack(Items.CRAFTING_TABLE))); } catch (CommandSyntaxException e) { e.printStackTrace(); } diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index c60dec3c..3317a54f 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -57,8 +57,7 @@ public class QuickNavButton extends ClickableWidget { public void onClick(double mouseX, double mouseY) { if (!this.toggled) { this.toggled = true; - // CLIENT.player.sendChatMessage(command, Text.of(command)); - CLIENT.player.sendMessage(Text.of(command)); + CLIENT.player.networkHandler.sendCommand(command); // TODO : add null check with log error } } -- cgit From 0e5477d416b836c36df5dd93979e09b5ec389526 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 16 Mar 2023 21:08:38 -0400 Subject: Fix incorrect matrix transformations with selected QuickNav buttons --- .../skyblocker/skyblock/quicknav/QuickNavButton.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index 3317a54f..7e82ecef 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -67,11 +67,11 @@ public class QuickNavButton extends ClickableWidget { this.updateCoordinates(); RenderSystem.setShaderTexture(0, BUTTON_TEXTURE); RenderSystem.disableDepthTest(); - //Move buttons 1 pixel up - matrices.push(); - matrices.translate(0f, -1f, 0f); // render button background if (!this.toggled) { + //Move buttons 1 pixel up if they aren't selected + matrices.push(); + matrices.translate(0f, -1f, 0f); if (this.index >= 6) // this.drawTexture(matrices, this.x, this.y + 4, this.u, this.v + 4, this.width, this.height - 4); this.drawTexture(matrices, this.getX(), this.getY() + 4, this.u, this.v + 4, this.width, this.height - 4); @@ -79,8 +79,14 @@ public class QuickNavButton extends ClickableWidget { // this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height - 4); this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height - 4); // } else this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height); - } else this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height); - matrices.pop(); + matrices.pop(); + } else { + matrices.push(); + //Move the top buttons 2 pixels up if they're selected + if (this.index <= 6) matrices.translate(0f, -2f, 0f); + this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height); + matrices.pop(); + } // render button icon if (!this.toggled) { if (this.index >= 6) -- cgit From 09fe38a0249434a64324056fd989d3298ca83e35 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 16 Mar 2023 21:24:57 -0400 Subject: Fix another incorrect matrix transformation --- .../java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index 7e82ecef..3123f204 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -83,7 +83,7 @@ public class QuickNavButton extends ClickableWidget { } else { matrices.push(); //Move the top buttons 2 pixels up if they're selected - if (this.index <= 6) matrices.translate(0f, -2f, 0f); + if (this.index < 6) matrices.translate(0f, -2f, 0f); this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height); matrices.pop(); } -- cgit From 542e60cb90c4c0cdc932f3cfb3529ea33a2f2970 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Fri, 17 Mar 2023 01:30:40 -0400 Subject: Fix Quiz Answer + Support for #111 --- .../java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java | 7 ++++--- .../me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java index 9c1ed300..62f8c34d 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java @@ -1,13 +1,14 @@ package me.xmrvizzy.skyblocker.skyblock.quicknav; +import java.util.ArrayList; +import java.util.List; + import com.mojang.brigadier.exceptions.CommandSyntaxException; + import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.nbt.StringNbtReader; -import java.util.ArrayList; -import java.util.List; - public class QuickNav { private static final String skyblockHubIconNbt = "{id:\"minecraft:player_head\",Count:1,tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}}"; private static final String dungeonHubIconNbt = "{id:\"minecraft:player_head\",Count:1,tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}}"; diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index 3123f204..e1ac3c5f 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -57,7 +57,7 @@ public class QuickNavButton extends ClickableWidget { public void onClick(double mouseX, double mouseY) { if (!this.toggled) { this.toggled = true; - CLIENT.player.networkHandler.sendCommand(command); + CLIENT.player.networkHandler.sendCommand(command.replace("/", "")); // TODO : add null check with log error } } -- cgit From 04803739ea50d7cf905c7457c428c0e5586c0e3e Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Sat, 18 Mar 2023 03:55:04 -0400 Subject: Adjust position of buttons to match creative inventory better --- .../skyblocker/skyblock/quicknav/QuickNavButton.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java index e1ac3c5f..f35e60b2 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNavButton.java @@ -69,17 +69,13 @@ public class QuickNavButton extends ClickableWidget { RenderSystem.disableDepthTest(); // render button background if (!this.toggled) { - //Move buttons 1 pixel up if they aren't selected - matrices.push(); - matrices.translate(0f, -1f, 0f); if (this.index >= 6) // this.drawTexture(matrices, this.x, this.y + 4, this.u, this.v + 4, this.width, this.height - 4); this.drawTexture(matrices, this.getX(), this.getY() + 4, this.u, this.v + 4, this.width, this.height - 4); else // this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height - 4); - this.drawTexture(matrices, this.getX(), this.getY(), this.u, this.v, this.width, this.height - 4); + this.drawTexture(matrices, this.getX(), this.getY() - 2, this.u, this.v, this.width, this.height - 4); // } else this.drawTexture(matrices, this.x, this.y, this.u, this.v, this.width, this.height); - matrices.pop(); } else { matrices.push(); //Move the top buttons 2 pixels up if they're selected @@ -91,17 +87,17 @@ public class QuickNavButton extends ClickableWidget { if (!this.toggled) { if (this.index >= 6) // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 5); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 6); else // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 8); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 7); } else { if (this.index >= 6) // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 9); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 8); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 9); else // CLIENT.getItemRenderer().renderInGui(this.icon,this.x + 6, this.y + 6); - CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 5); + CLIENT.getItemRenderer().renderInGui(this.icon,this.getX() + 5, this.getY() + 6); } RenderSystem.enableDepthTest(); } -- cgit