Skip to content

Commit

Permalink
fix: remove the accidental commenting of block entity refreshing in X…
Browse files Browse the repository at this point in the history
…ennoteClient.java

feat: config subcategories are now auto expanded, adding NOTICE, supplement in LICENSE, try using MC-Publish
  • Loading branch information
zhenlige committed Nov 27, 2024
1 parent 7244d04 commit f5ef273
Show file tree
Hide file tree
Showing 11 changed files with 518 additions and 7 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# https://wiki.fabricmc.net/zh_cn:tutorial:publishing_mods_using_github_actions
name: publish
on: [workflow_dispatch]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
- name: setup Java
uses: actions/setup-java@v2
with:
java-version: 21
- name: exe
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew clean build
- name: release
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: xennote
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

github-token: ${{ secrets.GAYHUB_TOKEN }}

version-type: beta
loaders: ["fabric", "quilt"]
461 changes: 461 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Apache Commons Numbers
Copyright 2001-2023 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Apache Commons Math
Copyright 2001-2022 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This product includes software developed for Orekit by
CS Systèmes d'Information (http://www.c-s.fr/)
Copyright 2010-2012 CS Systèmes d'Information
Binary file modified en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ yarn_mappings=1.21.3+build.2
loader_version=0.16.9

# Mod Properties
mod_version=0.3.0
mod_version=0.3.0+1.21.2
maven_group=com.github.zhenlige.xennote
archives_base_name=xennote

Expand Down
6 changes: 4 additions & 2 deletions src/client/java/com/github/zhenlige/xennote/EntryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public Tuning getTuning() {
}

public SubCategoryListEntry createEntry(ConfigEntryBuilder entryBuilder) {
SubCategoryBuilder builder = entryBuilder.startSubCategory(Text.translatable("option.xennote.tuning"));
SubCategoryBuilder builder = entryBuilder.startSubCategory(Text.translatable("option.xennote.tuning"))
.setExpanded(true);
var typeEntry = entryBuilder.startEnumSelector(
Text.translatable("option.xennote.type"),
Tuning.TuningType.class,
Expand Down Expand Up @@ -173,7 +174,8 @@ public SingleTuningRef(TuningRef ref) {
}

public SubCategoryListEntry createEntry(ConfigEntryBuilder entryBuilder) {
SubCategoryBuilder builder = entryBuilder.startSubCategory(Text.translatable("option.xennote.tuning_ref"));
SubCategoryBuilder builder = entryBuilder.startSubCategory(Text.translatable("option.xennote.tuning_ref"))
.setExpanded(true);
var typeEntry = entryBuilder.startEnumSelector(
Text.translatable("option.xennote.type"),
TuningRef.TuningRefType.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ private static void blockConfig(BlockTuningPayload payload, ClientPlayNetworking
IntegerListEntry entryQ = entryBuilder.startIntField(Text.translatable("option.xennote.q"), payload.q()).setMin(1).build();
cat.addEntry(entryQ);
var entryRef = new EntryManager.SingleTuningRef(payload.tuningRef());
//DoubleListEntry entryEdo = entryBuilder.startDoubleField(Text.translatable("option.xennote.ede"), payload.edo()).setMin(0).build();
cat.addEntry(entryRef.createEntry(entryBuilder));
builder.setSavingRunnable(() -> {
Fraction f = Fraction.getFraction(entryP.getValue(), entryQ.getValue());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/zhenlige/xennote/Xennote.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private static void registerNetwork() {
xbe.q = payload.q();
xbe.tuningRef = payload.tuningRef();
be.markDirty();
//XenNoteBlock.refreshNote(world, pos);
XenNoteBlock.refreshNote(world, pos);
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"zhenlige"
],
"contact": {
"homepage": "https://github.com/zhenlige/xennote",
"homepage": "https://modrinth.com/mod/xennote",
"sources": "https://github.com/zhenlige/xennote"
},
"license": "MIT License",
Expand All @@ -35,7 +35,7 @@
],
"depends": {
"fabricloader": "*",
"minecraft": ">=1.21.2",
"minecraft": ">=1.21.2-",
"java": ">=21",
"fabric-api": "*"
},
Expand Down
Binary file modified zh-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified zh-tw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f5ef273

Please sign in to comment.