Skip to content

Commit 7ef8a0c

Browse files
committed
Update to Hex Casting 0.11.2 and fix compile errors
1 parent f28bd1f commit 7ef8a0c

File tree

8 files changed

+16
-9
lines changed

8 files changed

+16
-9
lines changed

Common/src/main/kotlin/gay/object/hexdebug/casting/eval/DebuggerCastEnv.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class DebuggerCastEnv(
2929
printDebugMishap(this, caster, mishap)
3030
}
3131

32-
override fun extractMediaEnvironment(cost: Long): Long {
32+
override fun extractMediaEnvironment(cost: Long, simulate: Boolean): Long {
3333
if (caster.isCreative) return 0
3434

3535
var costLeft = cost
@@ -42,13 +42,13 @@ class DebuggerCastEnv(
4242
// The contracts on the AD and on this function are different.
4343
// ADs return the amount extracted, this wants the amount left
4444
if (casterMediaHolder != null) {
45-
val extracted = casterMediaHolder.withdrawMedia(costLeft.toInt().toLong(), false)
45+
val extracted = casterMediaHolder.withdrawMedia(costLeft.toInt().toLong(), simulate)
4646
costLeft -= extracted
4747
}
4848

4949
// debugger can always extract from inventory
5050
if (costLeft > 0) {
51-
costLeft = extractMediaFromInventory(costLeft, canOvercast())
51+
costLeft = extractMediaFromInventory(costLeft, canOvercast(), simulate)
5252
}
5353

5454
return costLeft

Common/src/main/kotlin/gay/object/hexdebug/casting/eval/FakeCastEnv.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FakeCastEnv(level: ServerLevel) : CastingEnvironment(level) {
2525

2626
override fun mishapSprayPos(): Vec3 = TODO()
2727

28-
override fun extractMediaEnvironment(cost: Long): Long = cost
28+
override fun extractMediaEnvironment(cost: Long, simulate: Boolean): Long = cost
2929

3030
override fun isVecInRangeEnvironment(vec: Vec3?): Boolean = false
3131

Common/src/main/kotlin/gay/object/hexdebug/debugger/HexDebugger.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@ class HexDebugger(
592592
lastResolutionType = castResult.resolutionType
593593

594594
try {
595-
vm.performSideEffects(info, castResult.sideEffects)
595+
vm.performSideEffects(castResult.sideEffects)
596596
} catch (e: Exception) {
597597
e.printStackTrace()
598598
vm.performSideEffects(
599-
info, listOf(OperatorSideEffect.DoMishap(MishapInternalException(e), Mishap.Context(null, null)))
599+
listOf(OperatorSideEffect.DoMishap(MishapInternalException(e), Mishap.Context(null, null)))
600600
)
601601
}
602602
info.earlyExit = info.earlyExit || !castResult.resolutionType.success

Fabric/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ dependencies {
4949
modLocalRuntime(libs.cardinalComponents)
5050
modLocalRuntime(libs.serializationHooks)
5151
modLocalRuntime(libs.trinkets)
52+
modLocalRuntime(libs.inline.fabric)
5253

5354
libs.mixinExtras.also {
5455
localRuntime(it)

Fabric/src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"fabric-api": ">=${versions.fabric_api}",
3838
"fabric-language-kotlin": ">=${versions.kotlin_fabric}",
3939
"architectury": ">=${versions.architectury}",
40-
"hexcasting": ">=${versions.hexcasting}",
40+
"hexcasting": ">=${versions.hexcasting_dependency}",
4141
"cloth-config": ">=${versions.clothConfig}"
4242
},
4343
"suggests": {

Forge/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ dependencies {
6363
modImplementation(libs.paucal.forge)
6464
modLocalRuntime(libs.patchouli.forge)
6565
modLocalRuntime(libs.caelus)
66+
modLocalRuntime(libs.inline.fabric)
6667

6768
modApi(libs.clothConfig.forge)
6869

Forge/src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ side = "BOTH"
4343
[[dependencies.hexdebug]]
4444
modId = "hexcasting"
4545
mandatory = true
46-
versionRange = "[${versions.hexcasting},)"
46+
versionRange = "[${versions.hexcasting_dependency},)"
4747
ordering = "NONE"
4848
side = "BOTH"

gradle/libs.versions.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ forge-dependency = "47" # for mods.toml
2222

2323
# mods
2424

25-
hexcasting = "0.11.1-7-pre-672"
25+
hexcasting = "0.11.2-pre-701"
26+
hexcasting-dependency = "0.11.2-pre"
2627
paucal = "0.6.0-pre-118"
2728

2829
patchouli = "1.20.1-84"
@@ -37,6 +38,7 @@ clothConfig = "11.1.106"
3738
modMenu = "7.1.0"
3839
caelus = "3.1.0+1.20"
3940
devAuth = "1.2.0"
41+
inline = "1.20.1-1.0.1"
4042

4143
# other non-Minecraft dependencies
4244

@@ -99,6 +101,9 @@ clothConfig-forge = { module="me.shedaniel.cloth:cloth-config-forge", version.r
99101
devAuth-fabric = { module="me.djtheredstoner:DevAuth-fabric", version.ref="devAuth" }
100102
devAuth-forge = { module="me.djtheredstoner:DevAuth-forge-latest", version.ref="devAuth" }
101103

104+
inline-fabric = { module="com.samsthenerd.inline:inline-fabric", version.ref="inline" }
105+
inline-forge = { module="com.samsthenerd.inline:inline-forge", version.ref="inline" }
106+
102107
findbugs-jsr305 = { module="com.google.code.findbugs:jsr305", version.ref="findbugs-jsr305" }
103108

104109
asm = { module="org.ow2.asm:asm", version.ref="asm" }

0 commit comments

Comments
 (0)