Fix armor missing after dimension change (fixes #791)

The respawn packet re-creates the player entity, so we need to re-send its
armor (and technically also the riding and sleeping state, though that probably
wouldn't ever have caused issues in practice because a respawn will implicitly
reset those, unlike your inventory which is preserved).
This commit is contained in:
Jonas Herzig
2022-12-06 17:58:58 +01:00
parent 19404032fe
commit e0a682a5df

View File

@@ -108,6 +108,13 @@ public class RecordingEventHandler extends EventRegistrations {
packetListener.save(new EntityTrackerUpdateS2CPacket(player.getEntityId(), player.getDataTracker(), true));
//#endif
lastX = lastY = lastZ = null;
//#if MC>=11100
playerItems.clear();
//#else
//$$ Collections.fill(playerItems, null);
//#endif
lastRiding = -1;
wasSleeping = false;
} catch(Exception e) {
e.printStackTrace();
}