Skip to content

Commit 5fa1053

Browse files
committed
Add IoticBlocks dependency, update Gradle and Loom, remove read/write block patterns
1 parent 3618cd1 commit 5fa1053

File tree

14 files changed

+32
-215
lines changed

14 files changed

+32
-215
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
1515
- Debug Locator's Reflection: Pushes the index of the next iota to be evaluated.
1616
- Cognitohazard Reflection: Pushes a cognitohazard iota to the stack, which halts debugging immediately if detected in a hex to be evaluated by a debugger.
1717
- Added ru_ru translations, by JustS-js in [#25](https://github.com/object-Object/HexDebug/pull/25).
18+
- New dependency: IoticBlocks.
1819

1920
### Changed
2021

@@ -35,7 +36,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
3536

3637
### Notes
3738

38-
- This update also contains a new undocumented block (Focus Holder) and some undocumented patterns. Please don't use these for anything important, as they'll probably be moved to a separate mod at some point.
39+
- This update also contains a new undocumented block (Focus Holder). Please don't use this for anything important, as it'll probably be moved to a separate mod at some point.
3940
- I likely will not be backporting this update to 1.19.2, due to the many GUI-related changes between that version and this one.
4041

4142
## `0.2.2+1.20.1` - 2024-05-28

Common/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ dependencies {
2929
api(libs.bundles.lsp4j)
3030

3131
implementation(libs.bundles.ktor)
32+
33+
modApi(libs.ioticblocks.common)
3234
}

Common/src/main/kotlin/gay/object/hexdebug/casting/actions/OpReadBlock.kt

Lines changed: 0 additions & 31 deletions
This file was deleted.

Common/src/main/kotlin/gay/object/hexdebug/casting/actions/OpReadBlockIndexed.kt

Lines changed: 0 additions & 51 deletions
This file was deleted.

Common/src/main/kotlin/gay/object/hexdebug/casting/actions/OpWriteBlock.kt

Lines changed: 0 additions & 50 deletions
This file was deleted.

Common/src/main/kotlin/gay/object/hexdebug/casting/actions/OpWriteBlockIndexed.kt

Lines changed: 0 additions & 64 deletions
This file was deleted.

Common/src/main/kotlin/gay/object/hexdebug/registry/HexDebugActions.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import at.petrak.hexcasting.common.casting.actions.spells.OpMakePackagedSpell
99
import at.petrak.hexcasting.common.items.magic.ItemPackagedHex
1010
import at.petrak.hexcasting.common.lib.HexRegistries
1111
import at.petrak.hexcasting.common.lib.hex.HexActions
12-
import gay.`object`.hexdebug.casting.actions.*
12+
import gay.`object`.hexdebug.casting.actions.OpBreakpoint
13+
import gay.`object`.hexdebug.casting.actions.OpIsDebugging
14+
import gay.`object`.hexdebug.casting.actions.OpNextEvalIndex
1315
import gay.`object`.hexdebug.casting.iotas.CognitohazardIota
1416

1517
object HexDebugActions : HexDebugRegistrar<ActionRegistryEntry>(HexRegistries.ACTION, { HexActions.REGISTRY }) {
@@ -27,12 +29,6 @@ object HexDebugActions : HexDebugRegistrar<ActionRegistryEntry>(HexRegistries.AC
2729
OpMakePackagedSpell(HexDebugItems.DEBUGGER.value as ItemPackagedHex, 10 * MediaConstants.CRYSTAL_UNIT)
2830
}
2931

30-
// temporary implementation of FallingColors/HexMod#412 since there's no 1.20 gloop
31-
val BLOCK_READ = make("block_read", HexDir.EAST, "aqqqqqeawqwaw", OpReadBlock)
32-
val BLOCK_WRITE = make("block_write", HexDir.EAST, "deeeeeqdwewewewdw", OpWriteBlock)
33-
val BLOCK_READ_INDEXED = make("block_read_indexed", HexDir.EAST, "aqqqqqedwewewewdw", OpReadBlockIndexed)
34-
val BLOCK_WRITE_INDEXED = make("block_write_indexed", HexDir.EAST, "deeeeeqawqwaw", OpWriteBlockIndexed)
35-
3632
private fun make(name: String, startDir: HexDir, signature: String, action: Action) =
3733
make(name, startDir, signature) { action }
3834

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
package gay.`object`.hexdebug.utils
22

3-
import at.petrak.hexcasting.api.addldata.ADIotaHolder
43
import at.petrak.hexcasting.xplat.IXplatAbstractions
5-
import net.minecraft.core.BlockPos
64
import net.minecraft.world.item.ItemStack
7-
import net.minecraft.world.level.Level
85

96
fun isIotaHolder(stack: ItemStack) = IXplatAbstractions.INSTANCE.findDataHolder(stack) != null
10-
11-
fun findDataHolder(world: Level, pos: BlockPos): ADIotaHolder? {
12-
return world.getBlockState(pos).block as? ADIotaHolder
13-
?: world.getBlockEntity(pos) as? ADIotaHolder
14-
}

Fabric/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import hexdebug.libs
2+
13
plugins {
24
id("hexdebug.conventions.platform")
35
}
@@ -22,6 +24,7 @@ hexdebugModDependencies {
2224
requires("architectury-api")
2325
requires("cloth-config")
2426
requires(curseforge = "hexcasting", modrinth = "hex-casting")
27+
requires("ioticblocks")
2528

2629
requires("fabric-api")
2730
requires("fabric-language-kotlin")
@@ -73,6 +76,8 @@ dependencies {
7376
}
7477

7578
modLocalRuntime(libs.devAuth.fabric)
79+
80+
modApi(libs.ioticblocks.fabric)
7681
}
7782

7883
publishMods {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"fabric-language-kotlin": ">=${versions.kotlin_fabric}",
3939
"architectury": ">=${versions.architectury}",
4040
"hexcasting": ">=${versions.hexcasting_dependency}",
41-
"cloth-config": ">=${versions.clothConfig}"
41+
"cloth-config": ">=${versions.clothConfig}",
42+
"ioticblocks": ">=${versions.ioticblocks}"
4243
},
4344
"suggests": {
4445
"modmenu": ">=${versions.modMenu}"

0 commit comments

Comments
 (0)