mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-03 14:38:50 +00:00
Potentially fix skin customization being reset upon respawn
This commit is contained in:
1 parent
42fbd062c5
commit
63ac96bffb
2 files changed
+7
No files matched your search
@@ -954,6 +954,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());
|
||||||
|
|||||||
@@ -163,3 +163,5 @@ accessible field net/minecraft/client/sounds/SoundEngine executor Lnet/minecraft
|
|||||||
accessible field net/minecraft/client/sounds/SoundEngineExecutor thread Ljava/lang/Thread;
|
accessible field net/minecraft/client/sounds/SoundEngineExecutor thread Ljava/lang/Thread;
|
||||||
|
|
||||||
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