Skip to content

Commit

Permalink
Make all warps unlocked in fancy warp menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ILikePlayingGames committed Aug 19, 2022
1 parent de64eaf commit 2e63017
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package codes.biscuit.skyblockaddons.gui.buttons;

import codes.biscuit.skyblockaddons.SkyblockAddons;
import codes.biscuit.skyblockaddons.gui.IslandWarpGui;
import codes.biscuit.skyblockaddons.utils.ColorCode;
import codes.biscuit.skyblockaddons.utils.ColorUtils;
Expand Down Expand Up @@ -35,7 +34,7 @@ public IslandButton(IslandWarpGui.Island island, IslandWarpGui.UnlockedStatus un
super(0, island.getX(), island.getY(), island.getLabel());

this.island = island;
this.unlockedStatus = unlockedStatus;
this.unlockedStatus = IslandWarpGui.UnlockedStatus.UNLOCKED;
this.markers = markers;

for (IslandWarpGui.Marker marker : IslandWarpGui.Marker.values()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package codes.biscuit.skyblockaddons.gui.buttons;

import codes.biscuit.skyblockaddons.asm.hooks.GuiChestHook;
import codes.biscuit.skyblockaddons.gui.IslandWarpGui;
import codes.biscuit.skyblockaddons.utils.ColorCode;
import codes.biscuit.skyblockaddons.utils.ColorUtils;
Expand Down Expand Up @@ -33,6 +32,7 @@ public IslandMarkerButton(IslandWarpGui.Marker marker) {

public void drawButton(float islandX, float islandY, float expansion, boolean hovered, boolean islandUnlocked, IslandWarpGui.UnlockedStatus status) {
Minecraft mc = Minecraft.getMinecraft();
status = IslandWarpGui.UnlockedStatus.UNLOCKED;

float width = 50*expansion;
float height = width*(100/81F); // Ratio is 81w : 100h
Expand All @@ -43,15 +43,8 @@ public void drawButton(float islandX, float islandY, float expansion, boolean ho
this.centerX = centerX;
this.centerY = centerY;

/*
Assume crystal hollows and forge are unlocked for non-MVP+ players due to a Hypixel bug that causes those warps
to not show in the menu even when unlocked.
*/
this.unlocked = status == IslandWarpGui.UnlockedStatus.UNLOCKED ||
status == IslandWarpGui.UnlockedStatus.IN_COMBAT ||
(!GuiChestHook.getIslandWarpGui().isFoundAdvancedWarpToggle() &&
(marker == IslandWarpGui.Marker.CRYSTAL_HOLLOWS ||
marker == IslandWarpGui.Marker.DWARVEN_FORGE));
status == IslandWarpGui.UnlockedStatus.IN_COMBAT;

float x = centerX-(width/2);
float y = centerY-(height/2);
Expand Down

0 comments on commit 2e63017

Please sign in to comment.