diff --git a/src/main/java/com/moulberry/flashback/playback/ReplayGamePacketHandler.java b/src/main/java/com/moulberry/flashback/playback/ReplayGamePacketHandler.java index ad6dae6..cd813d2 100644 --- a/src/main/java/com/moulberry/flashback/playback/ReplayGamePacketHandler.java +++ b/src/main/java/com/moulberry/flashback/playback/ReplayGamePacketHandler.java @@ -954,6 +954,11 @@ public class ReplayGamePacketHandler implements ClientGamePacketListener { 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)) { newServerPlayer.setShiftKeyDown(oldServerPlayer.isShiftKeyDown()); newServerPlayer.setSprinting(oldServerPlayer.isSprinting()); diff --git a/src/main/resources/flashback.accesswidener b/src/main/resources/flashback.accesswidener index 91e8cb8..4c6fcb0 100644 --- a/src/main/resources/flashback.accesswidener +++ b/src/main/resources/flashback.accesswidener @@ -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 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;