This commit is contained in:
Anuken 2019-10-27 15:25:15 -04:00
parent e103d62b75
commit 101f5351bd
3 changed files with 4 additions and 3 deletions

View File

@ -29,7 +29,6 @@ public class MusicControl{
public MusicControl(){ public MusicControl(){
Events.on(ClientLoadEvent.class, e -> reload()); Events.on(ClientLoadEvent.class, e -> reload());
Events.on(ContentReloadEvent.class, e -> reload());
//only run music 10 seconds after a wave spawns //only run music 10 seconds after a wave spawns
Events.on(WaveEvent.class, e -> Time.run(60f * 10f, () -> { Events.on(WaveEvent.class, e -> Time.run(60f * 10f, () -> {

View File

@ -257,9 +257,7 @@ public class Mods implements Loadable{
disabled.clear(); disabled.clear();
load(); load();
buildFiles(); buildFiles();
Musics.dispose();
Sounds.dispose(); Sounds.dispose();
Musics.load();
Sounds.load(); Sounds.load();
Core.assets.finishLoading(); Core.assets.finishLoading();
content.clear(); content.clear();

View File

@ -28,6 +28,7 @@ public class NetworkIO{
stream.writeInt(player.id); stream.writeInt(player.id);
player.write(stream); player.write(stream);
SaveIO.getSaveWriter().writeContentHeader(stream);
SaveIO.getSaveWriter().writeMap(stream); SaveIO.getSaveWriter().writeMap(stream);
}catch(IOException e){ }catch(IOException e){
throw new RuntimeException(e); throw new RuntimeException(e);
@ -51,9 +52,12 @@ public class NetworkIO{
player.resetID(id); player.resetID(id);
player.add(); player.add();
SaveIO.getSaveWriter().readContentHeader(stream);
SaveIO.getSaveWriter().readMap(stream, world.context); SaveIO.getSaveWriter().readMap(stream, world.context);
}catch(IOException e){ }catch(IOException e){
throw new RuntimeException(e); throw new RuntimeException(e);
}finally{
content.setTemporaryMapper(null);
} }
} }