aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
diff options
context:
space:
mode:
authorAppability <appable@icloud.com>2023-01-11 21:06:21 -0800
committerAppability <appable@icloud.com>2023-01-11 21:06:21 -0800
commit6f20dde529a1db8f7590ab2521776b541ea88947 (patch)
treece49218f64dc7936380db74b4be2b0430bd08bc3 /src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
parente87a8136ec9e980f9ea735a45685a6e0c71adf1f (diff)
downloadAmbientAddons-patch.tar.gz
AmbientAddons-patch.tar.bz2
AmbientAddons-patch.zip
change to metadata (dyeDamage seems to be 15 minus metadata? confusing)patch
also add another trapper thing
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt')
-rw-r--r--src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt b/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
index 0d1f62d..4ff7761 100644
--- a/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
+++ b/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
@@ -7,6 +7,7 @@ import com.ambientaddons.utils.Extensions.chest
import com.ambientaddons.utils.Extensions.items
import com.ambientaddons.utils.Extensions.stripControlCodes
import com.ambientaddons.utils.SBLocation
+import gg.essential.universal.UChat
import net.minecraft.item.EnumDyeColor
import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.client.event.GuiOpenEvent
@@ -63,8 +64,8 @@ object MelodyHelper {
val chest = event.gui.chest?.lowerChestInventory
if (chest?.name != "Click the button on time!" || isThrottled) return
val colors = chest.items.map { it?.itemDamage }
- val targetPaneCol = colors.indexOf(EnumDyeColor.MAGENTA.dyeDamage)
- val movingPaneIndex = colors.indexOf(EnumDyeColor.LIME.dyeDamage)
+ val targetPaneCol = colors.indexOf(EnumDyeColor.MAGENTA.metadata)
+ val movingPaneIndex = colors.indexOf(EnumDyeColor.LIME.metadata)
val movingPaneCol = movingPaneIndex % 9
val clickSlot = (movingPaneIndex / 9) * 9 + 7
if (targetPaneCol != movingPaneCol) {