use of org.lanternpowered.server.effect.sound.LanternSoundType in project LanternServer by LanternPowered.
the class SoundTypeRegistryModule method registerDefaults.
@Override
public void registerDefaults() {
final Gson gson = new Gson();
final JsonArray array = gson.fromJson(new BufferedReader(new InputStreamReader(SoundTypeRegistryModule.class.getResourceAsStream("/internal/sound_events.json"))), JsonArray.class);
for (int i = 0; i < array.size(); i++) {
final String name = array.get(i).getAsString();
final String id = name.replaceAll("\\.", "_");
register(new LanternSoundType("minecraft", id, name, i));
}
}
Aggregations