Fixes for invisible players and improper respawning

This commit is contained in:
Anuken
2018-01-20 11:39:31 -05:00
parent f14ec2e87a
commit c0a78858f4
8 changed files with 110 additions and 75 deletions
@@ -496,4 +496,18 @@ public class Packets {
enabled = buffer.get() == 1;
}
}
public static class PlayerDeathPacket implements Packet{
public int id;
@Override
public void write(ByteBuffer buffer) {
buffer.putInt(id);
}
@Override
public void read(ByteBuffer buffer) {
id = buffer.getInt();
}
}
}
@@ -36,6 +36,7 @@ public class Registrator {
ConnectConfirmPacket.class,
GameOverPacket.class,
FriendlyFireChangePacket.class,
PlayerDeathPacket.class,
};
private static ObjectIntMap<Class<?>> ids = new ObjectIntMap<>();