mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +01:00
Add a few more checks for flying skills (no more flying mud ponies)
This commit is contained in:
parent
fded14ad6d
commit
289f00bd6f
1 changed files with 5 additions and 3 deletions
|
@ -177,6 +177,11 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
|
||||||
shift = Shift.AFTER))
|
shift = Shift.AFTER))
|
||||||
private void onRotateCorpse(AbstractClientPlayer player, float yaw, float pitch, float ticks, CallbackInfo ci) {
|
private void onRotateCorpse(AbstractClientPlayer player, float yaw, float pitch, float ticks, CallbackInfo ci) {
|
||||||
if (this.mainModel instanceof ModelPlayerPony) {
|
if (this.mainModel instanceof ModelPlayerPony) {
|
||||||
|
// require arms to be stretched out (sorry mud ponies, no flight skills for you)
|
||||||
|
if (!((ModelPlayerPony) this.mainModel).rainboom) {
|
||||||
|
this.playerModel.getModel().motionPitch = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
double motionX = player.posX - player.prevPosX;
|
double motionX = player.posX - player.prevPosX;
|
||||||
double motionY = player.posY - player.prevPosY;
|
double motionY = player.posY - player.prevPosY;
|
||||||
double motionZ = player.posZ - player.prevPosZ;
|
double motionZ = player.posZ - player.prevPosZ;
|
||||||
|
@ -192,9 +197,6 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
|
||||||
angle /= 2;
|
angle /= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.moveForward < 0) {
|
|
||||||
angle *= -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (angle > Math.PI / 3)
|
if (angle > Math.PI / 3)
|
||||||
angle = Math.PI / 3;
|
angle = Math.PI / 3;
|
||||||
|
|
Loading…
Reference in a new issue