aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-07-17 11:52:28 +0200
committerLinnea Gräf <nea@nea.moe>2025-07-17 11:52:28 +0200
commit25f0e7fd62db22036969120843165f4759530b8f (patch)
tree262ed44e0e68464ba99f7650fed8df102c982fe5
parent13d64762bbf110fbc52719fb9d93490648199dd2 (diff)
downloadFirmament-25f0e7fd62db22036969120843165f4759530b8f.tar.gz
Firmament-25f0e7fd62db22036969120843165f4759530b8f.tar.bz2
Firmament-25f0e7fd62db22036969120843165f4759530b8f.zip
feat: Launch on 1.21.7
-rw-r--r--build.gradle.kts6
-rw-r--r--gradle/libs.versions.toml45
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--src/compat/jade/java/moe/nea/firmament/compat/jade/DrillToolProvider.kt35
-rw-r--r--src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/ElementAccessor.java12
-rw-r--r--src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt8
-rw-r--r--src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBKatRecipe.kt174
-rw-r--r--src/main/java/moe/nea/firmament/mixins/HideStatusEffectsPatch.java13
-rw-r--r--src/main/java/moe/nea/firmament/mixins/MixinHandledScreen.java8
-rw-r--r--src/main/java/moe/nea/firmament/mixins/PlayerDropEventPatch.java2
-rw-r--r--src/main/java/moe/nea/firmament/mixins/WorldRenderLastEventPatch.java4
-rw-r--r--src/main/java/moe/nea/firmament/mixins/feature/devcosmetics/CustomCapeFeatureRenderer.java2
-rw-r--r--src/main/kotlin/features/chat/ChatLinks.kt12
-rw-r--r--src/main/kotlin/features/debug/ExportedTestConstantMeta.kt2
-rw-r--r--src/main/kotlin/features/debug/itemeditor/LegacyItemData.kt7
-rw-r--r--src/main/kotlin/features/debug/itemeditor/LegacyItemExporter.kt2
-rw-r--r--src/main/kotlin/features/diana/AncestralSpadeSolver.kt6
-rw-r--r--src/main/kotlin/features/events/anniversity/AnniversaryFeatures.kt3
-rw-r--r--src/main/kotlin/features/fixes/Fixes.kt7
-rw-r--r--src/main/kotlin/features/inventory/ItemRarityCosmetics.kt3
-rw-r--r--src/main/kotlin/features/inventory/PetFeatures.kt62
-rw-r--r--src/main/kotlin/features/inventory/REIDependencyWarner.kt2
-rw-r--r--src/main/kotlin/features/inventory/SlotLocking.kt4
-rw-r--r--src/main/kotlin/features/inventory/buttons/InventoryButtonEditor.kt38
-rw-r--r--src/main/kotlin/features/inventory/buttons/InventoryButtons.kt6
-rw-r--r--src/main/kotlin/features/inventory/storageoverlay/StorageOverviewScreen.kt6
-rw-r--r--src/main/kotlin/features/items/BonemerangOverlay.kt7
-rw-r--r--src/main/kotlin/features/macros/ComboProcessor.kt11
-rw-r--r--src/main/kotlin/features/macros/RadialMenu.kt17
-rw-r--r--src/main/kotlin/features/mining/PickaxeAbility.kt8
-rw-r--r--src/main/kotlin/features/mining/PristineProfitTracker.kt3
-rw-r--r--src/main/kotlin/features/misc/CustomCapes.kt48
-rw-r--r--src/main/kotlin/features/misc/Hud.kt19
-rw-r--r--src/main/kotlin/features/world/FairySouls.kt1
-rw-r--r--src/main/kotlin/features/world/Waypoints.kt3
-rw-r--r--src/main/kotlin/gui/BarComponent.kt4
-rw-r--r--src/main/kotlin/gui/CheckboxComponent.kt3
-rw-r--r--src/main/kotlin/gui/config/HudMetaHandler.kt14
-rw-r--r--src/main/kotlin/gui/config/JAnyHud.kt71
-rw-r--r--src/main/kotlin/gui/config/ManagedConfig.kt7
-rw-r--r--src/main/kotlin/gui/entity/EntityRenderer.kt7
-rw-r--r--src/main/kotlin/gui/hud/MoulConfigHud.kt10
-rw-r--r--src/main/kotlin/repo/ItemCache.kt5
-rw-r--r--src/main/kotlin/repo/MiningRepoData.kt3
-rw-r--r--src/main/kotlin/util/FragmentGuiScreen.kt10
-rw-r--r--src/main/kotlin/util/MC.kt5
-rw-r--r--src/main/kotlin/util/MoulConfigFragment.kt6
-rw-r--r--src/main/kotlin/util/MoulConfigUtils.kt6
-rw-r--r--src/main/kotlin/util/mc/ItemUtil.kt30
-rw-r--r--src/main/kotlin/util/render/CustomRenderLayers.kt10
-rw-r--r--src/main/kotlin/util/render/DrawContextExt.kt85
-rw-r--r--src/main/kotlin/util/render/FacingThePlayerContext.kt5
-rw-r--r--src/main/kotlin/util/render/RenderCircleProgress.kt14
-rw-r--r--src/main/kotlin/util/render/RenderInWorldContext.kt25
-rw-r--r--src/main/kotlin/util/render/TranslatedScissors.kt28
-rw-r--r--src/main/resources/firmament.accesswidener3
-rw-r--r--src/test/kotlin/testutil/ItemResources.kt2
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalArmorOverrides.kt4
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomScreenLayouts.kt3
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/StringMatcher.kt265
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/SkullPredicate.kt2
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/CustomSkullTexturePatch.java4
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/SupplyFakeModelPatch.java6
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ReplaceAnvilScreen.java6
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ReplaceFurnaceBackgrounds.java5
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ReplacePlayerBackgrounds.java11
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/screenlayouts/ReplaceTextColorInHandledScreen.java17
67 files changed, 698 insertions, 566 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index c8bdfdb..9b28c22 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -27,10 +27,8 @@ plugins {
alias(libs.plugins.kotlin.plugin.serialization)
alias(libs.plugins.kotlin.plugin.powerassert)
alias(libs.plugins.kotlin.plugin.ksp)
- // alias(libs.plugins.loom)
+ alias(libs.plugins.loom)
alias(libs.plugins.shadow) apply false
- // TODO: use arch loom once they update to 1.8
- id("fabric-loom") version "1.10.1"
id("firmament.common")
id("firmament.license-management")
alias(libs.plugins.mcAutoTranslations)
@@ -197,7 +195,7 @@ val explosiveEnhancementSourceSet =
val wildfireGenderSourceSet = createIsolatedSourceSet("wildfireGender")
val jadeSourceSet = createIsolatedSourceSet("jade")
val modmenuSourceSet = createIsolatedSourceSet("modmenu")
-val reiSourceSet = createIsolatedSourceSet("rei")
+val reiSourceSet = createIsolatedSourceSet("rei", isEnabled = false)
val moulconfigSourceSet = createIsolatedSourceSet("moulconfig")
val customTexturesSourceSet = createIsolatedSourceSet("texturePacks", "texturePacks")
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index d4ff2c4..46dc698 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,42 +3,41 @@
# SPDX-License-Identifier: CC0-1.0
[versions]
-minecraft = "1.21.5"
+minecraft = "1.21.7"
+# Update from https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
+fabric_kotlin = "1.13.2+kotlin.2.1.20"
# Update from https://kotlinlang.org/
kotlin = "2.1.20"
# Update from https://github.com/google/ksp/releases
kotlin_ksp = "2.1.20-2.0.0"
-# Update from https://linkie.shedaniel.me/dependencies?loader=fabric
-fabric_loader = "0.16.13"
-fabric_api = "0.119.9+1.21.5"
-yarn = "1.21.5+build.1"
-modmenu = "14.0.0-rc.2"
-architectury = "16.0.3"
+# Update from https://linkie.shedaniel.dev/dependencies?loader=fabric
+yarn = "1.21.7+build.8"
+fabric_loader = "0.16.14"
+fabric_api = "0.129.0+1.21.7"
+architectury = "17.0.6"
+modmenu = "15.0.0-beta.3"
# Update from https://maven.architectury.dev/me/shedaniel/RoughlyEnoughItems-fabric/ (but is typically late)
rei = "19.0.805"
-# Update from https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
-fabric_kotlin = "1.13.2+kotlin.2.1.20"
-
# Update from https://maven.architectury.dev/dev/architectury/loom/dev.architectury.loom.gradle.plugin/
-loom = "1.7.414" # TODO: port back to architectury (and) 1.9.424
+loom = "1.10.433" # TODO: port back to architectury (and) 1.9.424
# Update from https://modrinth.com/mod/qolify/versions?l=fabric
qolify = "1.6.0-1.21.1"
# Update from https://modrinth.com/mod/sodium/versions?l=fabric
-sodium = "mc1.21.5-0.6.13-fabric"
+sodium = "mc1.21.6-0.6.13-fabric"
# Update from https://modrinth.com/mod/freecam/versions?l=fabric
-freecammod = "1.3.3+mc1.21.5"
+freecammod = "1.3.4+mc1.21.6"
# Update from https://modrinth.com/mod/no-chat-reports/versions?l=fabric
-ncr = "Fabric-1.21.5-v2.12.0"
+ncr = "Fabric-1.21.7-v2.14.0"
# Update from https://modrinth.com/mod/female-gender/versions?l=fabric
-femalegender = "4.3.4+1.21.5"
+femalegender = "4.3.4+1.21.7"
shadow = "8.3.8"
@@ -46,18 +45,18 @@ shadow = "8.3.8"
explosiveenhancement = "1.2.3-1.21.0"
# Update from https://modrinth.com/mod/not-enough-animations/versions?l=fabric
-notenoughanimations = "prj4BdjU"
+notenoughanimations = "JTLkasT1"
-# Update from https://modrinth.com/mod/cit-resewn/versions?l=fabric
+# Update from https://modrinth.com/mod/cit-resewn/versions?l=fabric lmao yeah sure
citresewn = "1.2.0+1.21"
# Update from https://modrinth.com/mod/jade/versions?l=fabric
-jade = "18.1.0+fabric"
+jade = "19.0.4+fabric"
devauth = "1.2.1"
# Update from https://ktor.io/docs/
-ktor = "3.1.2"
+ktor = "3.2.2"
# Update from https://repo.nea.moe/#/releases/moe/nea/neurepoparser
neurepoparser = "1.8.0"
@@ -69,7 +68,9 @@ hotswap_agent = "1.4.2-SNAPSHOT"
# Update from https://github.com/LlamaLad7/MixinExtras/tags
mixinextras = "0.4.1"
-jarvis = "1.1.4"
+# Update from https://repo.nea.moe/#/releases/moe/nea/jarvis/
+jarvis = "2.0.0"
+
nealisp = "1.1.0"
# Update from https://github.com/NotEnoughUpdates/MoulConfig/tags
@@ -90,7 +91,7 @@ manninghamMills = "2.4.1"
# Update from https://docs.isxander.dev/yet-another-config-lib/installing-yacl
# Nvm, they just don't update docs: https://modrinth.com/mod/yacl/versions?l=fabric
-yacl = "3.6.6+1.21.5-fabric"
+yacl = "3.7.1+1.21.6-fabric"
# Update from https://maven.shedaniel.me/me/shedaniel/cloth/basic-math/
basicMath = "0.6.1"
@@ -109,7 +110,7 @@ fabric_api_deprecated = { module = "net.fabricmc.fabric-api:fabric-api-deprecate
fabric_kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "fabric_kotlin" }
architectury = { module = "dev.architectury:architectury", version.ref = "architectury" }
rei_api = { module = "me.shedaniel:RoughlyEnoughItems-api", version.ref = "rei" }
-moulconfig = { module = "org.notenoughupdates.moulconfig:modern-1.21.5", version.ref = "moulconfig" }
+moulconfig = { module = "org.notenoughupdates.moulconfig:modern-1.21.7", version.ref = "moulconfig" }
repoparser = { module = "moe.nea:neurepoparser", version.ref = "neurepoparser" }
mixinextras = { module = "io.github.llamalad7:mixinextras-fabric", version.ref = "mixinextras" }
jarvis_api = { module = "moe.nea.jarvis:jarvis-api", version.ref = "jarvis" }
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 4cdd0fb..8b8fb18 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -4,6 +4,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/src/compat/jade/java/moe/nea/firmament/compat/jade/DrillToolProvider.kt b/src/compat/jade/java/moe/nea/firmament/compat/jade/DrillToolProvider.kt
index 10bff1b..addfc42 100644
--- a/src/compat/jade/java/moe/nea/firmament/compat/jade/DrillToolProvider.kt
+++ b/src/compat/jade/java/moe/nea/firmament/compat/jade/DrillToolProvider.kt
@@ -1,6 +1,5 @@
package moe.nea.firmament.compat.jade
-import java.util.Optional
import java.util.function.UnaryOperator
import snownee.jade.api.BlockAccessor
import snownee.jade.api.IBlockComponentProvider
@@ -8,14 +7,13 @@ import snownee.jade.api.ITooltip
import snownee.jade.api.JadeIds
import snownee.jade.api.config.IPluginConfig
import snownee.jade.api.theme.IThemeHelper
-import snownee.jade.api.ui.IElement
-import snownee.jade.api.ui.IElementHelper
+import snownee.jade.api.ui.Element
+import snownee.jade.api.ui.JadeUI
+import snownee.jade.gui.JadeLinearLayout
import snownee.jade.impl.ui.ItemStackElement
-import snownee.jade.impl.ui.TextElement
-import kotlin.jvm.optionals.getOrDefault
+import snownee.jade.impl.ui.TextElementImpl
import net.minecraft.text.Text
import net.minecraft.util.Identifier
-import net.minecraft.util.math.Vec2f
import moe.nea.firmament.Firmament
import moe.nea.firmament.repo.ExpensiveItemCacheApi
import moe.nea.firmament.repo.RepoManager
@@ -38,34 +36,31 @@ class DrillToolProvider : IBlockComponentProvider {
if (lastItemIndex < 0) return@map inner
val innerMut = inner.toMutableList()
val harvestIndicator = innerMut.indexOfLast {
- it is TextElement && it.cachedSize == Vec2f.ZERO && it.text.visit {
- if (it.isEmpty()) Optional.empty() else Optional.of(true)
- }.getOrDefault(false)
+ it is TextElementImpl && it.width == 0 && it.string.isNotEmpty()
}
val canHarvest = SBItemStack(MC.stackInHand).breakingPower >= customBlock.breakingPower
val lastItem = innerMut[lastItemIndex] as ItemStackElement
if (harvestIndicator < 0) {
- innerMut.add(lastItemIndex + 1, canHarvestIndicator(canHarvest, lastItem.alignment))
+ innerMut.add(lastItemIndex + 1, canHarvestIndicator(canHarvest))
} else {
- innerMut.set(harvestIndicator, canHarvestIndicator(canHarvest, lastItem.alignment))
+ innerMut.set(harvestIndicator, canHarvestIndicator(canHarvest))
}
- innerMut.set(lastItemIndex, IElementHelper.get()
- .item(tool, 0.75f)
- .translate(lastItem.translation)
- .size(lastItem.size)
- .message(null)
- .align(lastItem.alignment))
+ innerMut.set(
+ lastItemIndex, JadeUI
+ .item(tool, 0.75f)
+ )
innerMut.subList(0, lastItemIndex - 1).removeIf { it is ItemStackElement }
innerMut
}
})
}
- fun canHarvestIndicator(canHarvest: Boolean, align: IElement.Align): IElement {
+ fun canHarvestIndicator(canHarvest: Boolean): Element {
val t = IThemeHelper.get()
val text = if (canHarvest) t.success(CHECK) else t.danger(X)
- return IElementHelper.get().text(text)
- .scale(0.75F).zOffset(800).size(Vec2f.ZERO).translate(Vec2f(-3F, 3.25F)).align(align)
+ return JadeUI.text(text)
+ .scale(0.75F)
+ .alignSelfCenter()
}
private val CHECK: Text = Text.literal("✔")
diff --git a/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/ElementAccessor.java b/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/ElementAccessor.java
deleted file mode 100644
index 1b58e3c..0000000
--- a/src/compat/jade/java/moe/nea/firmament/mixins/compat/jade/ElementAccessor.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package moe.nea.firmament.mixins.compat.jade;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
-import snownee.jade.api.ui.Element;
-import snownee.jade.api.ui.IElement;
-
-@Mixin(Element.class)
-public interface ElementAccessor {
- @Accessor("align")
- IElement.Align getAlign_firmament();
-}
diff --git a/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt b/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt
index 5e4eee3..f881f77 100644
--- a/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt
+++ b/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt
@@ -52,9 +52,9 @@ object NEUItemEntryRenderer : EntryRenderer<SBItemStack> {
entry.value.asImmutableItemStack()
}
- context.matrices.push()
- context.matrices.translate(bounds.centerX.toFloat(), bounds.centerY.toFloat(), 0F)
- context.matrices.scale(bounds.width.toFloat() / 16F, bounds.height.toFloat() / 16F, 1f)
+ context.matrices.pushMatrix()
+ context.matrices.translate(bounds.centerX.toFloat(), bounds.centerY.toFloat(), )
+ context.matrices.scale(bounds.width.toFloat() / 16F, bounds.height.toFloat() / 16F, )
context.drawItemWithoutEntity(itemToRender, -8, -8)
context.drawStackOverlay(
minecraft.textRenderer, itemToRender, -8, -8,
@@ -64,7 +64,7 @@ object NEUItemEntryRenderer : EntryRenderer<SBItemStack> {
)
else null
)
- context.matrices.pop()
+ context.matrices.popMatrix()
}
val minecraft = MinecraftClient.getInstance()
diff --git a/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBKatRecipe.kt b/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBKatRecipe.kt
index cce1465..f77e9f5 100644
--- a/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBKatRecipe.kt
+++ b/src/compat/rei/java/moe/nea/firmament/compat/rei/recipes/SBKatRecipe.kt
@@ -17,7 +17,6 @@ import me.shedaniel.rei.api.client.gui.widgets.WidgetWithBounds
import me.shedaniel.rei.api.client.gui.widgets.Widgets
import me.shedaniel.rei.api.client.registry.display.DisplayCategory
import me.shedaniel.rei.api.common.category.CategoryIdentifier
-import me.shedaniel.rei.api.common.util.EntryStacks
import kotlin.time.Duration.Companion.seconds
import net.minecraft.client.gui.DrawContext
import net.minecraft.client.gui.Element
@@ -55,11 +54,13 @@ class SBKatRecipe(override val neuRecipe: NEUKatUpgradeRecipe) : SBRecipe() {
val inputLevelLabelCenter = Point(bounds.minX + 30 - 18 + 5 + 8, bounds.minY + 25)
val inputLevelLabel = Widgets.createLabel(
inputLevelLabelCenter,
- Text.literal("")).centered()
+ Text.literal("")
+ ).centered()
val outputLevelLabelCenter = Point(bounds.maxX - 30 + 8, bounds.minY + 25)
val outputLevelLabel = Widgets.createLabel(
outputLevelLabelCenter,
- Text.literal("")).centered()
+ Text.literal("")
+ ).centered()
val coinStack = SBItemStack(SkyblockId.COINS, recipe.coins.toInt())
levelValue.whenChanged { oldValue, newValue ->
if (oldValue.toInt() == newValue.toInt()) return@whenChanged
@@ -72,40 +73,60 @@ class SBKatRecipe(override val neuRecipe: NEUKatUpgradeRecipe) : SBRecipe() {
inputLevelLabel.message = Text.literal(newInput.levelData.currentLevel.toString())
inputLevelLabel.bounds.location = Point(
inputLevelLabelCenter.x - MC.font.getWidth(inputLevelLabel.message) / 2,
- inputLevelLabelCenter.y)
+ inputLevelLabelCenter.y
+ )
outputLevelLabel.message = Text.literal(newOutput.levelData.currentLevel.toString())
outputLevelLabel.bounds.location = Point(
outputLevelLabelCenter.x - MC.font.getWidth(outputLevelLabel.message) / 2,
- outputLevelLabelCenter.y)
+ outputLevelLabelCenter.y
+ )
coinStack.setStackSize((recipe.coins * (1 - 0.3 * newValue / 100)).toInt())
}
levelValue.set(1F)
add(Widgets.createRecipeBase(bounds))
- add(wrapWidget(Rectangle(bounds.centerX - slider.width / 2,
- bounds.maxY - 30,
- slider.width,
- slider.height),
- slider))
- add(Widgets.withTooltip(
- Widgets.createArrow(Point(bounds.centerX - arrowWidth / 2, bounds.minY + 40)),
- Text.literal("Upgrade time: " + FirmFormatters.formatTimespan(recipe.seconds.seconds))))
+ add(
+ wrapWidget(
+ Rectangle(
+ bounds.centerX - slider.width / 2,
+ bounds.maxY - 30,
+ slider.width,
+ slider.height
+ ),
+ slider
+ )
+ )
+ add(
+ Widgets.withTooltip(
+ Widgets.createArrow(Point(bounds.centerX - arrowWidth / 2, bounds.minY + 40)),
+ Text.literal("Upgrade time: " + FirmFormatters.formatTimespan(recipe.seconds.seconds))
+ )
+ )
add(Widgets.createResultSlotBackground(Point(bounds.maxX - 30, bounds.minY + 40)))
add(inputLevelLabel)
add(outputLevelLabel)
- add(Widgets.createSlot(Point(bounds.maxX - 30, bounds.minY + 40)).markOutput().disableBackground()
- .entry(SBItemEntryDefinition.getEntry(outputStack)))
- add(Widgets.createSlot(Point(bounds.minX + 30 - 18 + 5, bounds.minY + 40)).markInput()
- .entry(SBItemEntryDefinition.getEntry(inputStack)))
+ add(
+ Widgets.createSlot(Point(bounds.maxX - 30, bounds.minY + 40)).markOutput().disableBackground()
+ .entry(SBItemEntryDefinition.getEntry(outputStack))
+ )
+ add(
+ Widgets.createSlot(Point(bounds.minX + 30 - 18 + 5, bounds.minY + 40)).markInput()
+ .entry(SBItemEntryDefinition.getEntry(inputStack))
+ )
val allInputs = recipe.items.map { SBItemEntryDefinition.getEntry(it) } +
listOf(SBItemEntryDefinition.getEntry(coinStack))
for ((index, item) in allInputs.withIndex()) {
- add(Widgets.createSlot(
- Point(bounds.centerX + index * 20 - allInputs.size * 18 / 2 - (allInputs.size - 1) * 2 / 2,
- bounds.minY + 20))
- .markInput()
- .entry(item))
+ add(
+ Widgets.createSlot(
+ Point(
+ bounds.centerX + index * 20 - allInputs.size * 18 / 2 - (allInputs.size - 1) * 2 / 2,
+ bounds.minY + 20
+ )
+ )
+ .markInput()
+ .entry(item)
+ )
}
}
}
@@ -123,8 +144,8 @@ fun wrapWidget(bounds: Rectangle, component: GuiComponent): Widget {
}
override fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float) {
- context.matrices.push()
- context.matrices.translate(bounds.minX.toFloat(), bounds.minY.toFloat(), 0F)
+ context.matrices.pushMatrix()
+ context.matrices.translate(bounds.minX.toFloat(), bounds.minY.toFloat())
component.render(
GuiImmediateContext(
ModernRenderContext(context),
@@ -133,50 +154,57 @@ fun wrapWidget(bounds: Rec