mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-19 15:09:15 +00:00
修复声音错误验证sound event
This commit is contained in:
@@ -1419,6 +1419,10 @@ public abstract class AbstractPackManager implements PackManager {
|
|||||||
oggToSoundEvents.put(Key.of(primitive.getAsString()), soundKey);
|
oggToSoundEvents.put(Key.of(primitive.getAsString()), soundKey);
|
||||||
}
|
}
|
||||||
} else if (sound instanceof JsonObject soundObj && soundObj.has("name")) {
|
} else if (sound instanceof JsonObject soundObj && soundObj.has("name")) {
|
||||||
|
if (soundObj.has("type")) {
|
||||||
|
String type = soundObj.get("type").getAsString();
|
||||||
|
if (!type.equals("file")) continue;
|
||||||
|
}
|
||||||
String name = soundObj.get("name").getAsString();
|
String name = soundObj.get("name").getAsString();
|
||||||
oggToSoundEvents.put(Key.of(name), soundKey);
|
oggToSoundEvents.put(Key.of(name), soundKey);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user