mirror of
https://github.com/GeyserMC/Geyser.git
synced 2026-01-06 15:41:50 +00:00
Reset inventories on world switch
This commit is contained in:
@@ -56,6 +56,8 @@ public class AreaEffectCloudEntity extends Entity {
|
||||
dirtyMetadata.put(EntityDataTypes.AREA_EFFECT_CLOUD_RADIUS, 3.0f);
|
||||
dirtyMetadata.put(EntityDataTypes.AREA_EFFECT_CLOUD_CHANGE_ON_PICKUP, Float.MIN_VALUE);
|
||||
|
||||
//noinspection deprecation - still needed for these to show up
|
||||
dirtyMetadata.put(EntityDataTypes.AREA_EFFECT_CLOUD_CHANGE_RATE, Float.MIN_VALUE);
|
||||
setFlag(EntityFlag.FIRE_IMMUNE, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,11 @@ public class JavaLoginTranslator extends PacketTranslator<ClientboundLoginPacket
|
||||
// Remove extra hearts, hunger, etc.
|
||||
entity.resetAttributes();
|
||||
entity.resetMetadata();
|
||||
|
||||
// Reset inventories; just in case. Might resolve some issues where inventories get stuck?
|
||||
session.setInventoryHolder(null);
|
||||
session.setPendingOrCurrentBedrockInventoryId(-1);
|
||||
session.setClosingInventory(false);
|
||||
}
|
||||
|
||||
session.setDimensionType(newDimension);
|
||||
|
||||
Reference in New Issue
Block a user