mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 23:55:10 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
3b7f9627eb
1 file changed
+8
-4
@@ -12,7 +12,7 @@ import java.util.function.Supplier;
|
||||
|
||||
public class Register<T> {
|
||||
private final String registryKey;
|
||||
private final String namespace;
|
||||
protected final String namespace;
|
||||
protected final Map<String, Supplier<T>> entries = new LinkedHashMap<>();
|
||||
|
||||
public Register(String registryKey, String namespace) {
|
||||
@@ -47,9 +47,13 @@ public class Register<T> {
|
||||
this.modClass = modClass;
|
||||
}
|
||||
|
||||
public void register() throws Exception {
|
||||
for (Map.Entry<String, Supplier<Animation>> entry : entries.entrySet()) {
|
||||
AnimationController.Instance.loadBuiltInAnimation(modClass, animationsPath, entry.getKey());
|
||||
public void register() {
|
||||
try {
|
||||
for (Map.Entry<String, Supplier<Animation>> entry : entries.entrySet()) {
|
||||
AnimationController.Instance.loadBuiltInAnimation(modClass, animationsPath, entry.getKey());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogWriter.error("Error scanning built-in animations folder", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user