Skip to content

add Matter Index Ui & Enhance ProbeJS support and add KJS functionality - #4

Merged
P-nutsK merged 12 commits into
mainfrom
codex-matter-index-focus-ui
May 22, 2026
Merged

add Matter Index Ui & Enhance ProbeJS support and add KJS functionality#4
P-nutsK merged 12 commits into
mainfrom
codex-matter-index-focus-ui

Conversation

@P-nutsK

@P-nutsK P-nutsK commented May 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

P-nutsK added 9 commits May 21, 2026 18:35
動作確認は1.21.1のみ.
getRawなどがモックになっていることに注意。
ProbeJS対応もあまりよろしくない
動作確認は1.21.1のみ.
ProbeJS対応もあまりよろしくない
Copilot AI review requested due to automatic review settings May 22, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands Replicated Integration with a new client-side “Matter/Replication Index” UI, adds KubeJS-based matter override support (including enhanced ProbeJS typing help), and upgrades the selector pipeline to support richer rule selectors (including MOD-scoped selection).

Changes:

  • Added Matter Index screen + tooltip/sidebar entrypoints, display scaling, and compact/exact matter amount formatting.
  • Introduced rule-based selector model (MatterRule / MatterRuleSelector) with MOD selectors and KubeJS override source priority.
  • Added/updated build + datagen integrations for KubeJS/ProbeJS across Forge 1.20.1 and NeoForge 1.21.1.

Reviewed changes

Copilot reviewed 71 out of 76 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
gradle/libs.versions.toml Adds KubeJS/Architectury/Rhino/ProbeJS version-catalog entries.
gradle.properties Bumps modVersion to 0.2.0.
common/src/test/kotlin/SimpleConversionSolverTest.kt Adds a rule-ordering materialization test.
common/src/test/kotlin/MatterIndexDisplayScaleTest.kt Unit tests for display scale stepping/clamping.
common/src/test/kotlin/MatterAmountFormatterTest.kt Unit tests for compact/exact amount formatting.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/selector/MutableMatterSelectors.kt Reworks selectors to store ordered MatterRule list + snapshots.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/selector/MatterSelectorStorageCodec.kt Adds load/save for rule lists + MOD selector serialization.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/selector/MatterSelectorMaterializer.kt Adds rule-based materialization and MOD expansion hooks.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/selector/MatterSelectorKind.kt Adds MOD selector kind.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/selector/MatterSelectorFormatter.kt Formats MOD selectors for logs/UI.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/selector/MatterRule.kt Introduces rule + selector AST (static/any/all/not/predicate) and expansion context.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/node/MatterNodeRegistry.kt Ensures nodes can be stripped of commands while keeping safe enumerator/rawValue defaults.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/node/MatterNodeDef.kt Adds node enumeration + raw-value hooks used by rule predicates/not selectors.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/model/ExplicitMatterValue.kt Adds KUBEJS source priority between CONFIG and RUNTIME.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/kubejs/RepInt.kt Adds shared KubeJS-facing selector DSL + matter rule event builder.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/client/MatterIndexModels.kt Adds Matter Index record/query/filter/sort models.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/client/MatterIndexDisplayScale.kt Adds percent-based UI scaling helpers.
common/src/main/kotlin/com/p_nsk/replicated_integration/api/client/MatterAmountFormatter.kt Adds compact/exact matter amount formatting + notation parsing.
buildSrc/src/main/kotlin/legacyforge-mod-conventions.gradle.kts Uses a dedicated run-server directory for server and gametest server.
build.gradle.kts Adds Architectury/JitPack/Latvian Maven repos for new deps.
1.21.1-neo/src/main/resources/replicated_integration.mixins.json Registers client mixin accessor for Neo UI injection.
1.21.1-neo/src/main/resources/kubejs.plugins.txt Declares NeoForge KubeJS/ProbeJS plugins.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/ModMain.kt Registers UI config, client events, and key mapping hooks on client dist.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/NeoRepIntProbeJSPlugin.kt ProbeJS transform plugin for improved TS param typings.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/NeoRepIntMekKubeJSPlugin.kt Registers Mek bindings for NeoForge KubeJS.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/NeoRepIntMek.kt NeoForge Mek selector helpers.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/NeoRepIntKubeJSPlugin.kt Registers bindings + events for NeoForge KubeJS matter rules.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/NeoRepInt.kt NeoForge KubeJS selector helpers + whereItem predicate.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/NeoKubeJSMatterRules.kt Collects NeoForge KubeJS rules only when kubejs is loaded.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/data/NeoReplicatedIntegrationLanguageProvider.kt Adds keymapping translations (en/ja).
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/data/NeoMatterRuntimeOverrides.kt Exposes runtime overrides as MatterRule list.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/data/NeoMatterConfigOverrides.kt Stores config overrides as ordered rule list + saves/loads rules.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/core/NeoReplicationCalculationService.kt Integrates config + KubeJS + runtime rules into materialization pipeline.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/core/NeoRecipeConversionSupport.kt Skips recipe-derived conversions for SKIP_CALCULATION-tagged outputs.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/core/NeoMatterNodeBuilder.kt Adds per-node enumeration + raw value providers used by rule expansion.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/core/Aliases.kt Wires enumeration/rawValue into node registration.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/config/NeoUiConfig.kt Adds UI config for amount notation.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/command/MatterCommandTree.kt Adds MOD selector kind support for selector targeting.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/client/MatterIndexScreen.kt Adds NeoForge Matter Index screen implementation.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/client/MatterIndexClientEvents.kt Adds tooltip hold-to-open + sidebar button + key mapping registration (NeoForge).
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/adapter/vanilla/ReplicationVanillaAddon.kt Adds enumeration/rawValue for item/fluid nodes + respects ReplicationTags crafting remainder tag.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/adapter/vanilla/BuiltinNodeResolver.kt Adds raw lookups + “all nodes” + mod-based node expansion helpers.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/adapter/mekanism/ReplicationMekanismAddon.kt Adds enumeration/rawValue hooks for chemical nodes.
1.21.1-neo/src/main/kotlin/com/p_nsk/replicated_integration/adapter/mekanism/MekanismNodeResolver.kt Adds “all chemical nodes”, mod expansion, and raw chemical lookups.
1.21.1-neo/src/main/java/com/p_nsk/replicated_integration/mixin/neo/ScreenAccessor.java NeoForge screen accessor invoker to inject sidebar button.
1.21.1-neo/build.gradle.kts Adds KubeJS/Architectury/Rhino/ProbeJS dependencies.
1.20.1-forge/src/main/resources/replicated_integration.mixins.json Registers client mixin accessor for Forge UI injection.
1.20.1-forge/src/main/resources/kubejs.plugins.txt Declares Forge KubeJS plugins.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/ModMain.kt Registers Forge UI config.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/ForgeRepIntMekKubeJSPlugin.kt Registers Mek bindings for Forge KubeJS.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/ForgeRepIntMek.kt Forge Mek selector helpers for multiple chemical types.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/ForgeRepIntKubeJSPlugin.kt Registers bindings + events for Forge KubeJS matter rules.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/ForgeRepInt.kt Forge KubeJS selector helpers + whereItem predicate.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/kubejs/ForgeKubeJSMatterRules.kt Collects Forge KubeJS rules only when kubejs is loaded.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/data/ReplicatedIntegrationLanguageProvider.kt Adds keymapping translations (en/ja).
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/data/ReplicatedIntegrationDataGen.kt Registers ProbeJS doc provider in datagen.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/data/ProbeJSDocumentProvider.kt Generates ProbeJS documents JSON and documents list file.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/data/ForgeMatterRuntimeOverrides.kt Exposes runtime overrides as MatterRule list.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/data/ForgeMatterConfigOverrides.kt Stores config overrides as ordered rule list + saves/loads rules.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/core/ForgeReplicationCalculationService.kt Integrates config + KubeJS + runtime rules into materialization pipeline.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/core/ForgeMatterNodeBuilder.kt Adds per-node enumeration + raw value providers used by rule expansion.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/core/Aliases.kt Wires enumeration/rawValue into node registration.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/config/ForgeUiConfig.kt Adds UI config for amount notation.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/command/MatterCommandTree.kt Adds MOD selector kind support for selector targeting.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/client/MatterIndexScreen.kt Adds Forge Matter Index screen implementation.
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/client/MatterIndexClientEvents.kt Adds tooltip hold-to-open + sidebar button + key mapping registration (Forge).
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/adapter/vanilla/ReplicationVanillaAddon.kt Adds enumeration/rawValue hooks for item/fluid nodes (Forge).
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/adapter/vanilla/BuiltinNodeResolver.kt Adds raw lookups + “all nodes” + mod-based node expansion helpers (Forge).
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/adapter/mekanism/ReplicationMekanismAddon.kt Adds missing Mek tag command targets (Forge).
1.20.1-forge/src/main/kotlin/com/p_nsk/replicated_integration/adapter/mekanism/MekanismNodeResolver.kt Adds tag/mod expansion for Mek chemical node types (Forge).
1.20.1-forge/src/main/java/com/p_nsk/replicated_integration/mixin/ScreenAccessor.java Forge screen accessor invoker to inject sidebar button.
1.20.1-forge/src/generated/resources/probejs/replicated_integration.json Generated ProbeJS documents JSON.
1.20.1-forge/src/generated/resources/probejs.documents.txt Generated ProbeJS documents list file.
1.20.1-forge/src/generated/resources/assets/replicated_integration/lang/ja_jp.json Generated lang updates for keymapping strings.
1.20.1-forge/src/generated/resources/assets/replicated_integration/lang/en_us.json Generated lang updates for keymapping strings.
1.20.1-forge/build.gradle.kts Adds KubeJS/Architectury/Rhino + ProbeJS runtime dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +94 to 99
for (rule in rules) {
val selector = rule.selector.staticKey ?: continue
val value = rule.value
val json = JsonObject()
json.addProperty("selector", selector.kind.name.lowercase())
json.addProperty("type", selector.type.toString())
Comment on lines +30 to 36
val values = linkedMapOf<NodeKey, ExplicitMatterValue>()
val expansion = MatterRuleExpansion(expandTag, expandMod, allNodes, rawValue)
for (rule in rules.sortedWith(compareBy<MatterRule> { it.source.priority })) {
val targets = rule.selector.expand(expansion)
for (target in targets) {
val current = values[target]
if (current == null || shouldReplace(current, explicitValue, specificity)) {
values[target] = AppliedValue(explicitValue, specificity)
}
values[target] = rule.value
}
Comment on lines +42 to 47
fun snapshot(): Map<MatterSelectorKey, ExplicitMatterValue> {
val values = linkedMapOf<MatterSelectorKey, ExplicitMatterValue>()
for (rule in rules.sortedWith(compareBy<MatterRule> { it.source.priority })) {
val key = rule.selector.staticKey ?: continue
values[key] = rule.value
}
Comment on lines +76 to +84
disintegratableButton.message = toggleLabel("D", disintegratableOnly)
indexScroll = 0
}.bounds(replicatableButton.x + replicatableButton.width + 4, searchBox.y, 34, 18).build(),
)
}

override fun render(guiGraphics: GuiGraphics, mouseX: Int, mouseY: Int, partialTick: Float) {
hoveredStack = ItemStack.EMPTY
hoveredAmountTooltip = emptyList()
Comment thread gradle/libs.versions.toml
Comment on lines +470 to +474
private fun visibleEntries(): List<MatterIndexEntry> {
val query = MatterIndexFiltering.parseQuery(searchBox.value, matterOnly, replicatableOnly, disintegratableOnly)
val ordered = MatterIndexFiltering.filterAndSort(entries.map { it.record }, query, sort)
val byId = entries.associateBy { it.record.itemId }
return ordered.mapNotNull { byId[it.itemId] }
Comment on lines +473 to +486
private fun visibleEntries(): List<MatterIndexEntry> {
val query = MatterIndexFiltering.parseQuery(searchBox.value, matterOnly, replicatableOnly, disintegratableOnly)
val ordered = MatterIndexFiltering.filterAndSort(entries.map { it.record }, query, sort)
val byId = entries.associateBy { it.record.itemId }
return ordered.mapNotNull { byId[it.itemId] }
}

private fun selectedEntry(): MatterIndexEntry? =
entries.firstOrNull { it.record.itemId == selectedItemId }

private fun equivalentEntries(): List<MatterIndexEntry> {
val records = MatterIndexFiltering.equivalentRecords(entries.map { it.record }, selectedEntry()?.record)
val byId = entries.associateBy { it.record.itemId }
return records.mapNotNull { byId[it.itemId] }

Copilot AI commented May 22, 2026

Copy link
Copy Markdown
Contributor

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.fabricmc.net
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx1G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI commented May 22, 2026

Copy link
Copy Markdown
Contributor

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.fabricmc.net
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx1G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@P-nutsK

P-nutsK commented May 22, 2026

Copy link
Copy Markdown
Owner Author

@copilot これらを解決するのは憂鬱で、やる気を削いでしまう問題だから、resolveされていない挙がった問題はmarkdownファイルとしてリポジトリに残しておいて。でも一旦放置することにする。

Copilot AI commented May 22, 2026

Copy link
Copy Markdown
Contributor

@copilot これらを解決するのは憂鬱で、やる気を削いでしまう問題だから、resolveされていない挙がった問題はmarkdownファイルとしてリポジトリに残し��...

対応しました。未解決の指摘を docs/pr4-unresolved-review-items.md に残しています。対象コミットは ceff00d です。

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.fabricmc.net
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx1G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@P-nutsK
P-nutsK merged commit e7693a2 into main May 22, 2026
1 check passed
@P-nutsK
P-nutsK deleted the codex-matter-index-focus-ui branch May 22, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants