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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user