9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2025-12-23 08:59:24 +00:00

Updated to ecomponent 1.3.0

This commit is contained in:
Auxilor
2022-11-09 15:07:18 +00:00
parent 94394ecaec
commit 1dc15fcb53
2 changed files with 8 additions and 12 deletions

View File

@@ -47,7 +47,7 @@ allprojects {
dependencies {
compileOnly 'com.willfp:eco:6.46.0'
implementation 'com.willfp:libreforge:3.118.0'
implementation 'com.willfp:ecomponent:1.2.0'
implementation 'com.willfp:ecomponent:1.3.0'
implementation 'org.joml:joml:1.10.4'
compileOnly 'org.jetbrains:annotations:23.0.0'

View File

@@ -21,9 +21,7 @@ import com.willfp.eco.core.items.isEmpty
import com.willfp.eco.core.price.ConfiguredPrice
import com.willfp.eco.core.sound.PlayableSound
import com.willfp.ecomponent.CaptiveItem
import com.willfp.ecomponent.MenuStateVar
import com.willfp.ecomponent.NotNullMenuStateVar
import com.willfp.ecomponent.lazyWithReceiver
import com.willfp.ecomponent.menuStateVar
import com.willfp.ecomponent.setSlot
import com.willfp.reforges.reforges.PriceMultipliers
import com.willfp.reforges.reforges.Reforge
@@ -48,15 +46,13 @@ private data class ReforgeGUIStatus(
private class ReforgePriceChangeEvent : MenuEvent
private val Menu.reforgeStatus by lazyWithReceiver<Menu, MenuStateVar<ReforgeGUIStatus>> {
NotNullMenuStateVar(
this, "reforge_status", ReforgeGUIStatus(
ReforgeStatus.NO_ITEM,
ConfiguredPrice.createOrFree(emptyConfig()),
false
)
private val Menu.reforgeStatus by menuStateVar(
ReforgeGUIStatus(
ReforgeStatus.NO_ITEM,
ConfiguredPrice.createOrFree(emptyConfig()),
false
)
}
)
private class IndicatorSlot(
plugin: EcoPlugin