mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Support proper dimensions for player dying pose
This commit is contained in:
parent
c1e4040cb6
commit
001a1a7a15
1 changed files with 14 additions and 3 deletions
|
@ -382,15 +382,26 @@ public class PlayerEntity extends LivingEntity {
|
|||
@Override
|
||||
protected void setDimensions(Pose pose) {
|
||||
float height;
|
||||
float width;
|
||||
switch (pose) {
|
||||
case SNEAKING -> height = SNEAKING_POSE_HEIGHT;
|
||||
case FALL_FLYING, SPIN_ATTACK, SWIMMING -> height = 0.6f;
|
||||
case SNEAKING -> {
|
||||
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 -> {
|
||||
super.setDimensions(pose);
|
||||
return;
|
||||
}
|
||||
}
|
||||
setBoundingBoxWidth(definition.width());
|
||||
setBoundingBoxWidth(width);
|
||||
setBoundingBoxHeight(height);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue