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

Commit 9818679

Browse files
committed
fix: letter added at the end of a formatted text input is not formatted when saving
1 parent b678250 commit 9818679

File tree

7 files changed

+34
-18
lines changed

7 files changed

+34
-18
lines changed

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- '1.18'
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
@@ -9,10 +9,28 @@
99
import static com.github.franckyi.guapi.api.GuapiHelper.*;
1010

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

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

forge/src/main/resources/META-INF/mods.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ logoFile = "logo.png"
88
modId = "ibeeditor"
99
version = "${version}"
1010
displayName = "IBE Editor"
11-
updateJSONURL = "https://raw.githubusercontent.com/Franckyi/IBE-Editor/master/forge_update.json"
11+
updateJSONURL = "https://raw.githubusercontent.com/Franckyi/IBE-Editor/1.18/forge_update.json"
1212
displayURL = "https://www.curseforge.com/minecraft/mc-mods/ibe-editor"
1313
credits = "Thanks to Emex for the logo !"
1414
authors = "Franckyi"

forge_update.json

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

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.18.2
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.7

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)