diff options
author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-14 11:13:53 +0200 |
---|---|---|
committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-14 11:13:53 +0200 |
commit | b2108f37f551fba5cb43f4919d69e5db7bb1e44c (patch) | |
tree | 04efb1b7815e2e8625ed00810bee711ca2a132a7 /src/main/java/at/lorenz/mod/items | |
parent | 26c36ab5f0135b50dbe0a983023d80504e2f66b4 (diff) | |
download | skyhanni-b2108f37f551fba5cb43f4919d69e5db7bb1e44c.tar.gz skyhanni-b2108f37f551fba5cb43f4919d69e5db7bb1e44c.tar.bz2 skyhanni-b2108f37f551fba5cb43f4919d69e5db7bb1e44c.zip |
remove old skytils code
Diffstat (limited to 'src/main/java/at/lorenz/mod/items')
-rw-r--r-- | src/main/java/at/lorenz/mod/items/ItemDisplayOverlayFeatures.kt | 3 | ||||
-rw-r--r-- | src/main/java/at/lorenz/mod/items/abilitycooldown/ItemAbilityCooldown.kt | 91 |
2 files changed, 1 insertions, 93 deletions
diff --git a/src/main/java/at/lorenz/mod/items/ItemDisplayOverlayFeatures.kt b/src/main/java/at/lorenz/mod/items/ItemDisplayOverlayFeatures.kt index c07b2fff4..3d16af280 100644 --- a/src/main/java/at/lorenz/mod/items/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/lorenz/mod/items/ItemDisplayOverlayFeatures.kt @@ -17,10 +17,9 @@ class ItemDisplayOverlayFeatures { @SubscribeEvent fun onRenderItemOverlayPost(event: GuiRenderItemEvent.RenderOverlayEvent.Post) { - val item = event.stack ?: return - if (!LorenzUtils.inSkyblock || item.stackSize != 1 || item.tagCompound?.hasKey("SkytilsNoItemOverlay") == true) return + if (!LorenzUtils.inSkyblock || item.stackSize != 1) return val stackTip = getStackTip(item) diff --git a/src/main/java/at/lorenz/mod/items/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/lorenz/mod/items/abilitycooldown/ItemAbilityCooldown.kt index 2a0c215ab..6f4648817 100644 --- a/src/main/java/at/lorenz/mod/items/abilitycooldown/ItemAbilityCooldown.kt +++ b/src/main/java/at/lorenz/mod/items/abilitycooldown/ItemAbilityCooldown.kt @@ -98,7 +98,6 @@ class ItemAbilityCooldown { if (!isEnabled()) return val item = event.stack ?: return -// if (item.stackSize != 1 || item.tagCompound?.hasKey("SkytilsNoItemOverlay") == true) return if (item.stackSize != 1) return var stackTip = "" @@ -125,96 +124,6 @@ class ItemAbilityCooldown { } } -// @SubscribeEvent -// fun onRenderItemOverlayPost(event: GuiRenderItemEvent.RenderOverlayEvent.Pre) { -// if (!isEnabled()) return -// -// val item = event.stack ?: return -//// if (item.stackSize != 1 || item.tagCompound?.hasKey("SkytilsNoItemOverlay") == true) return -// if (item.stackSize != 1) return -// -// var stackTip = "" -// -// val isActive = Minecraft.getMinecraft().currentScreen == null -// val itemText = items.filter { it.key == item && it.value.active } -// .firstNotNullOfOrNull { it.value } -// -// if (itemText != null) return -//// if (!isActive && !itemText.active) return -// -// stackTip = "T" -// -//// items.filter { it.key == item } -//// .forEach { stackTip = it.value.color.getChatColor() + it.value.text } -// -// if (stackTip.isNotEmpty()) { -// GlStateManager.disableLighting() -// GlStateManager.disableDepth() -// GlStateManager.disableBlend() -// event.fr.drawStringWithShadow( -// stackTip, -// (event.x + 17 - event.fr.getStringWidth(stackTip)).toFloat(), -// (event.y + 9).toFloat(), -// 16777215 -// ) -// GlStateManager.enableLighting() -// GlStateManager.enableDepth() -// } -// } - -// @SubscribeEvent -// fun onGuiDrawEvent(event: GuiContainerEvent.BackgroundDrawnEvent) { -// if (!isEnabled()) -// -// val guiContainer: GuiContainer? = event.gui -// if (guiContainer != null && guiContainer !is GuiInventory) return -// val chest = guiContainer.inventorySlots -// -//// val chestName = chest.lowerChestInventory.displayName.unformattedText.trim() -//// if (chestName != "Spirit Leap") return -// -// for (slot in chest.inventorySlots) { -// if (slot == null) continue -//// if (slot.slotNumber == slot.slotIndex) continue -// if (slot.stack == null) continue -// -// val stack = slot.stack -// -//// for ((item, text) in map) { -//// if (item == stack) { -//// slot highlight text.color -//// } -//// } -// map.filter { it.key == stack }.forEach { slot highlight it.value.color } -// -//// slot highlight LorenzColor.WHITE -// -//// val displayName = stack.displayName -//// if (displayName == " ") continue -// -//// val itemLore = stack.getLore() -//// if (itemLore.size == 1 && itemLore[0] == "§eClick to teleport!") { -//// -//// if (displayName.contains(witherDoorName)) { -//// if (lastWitherDoorOpened + 10_000 > System.currentTimeMillis()) { -//// slot highlight LorenzColor.YELLOW -//// return -//// } -//// } -//// if (displayName.contains(teleportName)) { -//// if (lastTeleport + 10_000 > System.currentTimeMillis()) { -//// slot highlight LorenzColor.AQUA -//// return -//// } -//// } -//// } else { -//// //TODO hide the item totally? -//// slot highlight LorenzColor.RED -//// } -// -// } -// } - private fun hasAbility(itemName: String): Ability? { for (ability in Ability.values()) { for (name in ability.itemNames) { |