Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-24 23:30:22 +01:00
Support proper dimensions for player dying pose
Dieser Commit ist enthalten in:
Ursprung
c1e4040cb6
Commit
001a1a7a15
@ -382,15 +382,26 @@ public class PlayerEntity extends LivingEntity {
|
|||||||
@Override
|
@Override
|
||||||
protected void setDimensions(Pose pose) {
|
protected void setDimensions(Pose pose) {
|
||||||
float height;
|
float height;
|
||||||
|
float width;
|
||||||
switch (pose) {
|
switch (pose) {
|
||||||
case SNEAKING -> height = SNEAKING_POSE_HEIGHT;
|
case SNEAKING -> {
|
||||||
case FALL_FLYING, SPIN_ATTACK, SWIMMING -> height = 0.6f;
|
height = SNEAKING_POSE_HEIGHT;
|
||||||
|
width = definition.width();
|
||||||
|
}
|
||||||
|
case FALL_FLYING, SPIN_ATTACK, SWIMMING -> {
|
||||||
|
height = 0.6f;
|
||||||
|
width = definition.width();
|
||||||
|
}
|
||||||
|
case DYING -> {
|
||||||
|
height = 0.2f;
|
||||||
|
width = 0.2f;
|
||||||
|
}
|
||||||
default -> {
|
default -> {
|
||||||
super.setDimensions(pose);
|
super.setDimensions(pose);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setBoundingBoxWidth(definition.width());
|
setBoundingBoxWidth(width);
|
||||||
setBoundingBoxHeight(height);
|
setBoundingBoxHeight(height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren