mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
Make arms stretch out when elytra flying
# Conflicts: # src/main/java/com/brohoof/minelittlepony/model/pony/ModelSkeletonPony.java # Conflicts: # src/main/java/com/brohoof/minelittlepony/model/pony/ModelSkeletonPony.java
This commit is contained in:
parent
f9ebdd8867
commit
566bdce0a9
6 changed files with 28 additions and 20 deletions
|
@ -78,7 +78,7 @@ public class ModelPlayerPony extends AbstractPonyModel implements PonyModelConst
|
|||
this.bipedHead.offsetZ = 0f;
|
||||
this.bipedHeadwear.offsetY = 0f;
|
||||
this.bipedHeadwear.offsetZ = 0f;
|
||||
this.setLegs(move, swing, tick);
|
||||
this.setLegs(move, swing, tick, entity);
|
||||
this.holdItem();
|
||||
this.swingItem(entity, this.swingProgress);
|
||||
if (this.isSneak && !this.isFlying) {
|
||||
|
@ -163,11 +163,10 @@ public class ModelPlayerPony extends AbstractPonyModel implements PonyModelConst
|
|||
}
|
||||
|
||||
protected void checkRainboom(Entity entity, float swing) {
|
||||
this.rainboom = this.metadata.getRace() != null && this.metadata.getRace().hasWings() && this.isFlying && swing >= 0.9999F;
|
||||
boolean flying = this.metadata.getRace() != null && this.metadata.getRace().hasWings() && this.isFlying
|
||||
|| entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying();
|
||||
|
||||
if (entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying()) {
|
||||
this.rainboom = true;
|
||||
}
|
||||
this.rainboom = flying && swing >= 0.9999F;
|
||||
}
|
||||
|
||||
protected void setHead(float posX, float posY, float posZ) {
|
||||
|
@ -196,17 +195,17 @@ public class ModelPlayerPony extends AbstractPonyModel implements PonyModelConst
|
|||
this.bipedHeadwear.rotateAngleX = headRotateAngleX;
|
||||
}
|
||||
|
||||
protected void setLegs(float move, float swing, float tick) {
|
||||
this.rotateLegs(move, swing, tick);
|
||||
protected void setLegs(float move, float swing, float tick, Entity entity) {
|
||||
this.rotateLegs(move, swing, tick, entity);
|
||||
this.adjustLegs();
|
||||
}
|
||||
|
||||
protected void rotateLegs(float move, float swing, float tick) {
|
||||
protected void rotateLegs(float move, float swing, float tick, Entity entity) {
|
||||
float rightArmRotateAngleX;
|
||||
float leftArmRotateAngleX;
|
||||
float rightLegRotateAngleX;
|
||||
float leftLegRotateAngleX;
|
||||
if (this.isFlying && this.metadata.getRace().hasWings()) {
|
||||
if (this.isFlying && this.metadata.getRace().hasWings() || entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying()) {
|
||||
if (this.rainboom) {
|
||||
rightArmRotateAngleX = ROTATE_270;
|
||||
leftArmRotateAngleX = ROTATE_270;
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.brohoof.minelittlepony.model.pony;
|
|||
|
||||
import static net.minecraft.client.renderer.GlStateManager.*;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class ModelSkeletonPony extends ModelPlayerPony {
|
||||
|
@ -11,7 +13,7 @@ public class ModelSkeletonPony extends ModelPlayerPony {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void rotateLegs(float move, float swing, float tick) {
|
||||
protected void rotateLegs(float move, float swing, float tick, Entity entity) {
|
||||
|
||||
float rightArmRotateAngleX;
|
||||
float leftArmRotateAngleX;
|
||||
|
@ -19,7 +21,7 @@ public class ModelSkeletonPony extends ModelPlayerPony {
|
|||
float leftLegRotateAngleX;
|
||||
float var8;
|
||||
float var9;
|
||||
if (this.isFlying && this.metadata.getRace().hasWings()) {
|
||||
if (this.isFlying && this.metadata.getRace().hasWings() || entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying()) {
|
||||
if (this.rainboom) {
|
||||
rightArmRotateAngleX = ROTATE_270;
|
||||
leftArmRotateAngleX = ROTATE_270;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.brohoof.minelittlepony.model.pony;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class ModelZombiePony extends ModelPlayerPony {
|
||||
|
@ -9,7 +11,7 @@ public class ModelZombiePony extends ModelPlayerPony {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void rotateLegs(float move, float swing, float tick) {
|
||||
protected void rotateLegs(float move, float swing, float tick, Entity entity) {
|
||||
float rightArmRotateAngleX;
|
||||
float leftArmRotateAngleX;
|
||||
float rightLegRotateAngleX;
|
||||
|
@ -17,7 +19,7 @@ public class ModelZombiePony extends ModelPlayerPony {
|
|||
float var8;
|
||||
float var9;
|
||||
// why are zombies flying?
|
||||
if (this.isFlying && this.metadata.getRace().hasWings()) {
|
||||
if (this.isFlying && this.metadata.getRace().hasWings() || entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying()) {
|
||||
if (this.rainboom) {
|
||||
rightArmRotateAngleX = ROTATE_270;
|
||||
leftArmRotateAngleX = ROTATE_270;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ModelPonyArmor extends ModelPlayerPony {
|
|||
this.extHead[0].offsetZ = 0f;
|
||||
this.extHead[1].offsetY = 0f;
|
||||
this.extHead[1].offsetZ = 0f;
|
||||
this.setLegs(move, swing, tick);
|
||||
this.setLegs(move, swing, tick, entity);
|
||||
this.holdItem();
|
||||
this.swingItem(entity, this.swingProgress);
|
||||
if (this.isSneak && !this.isFlying) {
|
||||
|
@ -198,6 +198,7 @@ public class ModelPonyArmor extends ModelPlayerPony {
|
|||
this.bipedLeftLeg.mirror = true;
|
||||
this.steveRightArm = new ModelRenderer(this, 0, 16);
|
||||
this.unicornArmRight = new ModelRenderer(this, 0, 16);
|
||||
this.unicornArmLeft = new ModelRenderer(this, 0, 16);
|
||||
this.extLegs[0] = new ModelRenderer(this, 48, 8);
|
||||
this.extLegs[1] = new ModelRenderer(this, 48, 8);
|
||||
this.extLegs[1].mirror = true;
|
||||
|
@ -272,8 +273,8 @@ public class ModelPonyArmor extends ModelPlayerPony {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void rotateLegs(float move, float swing, float tick) {
|
||||
super.rotateLegs(move, swing, tick);
|
||||
protected void rotateLegs(float move, float swing, float tick, Entity entity) {
|
||||
super.rotateLegs(move, swing, tick, entity);
|
||||
this.syncLegs();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
package com.brohoof.minelittlepony.model.pony.armor;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class ModelSkeletonPonyArmor extends ModelPonyArmor {
|
||||
|
||||
@Override
|
||||
protected void rotateLegs(float move, float swing, float tick) {
|
||||
protected void rotateLegs(float move, float swing, float tick, Entity entity) {
|
||||
float rightArmRotateAngleX;
|
||||
float leftArmRotateAngleX;
|
||||
float rightLegRotateAngleX;
|
||||
float leftLegRotateAngleX;
|
||||
float var8;
|
||||
float var9;
|
||||
if (this.isFlying && this.metadata.getRace().hasWings()) {
|
||||
if (this.isFlying && this.metadata.getRace().hasWings() || entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying()) {
|
||||
if (this.rainboom) {
|
||||
rightArmRotateAngleX = ROTATE_270;
|
||||
leftArmRotateAngleX = ROTATE_270;
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
package com.brohoof.minelittlepony.model.pony.armor;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class ModelZombiePonyArmor extends ModelPonyArmor {
|
||||
|
||||
@Override
|
||||
protected void rotateLegs(float move, float swing, float tick) {
|
||||
protected void rotateLegs(float move, float swing, float tick, Entity entity) {
|
||||
float rightArmRotateAngleX;
|
||||
float leftArmRotateAngleX;
|
||||
float rightLegRotateAngleX;
|
||||
float leftLegRotateAngleX;
|
||||
float var8;
|
||||
float var9;
|
||||
if (this.isFlying && this.metadata.getRace().hasWings()) {
|
||||
if (this.isFlying && this.metadata.getRace().hasWings() || entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying()) {
|
||||
if (this.rainboom) {
|
||||
rightArmRotateAngleX = ROTATE_270;
|
||||
leftArmRotateAngleX = ROTATE_270;
|
||||
|
|
Loading…
Reference in a new issue