3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-08 10:50:11 +02:00

No need to cast here (thanks Konica)

Dieser Commit ist enthalten in:
Camotoy 2021-06-06 14:41:41 -04:00
Ursprung 9568a3a866
Commit 3835da288f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -309,7 +309,7 @@ public class Entity {
// The value that Java edition gives us is in ticks, but Bedrock uses a float percentage of the strength 0.0 -> 1.0 // The value that Java edition gives us is in ticks, but Bedrock uses a float percentage of the strength 0.0 -> 1.0
// The Java client caps its freezing tick percentage at 140 // The Java client caps its freezing tick percentage at 140
int freezingTicks = Math.min((int) entityMetadata.getValue(), 140); int freezingTicks = Math.min((int) entityMetadata.getValue(), 140);
metadata.put(EntityData.FREEZING_EFFECT_STRENGTH, (freezingTicks / (float) 140)); metadata.put(EntityData.FREEZING_EFFECT_STRENGTH, (freezingTicks / 140f));
break; break;
} }
} }