Apply changeling pony ears fix from 1.20.2+

This commit is contained in:
Sollace 2024-04-26 21:01:08 +01:00
parent 040105c792
commit 82a89eb1ba
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -7,6 +7,7 @@ import net.minecraft.util.math.MathHelper;
import com.minelittlepony.api.model.IPart; import com.minelittlepony.api.model.IPart;
import com.minelittlepony.api.model.ModelAttributes; import com.minelittlepony.api.model.ModelAttributes;
import com.minelittlepony.api.pony.meta.Race;
import com.minelittlepony.mson.api.*; import com.minelittlepony.mson.api.*;
import com.minelittlepony.mson.api.model.PartBuilder; import com.minelittlepony.mson.api.model.PartBuilder;
@ -31,6 +32,11 @@ public class PonyEars implements IPart, MsonModel {
right.resetTransform(); right.resetTransform();
left.resetTransform(); left.resetTransform();
if (attributes.metadata.getRace() == Race.CHANGEDLING
|| attributes.metadata.getRace() == Race.CHANGELING) {
return;
}
limbSpeed = MathHelper.clamp(limbSpeed, 0, 1); limbSpeed = MathHelper.clamp(limbSpeed, 0, 1);
float forwardFold = 0.14F * limbSpeed; float forwardFold = 0.14F * limbSpeed;