mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix frog color translation
This commit is contained in:
parent
81bb6f124e
commit
eb23a46887
2 changed files with 7 additions and 2 deletions
|
@ -54,7 +54,12 @@ public class FrogEntity extends AnimalEntity {
|
|||
}
|
||||
|
||||
public void setFrogVariant(IntEntityMetadata entityMetadata) {
|
||||
dirtyMetadata.put(EntityData.VARIANT, entityMetadata.getPrimitiveValue());
|
||||
int variant = entityMetadata.getPrimitiveValue();
|
||||
dirtyMetadata.put(EntityData.VARIANT, switch (variant) {
|
||||
case 1 -> 2; // White
|
||||
case 2 -> 1; // Green
|
||||
default -> variant;
|
||||
});
|
||||
}
|
||||
|
||||
public void setTongueTarget(ObjectEntityMetadata<OptionalInt> entityMetadata) {
|
||||
|
|
|
@ -110,7 +110,7 @@ public class MathUtils {
|
|||
* @param high The high bound of the clamp
|
||||
* @return the clamped value
|
||||
*/
|
||||
public static double clamp(float value, float low, float high) {
|
||||
public static float clamp(float value, float low, float high) {
|
||||
if (value < low) {
|
||||
return low;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue