Server-side fog clip + Omnidirectional flare + resprite

This commit is contained in:
Anuken
2022-02-20 10:17:20 -05:00
parent 5fa4c09b1c
commit 5fa28e6090
23 changed files with 153 additions and 52 deletions

View File

@@ -49,13 +49,17 @@ public class NetworkIO{
stream.writeInt(player.id);
player.write(write);
stream.writeInt(Groups.sync.size());
boolean any = !state.rules.fog;
//write all synced entities *immediately*
for(Syncc entity : Groups.sync){
stream.writeInt(entity.id());
stream.writeByte(entity.classId());
entity.writeSync(write);
stream.writeInt(any ? Groups.sync.size() : 0);
if(any){
//write all synced entities *immediately*
for(Syncc entity : Groups.sync){
stream.writeInt(entity.id());
stream.writeByte(entity.classId());
entity.writeSync(write);
}
}
SaveIO.getSaveWriter().writeContentHeader(stream);