Fix up some issues.
This commit is contained in:
@@ -96,8 +96,9 @@ public class OmegaConfig implements ModInitializer {
|
||||
}
|
||||
|
||||
return config;
|
||||
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException exception) {
|
||||
exception.printStackTrace();
|
||||
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException |
|
||||
InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("No valid constructor found for: " + configClass.getName());
|
||||
}
|
||||
}
|
||||
@@ -179,10 +180,8 @@ public class OmegaConfig implements ModInitializer {
|
||||
|
||||
Class<?>[] classes = aClass.getDeclaredClasses();
|
||||
|
||||
if (classes.length != 0) {
|
||||
for (Class<?> clazz : classes) {
|
||||
populateRecursively(list, clazz);
|
||||
}
|
||||
for (Class<?> clazz : classes) {
|
||||
populateRecursively(list, clazz);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.fabricmc.fabric.api.util.NbtType;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.RunArgs;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtElement;
|
||||
import net.minecraft.nbt.NbtList;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
@@ -36,7 +37,7 @@ public class ClientMixin {
|
||||
|
||||
client.execute(() -> {
|
||||
if (tag != null && tag.contains("Configurations")) {
|
||||
NbtList list = tag.getList("Configurations", NbtType.COMPOUND);
|
||||
NbtList list = tag.getList("Configurations", NbtElement.COMPOUND_TYPE);
|
||||
list.forEach(compound -> {
|
||||
NbtCompound syncedConfiguration = (NbtCompound) compound;
|
||||
String name = syncedConfiguration.getString("ConfigName");
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
"description": "The last config solution you will ever use.",
|
||||
"authors": [
|
||||
"Draylar",
|
||||
"Frqnny"
|
||||
"Frqnny",
|
||||
"Big Duckie"
|
||||
],
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
@@ -14,10 +15,10 @@
|
||||
]
|
||||
},
|
||||
"contact": {
|
||||
"homepage": "https://github.com/Draylar/omega-config",
|
||||
"sources": "https://github.com/Draylar/omega-config",
|
||||
"issues": "https://github.com/Draylar/omega-config/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Draylar/omega-config",
|
||||
"sources": "https://github.com/Draylar/omega-config",
|
||||
"issues": "https://github.com/Draylar/omega-config/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"environment": "*",
|
||||
"mixins": [
|
||||
@@ -28,9 +29,11 @@
|
||||
"fabric": "*",
|
||||
"minecraft": "*"
|
||||
},
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"badges": [ "library" ]
|
||||
}
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"badges": [
|
||||
"library"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user