mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-21 15:59:32 +00:00
Fix: force flag update for session players entity flags (#5810)
* Force flag update for session player when living entity flag update. * Requested changes. * Removed useless import.
This commit is contained in:
@@ -397,6 +397,17 @@ public class SessionPlayerEntity extends PlayerEntity {
|
|||||||
super.setAbsorptionHearts(entityMetadata);
|
super.setAbsorptionHearts(entityMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setLivingEntityFlags(ByteEntityMetadata entityMetadata) {
|
||||||
|
super.setLivingEntityFlags(entityMetadata);
|
||||||
|
|
||||||
|
// Forcefully update flags since we're not tracking thing like using item properly.
|
||||||
|
// For eg: when player start using item client-sided (and the USING_ITEM flag is false on geyser side)
|
||||||
|
// If the server disagree with the player using item state, it will send a metadata set USING_ITEM flag to false
|
||||||
|
// But since it never got set to true, nothing changed, causing the client to not receive the USING_ITEM flag they're supposed to.
|
||||||
|
this.forceFlagUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetMetadata() {
|
public void resetMetadata() {
|
||||||
super.resetMetadata();
|
super.resetMetadata();
|
||||||
|
|||||||
Reference in New Issue
Block a user