diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-12-11 18:03:57 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-12-11 18:03:57 -0500 |
commit | 47910bc70961bd39d43cfdcbee103949559459c1 (patch) | |
tree | 28f58dd4128f088f0b9b748dbdddf519b51ef5b3 /src/main/java/me/Danker | |
parent | cb031baf2483db2eedfcd37262a792ec9fe3adf8 (diff) | |
download | SkyblockMod-47910bc70961bd39d43cfdcbee103949559459c1.tar.gz SkyblockMod-47910bc70961bd39d43cfdcbee103949559459c1.tar.bz2 SkyblockMod-47910bc70961bd39d43cfdcbee103949559459c1.zip |
Fix crash with NEU
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 492598c..64a1f5b 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -74,7 +74,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta2"; + public static final String VERSION = "1.8.5-beta3"; static double checkItemsNow = 0; static double itemsChecked = 0; @@ -2277,10 +2277,6 @@ public class DankersSkyblockMod IInventory inv = chest.getLowerChestInventory(); String chestName = inv.getDisplayName().getUnformattedText(); - if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { - event.toolTip.clear(); - } - if (ToggleCommand.superpairsToggled && chestName.contains("Superpairs (")) { if (Item.getIdFromItem(item.getItem()) != 95) return; if (item.getDisplayName().contains("Click any button") || item.getDisplayName().contains("Click a second button") || item.getDisplayName().contains("Next button is instantly rewarded") || item.getDisplayName().contains("Stained Glass")) { @@ -2300,10 +2296,28 @@ public class DankersSkyblockMod } } - } - + } } + @SubscribeEvent(priority = EventPriority.LOW) + public void onTooltipLow(ItemTooltipEvent event) { + if (!Utils.inSkyblock) return; + if (event.toolTip == null) return; + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + + if (mc.currentScreen instanceof GuiChest) { + ContainerChest chest = (ContainerChest) player.openContainer; + IInventory inv = chest.getLowerChestInventory(); + String chestName = inv.getDisplayName().getUnformattedText(); + + if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { + event.toolTip.clear(); + } + } + } + @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { if (event.phase != Phase.START) return; |