mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-03 22:16:28 +00:00
Potentially fix skin customization being reset upon respawn
This commit is contained in:
1 parent
38970f47bc
commit
7c4754b41a
2 files changed
+7
No files matched your search
@@ -934,6 +934,11 @@ public class ReplayGamePacketHandler implements ClientGamePacketListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy over the customization & main hand even if the entity data flag isn't set
|
||||||
|
// This should ensure that the skin layers are kept properly when respawning
|
||||||
|
newServerPlayer.getEntityData().set(Player.DATA_PLAYER_MODE_CUSTOMISATION, oldServerPlayer.getEntityData().get(Player.DATA_PLAYER_MODE_CUSTOMISATION));
|
||||||
|
newServerPlayer.getEntityData().set(Player.DATA_PLAYER_MAIN_HAND, oldServerPlayer.getEntityData().get(Player.DATA_PLAYER_MAIN_HAND));
|
||||||
|
|
||||||
if (clientboundRespawnPacket.shouldKeep((byte)2)) {
|
if (clientboundRespawnPacket.shouldKeep((byte)2)) {
|
||||||
newServerPlayer.setShiftKeyDown(oldServerPlayer.isShiftKeyDown());
|
newServerPlayer.setShiftKeyDown(oldServerPlayer.isShiftKeyDown());
|
||||||
newServerPlayer.setSprinting(oldServerPlayer.isSprinting());
|
newServerPlayer.setSprinting(oldServerPlayer.isSprinting());
|
||||||
|
|||||||
@@ -178,3 +178,5 @@ accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPa
|
|||||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket onGround Z
|
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket onGround Z
|
||||||
|
|
||||||
accessible class net/minecraft/world/level/border/WorldBorder$MovingBorderExtent
|
accessible class net/minecraft/world/level/border/WorldBorder$MovingBorderExtent
|
||||||
|
accessible field net/minecraft/world/entity/player/Player DATA_PLAYER_MODE_CUSTOMISATION Lnet/minecraft/network/syncher/EntityDataAccessor;
|
||||||
|
accessible field net/minecraft/world/entity/player/Player DATA_PLAYER_MAIN_HAND Lnet/minecraft/network/syncher/EntityDataAccessor;
|
||||||
Reference in new issue
Block a user