File tree Expand file tree Collapse file tree 6 files changed +8
-18
lines changed
java/org/visuals/legacy/lightconfig/lib/v1 Expand file tree Collapse file tree 6 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,13 @@ public void load() {
9191 return ;
9292 }
9393
94+ boolean success = true ;
9495 try {
9596 final String json = Files .readString (this .path );
9697 final JsonObject object = ((JsonElement ) this .serializer .deserialize (json )).getAsJsonObject ();
9798 if (object == null ) {
9899 this .logger .warn ("Failed to load config! Defaulting to original settings." );
100+ success = false ;
99101 } else {
100102 this .configFields .forEach (field -> {
101103 try {
@@ -110,7 +112,9 @@ public void load() {
110112 return ;
111113 }
112114
113- this .logger .info ("Config successfully loaded!" );
115+ if (success ) {
116+ this .logger .info ("Config successfully loaded!" );
117+ }
114118 }
115119
116120 public void save () {
Original file line number Diff line number Diff line change 2222 * "MINECRAFT" LINKING EXCEPTION TO THE GPL
2323 */
2424
25- package org .visuals .legacy .lightconfig .lib ;
25+ package org .visuals .legacy .lightconfig .lib . v1 ;
2626
2727import net .minecraft .network .chat .Component ;
2828
Original file line number Diff line number Diff line change 3030import net .minecraft .client .gui .components .Button ;
3131import net .minecraft .client .gui .components .Tooltip ;
3232import net .minecraft .network .chat .Component ;
33- import org .visuals .legacy .lightconfig .lib .ConfigTranslate ;
33+ import org .visuals .legacy .lightconfig .lib .v1 . ConfigTranslate ;
3434import org .visuals .legacy .lightconfig .lib .v1 .Config ;
3535
3636public class BooleanConfigField extends GenericConfigField <Boolean > {
Original file line number Diff line number Diff line change 3131import net .minecraft .client .gui .components .Button ;
3232import net .minecraft .client .gui .components .Tooltip ;
3333import net .minecraft .network .chat .Component ;
34- import org .visuals .legacy .lightconfig .lib .ConfigTranslate ;
34+ import org .visuals .legacy .lightconfig .lib .v1 . ConfigTranslate ;
3535import org .visuals .legacy .lightconfig .lib .v1 .Config ;
3636
3737import java .util .Arrays ;
Original file line number Diff line number Diff line change 1111 "license" : " GPL-3.0-with-linking-exception" ,
1212 "icon" : " assets/lightconfig/icon.png" ,
1313 "environment" : " client" ,
14- "entrypoints" : {},
15- "mixins" : [
16- " lightconfig.mixins.json"
17- ],
1814 "depends" : {
1915 "fabricloader" : " *" ,
2016 "minecraft" : " ~1.21.9"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments