Skip to content

Commit 51ebbb7

Browse files
authored
Merge OptiGUI 2.3.0-beta.2
2 parents 3a7d5ed + 9a10c22 commit 51ebbb7

5 files changed

Lines changed: 42 additions & 23 deletions

File tree

.github/workflows/build.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,47 @@ on:
1111
type: boolean
1212
upload-output:
1313
type: boolean
14+
fast:
15+
type: boolean
1416

1517
jobs:
18+
prepare-build-matrix:
19+
name: Prepare build matrix
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Create build matrix
23+
id: create-build-matrix
24+
env:
25+
DEFAULT_MATRIX: '
26+
{
27+
"os": [
28+
"ubuntu-latest",
29+
"windows-latest"
30+
]
31+
}
32+
'
33+
FAST_MATRIX: '
34+
{
35+
"os": [
36+
"ubuntu-latest"
37+
]
38+
}
39+
'
40+
run: |
41+
if [ "${{ inputs.fast }}" = true ]; then
42+
echo "BUILD_MATRIX=$FAST_MATRIX" >> $GITHUB_OUTPUT
43+
else
44+
echo "BUILD_MATRIX=$DEFAULT_MATRIX" >> $GITHUB_OUTPUT
45+
fi
46+
outputs:
47+
build-matrix: ${{ steps.create-build-matrix.outputs.BUILD_MATRIX }}
48+
1649
build:
1750
name: Build project
1851
strategy:
19-
matrix:
20-
os:
21-
- ubuntu-latest
22-
- windows-latest
52+
matrix: ${{ fromJson(needs.prepare-build-matrix.outputs.build-matrix) }}
2353
runs-on: ${{ matrix.os }}
54+
needs: prepare-build-matrix
2455
steps:
2556
- name: Checkout repository
2657
uses: actions/checkout@v4.1.1
@@ -44,21 +75,21 @@ jobs:
4475
if: inputs.build-docs
4576
run: ./gradlew :OptiGUI:dokkaHtml -PjavaSyntax
4677
- name: Upload build output
47-
if: inputs.build-project && inputs.upload-output && matrix.os == 'ubuntu-latest'
78+
if: inputs.build-project && inputs.upload-output
4879
uses: actions/upload-artifact@v4.3.1
4980
with:
5081
name: jars
5182
path: OptiGUI/build/libs/*.jar
5283
if-no-files-found: error
5384
- name: Upload documentation output
54-
if: inputs.build-docs && inputs.upload-output && matrix.os == 'ubuntu-latest'
85+
if: inputs.build-docs && inputs.upload-output
5586
uses: actions/upload-artifact@v4.3.1
5687
with:
5788
name: kdoc
5889
path: OptiGUI/build/dokka/kotlinHtml
5990
if-no-files-found: error
6091
- name: Upload documentation output (Java syntax)
61-
if: inputs.build-docs && inputs.upload-output && matrix.os == 'ubuntu-latest'
92+
if: inputs.build-docs && inputs.upload-output
6293
uses: actions/upload-artifact@v4.3.1
6394
with:
6495
name: javadoc

.github/workflows/publish-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
build-project: true
1414
build-docs: true
1515
upload-output: true
16+
fast: true
1617

1718
publish:
1819
name: Publish OptiGUI

OptiGUI/src/main/kotlin/opekope2/optigui/util/InteractionUtil.kt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
package opekope2.optigui.util
44

5-
import net.fabricmc.loader.api.FabricLoader
6-
import net.fabricmc.loader.api.Version
75
import net.minecraft.nbt.NbtCompound
86
import opekope2.optigui.interaction.Interaction
97
import opekope2.optigui.internal.TextureReplacer
@@ -21,10 +19,6 @@ val interactionData: Interaction.Data?
2119
*/
2220
fun invalidateCachedReplacement() = TextureReplacer.clearReplacementCache()
2321

24-
// FIXME tech debt
25-
private val minecraft_1_20_5 =
26-
FabricLoader.getInstance().getModContainer("minecraft").get().metadata.version >= Version.parse("1.20.5")
27-
2822
/**
2923
* Creates an OptiGUI INI from the current interaction data.
3024
*/
@@ -45,14 +39,7 @@ fun inspectInteraction(): String? {
4539
appendLine()
4640

4741
when {
48-
// FIXME tech debt
49-
data.blockEntity != null && minecraft_1_20_5 -> {
50-
appendLine("# Block entity NBT is not available on Minecraft 1.20.5+")
51-
appendLine()
52-
}
53-
54-
// FIXME tech debt
55-
data.blockEntity != null && !minecraft_1_20_5 -> {
42+
data.blockEntity != null -> {
5643
appendLine("# NBT (for more detailed inspection purposes, as there is no selector for NBT):")
5744
appendLine("# ${data.blockEntity.createNbt()}")
5845
appendLine()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"fabric-networking-api-v1": "*",
6060
"fabric-resource-loader-v0": "*",
6161
"fabric-language-kotlin": ">=$fabric_language_kotlin",
62-
"minecraft": ">=$minecraft",
62+
"minecraft": ">=$minecraft <1.20.5",
6363
"java": ">=$java"
6464
},
6565
"recommends": {

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
java = "17" # Don't forget to update *.mixins.json
33
kotlin = "1.9.22"
4-
optigui = "2.3.0-beta.1"
4+
optigui = "2.3.0-beta.2"
55
minecraft = "1.20.2"
66
yarn = "1.20.2+build.4"
77
fabric-loom = "1.5-SNAPSHOT"

0 commit comments

Comments
 (0)