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));
|
packetListener.save(new EntityTrackerUpdateS2CPacket(player.getEntityId(), player.getDataTracker(), true));
|
||||||
//#endif
|
//#endif
|
||||||
lastX = lastY = lastZ = null;
|
lastX = lastY = lastZ = null;
|
||||||
|
//#if MC>=11100
|
||||||
|
playerItems.clear();
|
||||||
|
//#else
|
||||||
|
//$$ Collections.fill(playerItems, null);
|
||||||
|
//#endif
|
||||||
|
lastRiding = -1;
|
||||||
|
wasSleeping = false;
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user