diff options
Diffstat (limited to 'src/main/kotlin/features')
5 files changed, 12 insertions, 27 deletions
diff --git a/src/main/kotlin/features/debug/itemeditor/PromptScreen.kt b/src/main/kotlin/features/debug/itemeditor/PromptScreen.kt deleted file mode 100644 index 187b70b..0000000 --- a/src/main/kotlin/features/debug/itemeditor/PromptScreen.kt +++ /dev/null @@ -1,15 +0,0 @@ -package moe.nea.firmament.features.debug.itemeditor - -import io.github.notenoughupdates.moulconfig.gui.CloseEventListener -import io.github.notenoughupdates.moulconfig.gui.GuiComponentWrapper -import io.github.notenoughupdates.moulconfig.gui.GuiContext -import io.github.notenoughupdates.moulconfig.gui.component.CenterComponent -import io.github.notenoughupdates.moulconfig.gui.component.ColumnComponent -import io.github.notenoughupdates.moulconfig.gui.component.PanelComponent -import io.github.notenoughupdates.moulconfig.gui.component.TextComponent -import io.github.notenoughupdates.moulconfig.gui.component.TextFieldComponent -import io.github.notenoughupdates.moulconfig.observer.GetSetter -import kotlin.reflect.KMutableProperty0 -import moe.nea.firmament.gui.FirmButtonComponent -import moe.nea.firmament.util.MoulConfigUtils - diff --git a/src/main/kotlin/features/events/carnival/MinesweeperHelper.kt b/src/main/kotlin/features/events/carnival/MinesweeperHelper.kt index cfc05cc..3baf5a5 100644 --- a/src/main/kotlin/features/events/carnival/MinesweeperHelper.kt +++ b/src/main/kotlin/features/events/carnival/MinesweeperHelper.kt @@ -2,7 +2,7 @@ package moe.nea.firmament.features.events.carnival import io.github.notenoughupdates.moulconfig.observer.ObservableList -import io.github.notenoughupdates.moulconfig.platform.ModernItemStack +import io.github.notenoughupdates.moulconfig.platform.MoulConfigPlatform import io.github.notenoughupdates.moulconfig.xml.Bind import java.util.UUID import net.minecraft.block.Blocks @@ -120,7 +120,7 @@ object MinesweeperHelper { .setSkyBlockFirmamentUiId("MINESWEEPER_$name") @Bind - fun getIcon() = ModernItemStack.of(itemStack) + fun getIcon() = MoulConfigPlatform.wrap(itemStack) @Bind fun pieceLabel() = fruitColor.formattingCode + fruitName @@ -158,7 +158,7 @@ object MinesweeperHelper { ; @Bind("itemType") - fun getItemStack() = ModernItemStack.of(ItemStack(itemType)) + fun getItemStack() = MoulConfigPlatform.wrap(ItemStack(itemType)) companion object { val id = SkyblockId("CARNIVAL_SHOVEL") diff --git a/src/main/kotlin/features/inventory/buttons/InventoryButtonEditor.kt b/src/main/kotlin/features/inventory/buttons/InventoryButtonEditor.kt index 1e4f6a3..7334c82 100644 --- a/src/main/kotlin/features/inventory/buttons/InventoryButtonEditor.kt +++ b/src/main/kotlin/features/inventory/buttons/InventoryButtonEditor.kt @@ -2,8 +2,8 @@ package moe.nea.firmament.features.inventory.buttons import io.github.notenoughupdates.moulconfig.common.IItemStack import io.github.notenoughupdates.moulconfig.gui.component.PanelComponent -import io.github.notenoughupdates.moulconfig.platform.ModernItemStack -import io.github.notenoughupdates.moulconfig.platform.ModernRenderContext +import io.github.notenoughupdates.moulconfig.platform.MoulConfigPlatform +import io.github.notenoughupdates.moulconfig.platform.MoulConfigRenderContext import io.github.notenoughupdates.moulconfig.xml.Bind import me.shedaniel.math.Point import me.shedaniel.math.Rectangle @@ -35,7 +35,7 @@ class InventoryButtonEditor( @Bind fun getItemIcon(): IItemStack { save() - return ModernItemStack.of(InventoryButton.getItemForName(icon)) + return MoulConfigPlatform.wrap(InventoryButton.getItemForName(icon)) } @Bind @@ -197,7 +197,7 @@ class InventoryButtonEditor( context.matrices.pushMatrix() PanelComponent.DefaultBackgroundRenderer.VANILLA .render( - ModernRenderContext(context), + MoulConfigRenderContext(context), lastGuiRect.minX, lastGuiRect.minY, lastGuiRect.width, lastGuiRect.height, ) diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt index 0baa099..a023ce6 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt @@ -181,7 +181,7 @@ class StorageOverlayScreen : Screen(Text.literal("")) { val searchField = TextFieldComponent( searchText, 100, GetSetter.constant(true), tr("firmament.storage-overlay.search.suggestion", "Search...").string, - IMinecraft.instance.defaultFontRenderer + IMinecraft.INSTANCE.defaultFontRenderer ) val controlComponent = PanelComponent( ColumnComponent( @@ -383,7 +383,7 @@ class StorageOverlayScreen : Screen(Text.literal("")) { controlComponent, measurements.controlX, measurements.controlY, CONTROL_WIDTH, CONTROL_HEIGHT, - KeyboardEvent.KeyPressed(keyCode, false) + KeyboardEvent.KeyPressed(keyCode, scanCode, false) ) ) { return true @@ -400,7 +400,7 @@ class StorageOverlayScreen : Screen(Text.literal("")) { controlComponent, measurements.controlX, measurements.controlY, CONTROL_WIDTH, CONTROL_HEIGHT, - KeyboardEvent.KeyPressed(keyCode, true) + KeyboardEvent.KeyPressed(keyCode, scanCode, true) ) ) { return true diff --git a/src/main/kotlin/features/mining/MiningBlockInfoUi.kt b/src/main/kotlin/features/mining/MiningBlockInfoUi.kt index e8ea4f4..5b58d4f 100644 --- a/src/main/kotlin/features/mining/MiningBlockInfoUi.kt +++ b/src/main/kotlin/features/mining/MiningBlockInfoUi.kt @@ -2,7 +2,7 @@ package moe.nea.firmament.features.mining import io.github.notenoughupdates.moulconfig.observer.ObservableList import io.github.notenoughupdates.moulconfig.observer.Property -import io.github.notenoughupdates.moulconfig.platform.ModernItemStack +import io.github.notenoughupdates.moulconfig.platform.MoulConfigPlatform import io.github.notenoughupdates.moulconfig.xml.Bind import net.minecraft.client.gui.screen.Screen import net.minecraft.item.ItemStack @@ -31,7 +31,7 @@ object MiningBlockInfoUi { class BlockInfo(val block: MiningRepoData.Block189, val info: MiningInfo) { @get:Bind("item") - val item = ModernItemStack.of(block.block?.let { ItemStack(it) } ?: ItemStack.EMPTY) + val item = MoulConfigPlatform.wrap(block.block?.let { ItemStack(it) } ?: ItemStack.EMPTY) @get:Bind("isSelected") val isSelected get() = info.search.let { block.isActiveIn(SkyBlockIsland.forMode(it)) } |
