Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.

Commit f8f42e9

Browse files
committed
remove preview features;
update dependency
1 parent 203bf13 commit f8f42e9

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,10 @@ processResources {
4444
tasks.withType(JavaCompile) {
4545
options.encoding = "UTF-8"
4646

47-
// Minecraft 1.18 upwards uses Java 17.
47+
// Minecraft 1.18 upwards uses Java 17. 1.20.5 upwards uses Java 21
4848
it.options.release = 21
4949
}
5050

51-
// https://stackoverflow.com/questions/61849514/how-to-set-the-use-enable-preview-compile-and-run-flags-from-gradle
52-
tasks.withType(JavaCompile).all {
53-
options.compilerArgs += ['--enable-preview']
54-
}
55-
5651
java {
5752
withSourcesJar()
5853
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx1G
33
# Fabric Properties
44
# check these on https://fabricmc.net/use
55
minecraft_version=1.21
6-
yarn_mappings=1.21+build.2
6+
yarn_mappings=1.21+build.7
77
loader_version=0.15.11
88
# Mod Properties
99
maven_group=github.io.lucunji
1010
# Dependencies
1111
# Fabric api
12-
fabric_version=0.100.3+1.21
12+
fabric_version=0.100.4+1.21
1313
# mod menu
14-
mod_menu_version=11.0.0
14+
mod_menu_version=11.0.1

src/main/java/github/io/lucunji/explayerenderer/api/config/ConfigWidgetRegistry.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public <T, U extends ConfigOption<T>> Optional<ListWidget.ListEntry> getConfigEn
5555
}
5656

5757
private static <T> ButtonWidget getResetButton(ConfigOption<T> option, ConfigValueUpdater<T> setter) {
58-
var reset = new ConfigButton(RESET_BUTTON_WIDTH, WIDGET_HEIGHT, Text.translatable(RESET_LANGKEY), _ -> setter.setValue(option.getDefaultValue()));
58+
var reset = new ConfigButton(RESET_BUTTON_WIDTH, WIDGET_HEIGHT, Text.translatable(RESET_LANGKEY), self -> setter.setValue(option.getDefaultValue()));
5959
reset.active = !option.isValueDefault();
6060
return reset;
6161
}
@@ -80,7 +80,7 @@ private static ListWidget.ListEntry getDoubleSlider(RangedConfigOption<Double> o
8080
WIDGET_WIDTH, WIDGET_HEIGHT,
8181
(option.getValue() - option.getMin()) / (option.getMax() - option.getMin()),
8282
val -> setter.setValue(MathHelper.lerp(val, option.getMin(), option.getMax())),
83-
_ -> Text.of("%.2f".formatted(option.getValue())));
83+
val -> Text.of("%.2f".formatted(option.getValue())));
8484
var reset = getResetButton(option, setter);
8585
setter.setUpdateHandler(val -> {
8686
option.setValue(val);
@@ -97,7 +97,7 @@ private static ListWidget.ListEntry getIntegerSlider(RangedConfigOption<Integer>
9797
WIDGET_WIDTH, WIDGET_HEIGHT,
9898
(option.getValue() - option.getMin()) / steps,
9999
val -> setter.setValue((int) Math.round(val * steps) + option.getMin()),
100-
_ -> Text.of(Integer.toString(option.getValue())));
100+
val -> Text.of(Integer.toString(option.getValue())));
101101
var reset = getResetButton(option, setter);
102102
setter.setUpdateHandler(val -> {
103103
option.setValue(val);
@@ -112,7 +112,7 @@ private static ListWidget.ListEntry getOnOffButton(ConfigOption<Boolean> option)
112112
var btn = new ConfigButton(
113113
WIDGET_WIDTH, WIDGET_HEIGHT,
114114
Text.translatable(option.getValue() ? ON_LANGKEY : OFF_LANGKEY),
115-
_ -> setter.setValue(!option.getValue()));
115+
self -> setter.setValue(!option.getValue()));
116116
var reset = getResetButton(option, setter);
117117
setter.setUpdateHandler(val -> {
118118
option.setValue(val);
@@ -132,7 +132,7 @@ private static <T extends Enum<?>> ListWidget.ListEntry getEnumCycleButton(Confi
132132
var btn = new ConfigButton(
133133
WIDGET_WIDTH, WIDGET_HEIGHT,
134134
translations[option.getValue().ordinal()],
135-
_ -> setter.setValue(values[(option.getValue().ordinal() + 1) % values.length]));
135+
self -> setter.setValue(values[(option.getValue().ordinal() + 1) % values.length]));
136136
var reset = getResetButton(option, setter);
137137
setter.setUpdateHandler(val -> {
138138
option.setValue(val);

src/main/java/github/io/lucunji/explayerenderer/config/GsonConfigPersistence.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ else if (option.getType().isEnum())
124124
private Map<Identifier, Map<Identifier, ConfigOption<?>>> categorize(List<? extends ConfigOption<?>> options) {
125125
var categories = new LinkedHashMap<Identifier, Map<Identifier, ConfigOption<?>>>();
126126
for (ConfigOption<?> option : options)
127-
categories.computeIfAbsent(option.getCategory(), _ -> new LinkedHashMap<>()).put(option.getId(), option);
127+
categories.computeIfAbsent(option.getCategory(), k -> new LinkedHashMap<>()).put(option.getId(), option);
128128
return categories;
129129
}
130130
}

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 1,
33
"id": "explayerenderer",
4-
"version": "3.0.0-alpha.4",
4+
"version": "3.0.0-alpha.5",
55

66
"name": "ExtraPlayerRenderer",
77
"description": "Render an extra player figure on your screen. Made for game streaming and recordings.",

0 commit comments

Comments
 (0)