Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Properly implement freezing ticks
Dieser Commit ist enthalten in:
Ursprung
b2ebfc6803
Commit
ef0503ede0
@ -305,9 +305,11 @@ public class Entity {
|
|||||||
metadata.getFlags().setFlag(EntityFlag.SWIMMING, pose.equals(Pose.SWIMMING));
|
metadata.getFlags().setFlag(EntityFlag.SWIMMING, pose.equals(Pose.SWIMMING));
|
||||||
setDimensions(pose);
|
setDimensions(pose);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7: // Freezing ticks
|
||||||
//TODO check
|
// The value that Java edition gives us is in ticks, but Bedrock uses a float percentage of the strength 0.0 -> 1.0
|
||||||
metadata.put(EntityData.FREEZING_EFFECT_STRENGTH, entityMetadata.getValue());
|
// The Java client caps its freezing tick percentage at 140
|
||||||
|
int freezingTicks = Math.min((int) entityMetadata.getValue(), 140);
|
||||||
|
metadata.put(EntityData.FREEZING_EFFECT_STRENGTH, (freezingTicks / (float) 140));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren