Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 8107d1e

Browse files
committed
fix: letter added at the end of a formatted text input is not formatted when saving
1 parent 8bcb14e commit 8107d1e

File tree

6 files changed

+29
-19
lines changed

6 files changed

+29
-19
lines changed

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- '1.19'
88
paths-ignore:
99
- 'README.md'
10+
- 'LICENSE'
11+
- 'versions.json'
12+
- 'forge_update.json'
1013

1114
jobs:
1215
release:

common/src/main/java/com/github/franckyi/ibeeditor/client/screen/controller/entry/TextEntryController.java

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public void bind() {
3535
view.getTextField().validProperty().addListener(model::setValid);
3636
initFormattings(model.getValue());
3737
model.resetDefaultValue();
38+
model.setOnApply(this::updateModel);
3839
}
3940

4041
private void updateModel() {

common/src/main/java/com/github/franckyi/ibeeditor/client/screen/model/entry/TextEntryModel.java

+18
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,28 @@
88
import static com.github.franckyi.guapi.api.GuapiHelper.*;
99

1010
public class TextEntryModel extends ValueEntryModel<MutableComponent> {
11+
private Runnable onApply;
12+
1113
public TextEntryModel(CategoryModel category, MutableComponent label, MutableComponent value, Consumer<MutableComponent> action) {
1214
super(category, label, value == null ? text() : value, action);
1315
}
1416

17+
public Runnable getOnApply() {
18+
return onApply;
19+
}
20+
21+
public void setOnApply(Runnable onApply) {
22+
this.onApply = onApply;
23+
}
24+
25+
@Override
26+
public void apply() {
27+
if (onApply != null) {
28+
onApply.run();
29+
}
30+
super.apply();
31+
}
32+
1533
@Override
1634
public Type getType() {
1735
return Type.TEXT;

forge_update.json

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
{
22
"homepage": "https://www.curseforge.com/minecraft/mc-mods/ibe-editor",
33
"promos": {
4-
"1.19-latest": "2.1.0",
5-
"1.19-recommended": "2.1.0",
6-
"1.18.1-latest": "2.1.0",
7-
"1.18.1-recommended": "2.1.0",
8-
"1.18-latest": "2.1.0",
9-
"1.18-recommended": "2.1.0",
10-
"1.17.1-latest": "2.0.10",
11-
"1.17.1-recommended": "2.0.10",
12-
"1.16.5-latest": "2.0.10",
13-
"1.16.5-recommended": "2.0.10",
14-
"1.16.4-latest": "2.0.10",
15-
"1.16.4-recommended": "2.0.10",
16-
"1.16.3-latest": "2.0.10",
17-
"1.16.3-recommended": "2.0.10",
18-
"1.16.2-latest": "2.0.10",
19-
"1.16.2-recommended": "2.0.10",
20-
"1.16.1-latest": "2.0.10",
21-
"1.16.1-recommended": "2.0.10"
4+
"1.19-latest": "2.1.1",
5+
"1.19-recommended": "2.1.1"
226
}
237
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ org.gradle.daemon=false
44
# IBE Editor
55
minecraft_version=1.19
66
archives_base_name=IBEEditor
7-
mod_version=2.1.0
7+
mod_version=2.1.1
88
maven_group=com.github.franckyi.ibeeditor
99
# Fabric https://fabricmc.net/develop/
1010
fabric_loader_version=0.14.8

versions.json

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"2.1.1": {
3+
"type": "release",
4+
"changelog": "* fix: error when trying to open the NBT editor for a block that doesn't have NBT data (#57)\n* fix: letter added at the end of a formatted text input is not formatted when saving"
5+
},
26
"2.1.0": {
37
"type": "release",
48
"changelog": "* Added Block Editor (not finished yet)\n* Added Entity Editor (not finished yet)\n* Added Vault: allows to save items and entities and re-use them between saves or servers (not finished yet)\n* Added \"Copy command\" button\n* Added buttons to switch between editors (standard, NBT, SNBT)\n* Various fixes"

0 commit comments

Comments
 (0)