Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-10-05 01:11:08 +02:00
Fix bounding box for 1.19.40 after death + respawn (#3374)
Co-authored-by: onebeastchris <105284508+onebeastchris@users.noreply.github.com>
Dieser Commit ist enthalten in:
Ursprung
0d3b77e567
Commit
cc82f4b871
@ -120,6 +120,16 @@ public class SessionPlayerEntity extends PlayerEntity {
|
||||
refreshSpeed = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Since 1.19.40, the client must be re-informed of its bounding box on respawn
|
||||
* See https://github.com/GeyserMC/Geyser/issues/3370
|
||||
*/
|
||||
public void updateBoundingBox() {
|
||||
dirtyMetadata.put(EntityData.BOUNDING_BOX_HEIGHT, getBoundingBoxHeight());
|
||||
dirtyMetadata.put(EntityData.BOUNDING_BOX_WIDTH, getBoundingBoxWidth());
|
||||
updateBedrockMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBoundingBoxHeight(float height) {
|
||||
if (super.setBoundingBoxHeight(height)) {
|
||||
|
@ -75,6 +75,9 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
|
||||
attributesPacket.setRuntimeEntityId(entity.getGeyserId());
|
||||
attributesPacket.getAttributes().addAll(entity.getAttributes().values());
|
||||
session.sendUpstreamPacket(attributesPacket);
|
||||
|
||||
// Bounding box must be sent after a player dies and respawns since 1.19.40
|
||||
entity.updateBoundingBox();
|
||||
break;
|
||||
case START_SWIMMING:
|
||||
if (!entity.getFlag(EntityFlag.SWIMMING)) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren