Fix human arm when sneaking

This commit is contained in:
Matthew Messinger 2015-08-17 02:20:31 -04:00
parent e844b6105c
commit 3f1e6a84f4

View file

@ -78,9 +78,9 @@ public abstract class ModelPony extends ModelPlayer {
@Override @Override
public final void setRotationAngles(float f1, float f2, float f3, float f4, float f5, float f6, Entity ent) { public final void setRotationAngles(float f1, float f2, float f3, float f4, float f5, float f6, Entity ent) {
// set the angles for the humans in preparation for arm rendering // set the angles for the humans in preparation for arm rendering
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
// Comes from RenderPlayer.render[Left|Right]Arm? // Comes from RenderPlayer.render[Left|Right]Arm?
if (stack[2].getClassName().equals(RenderPlayer.class.getName())) { if (PMAPI.human.model != this
&& Thread.currentThread().getStackTrace()[2].getClassName().equals(RenderPlayer.class.getName())) {
PMAPI.human.model.setModelVisibilities((AbstractClientPlayer) ent); PMAPI.human.model.setModelVisibilities((AbstractClientPlayer) ent);
PMAPI.human.model.isSneak = isSneak; PMAPI.human.model.isSneak = isSneak;
PMAPI.human.model.swingProgress = swingProgress; PMAPI.human.model.swingProgress = swingProgress;