mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-25 19:45:21 +01:00
Fix hardcore flag
This commit is contained in:
parent
3ddd289b49
commit
7f2023176f
@ -26,7 +26,10 @@ public class EntityPackets {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.INT); // Entity ID
|
||||
handler(wrapper -> wrapper.write(Type.BOOLEAN, false)); // Hardcore //TODO save?
|
||||
handler(wrapper -> {
|
||||
short gamemode = wrapper.passthrough(Type.UNSIGNED_BYTE);
|
||||
wrapper.write(Type.BOOLEAN, (gamemode & 0x08) != 0); // Hardcore
|
||||
});
|
||||
map(Type.UNSIGNED_BYTE); // Gamemode
|
||||
map(Type.BYTE); // Previous Gamemode
|
||||
map(Type.STRING_ARRAY); // World List
|
||||
|
Loading…
Reference in New Issue
Block a user