mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Fixed vertical positioning when swimming/crawling
This commit is contained in:
parent
3b65a1dc4f
commit
3f4cbdb991
1 changed files with 8 additions and 3 deletions
|
@ -15,6 +15,7 @@ public enum PonyTransformation {
|
||||||
NORMAL(Size.NORMAL, 0, 3F, 0.75F) {
|
NORMAL(Size.NORMAL, 0, 3F, 0.75F) {
|
||||||
@Override
|
@Override
|
||||||
public void transform(IModel model, BodyPart part) {
|
public void transform(IModel model, BodyPart part) {
|
||||||
|
if (model.getAttributes().isSwimming) translate(0, -0.3F, 0);
|
||||||
if (model.getAttributes().isCrouching) translate(0, -0.2F, 0);
|
if (model.getAttributes().isCrouching) translate(0, -0.2F, 0);
|
||||||
if (model.getAttributes().isSleeping) translate(0, -0.61F, 0.1F);
|
if (model.getAttributes().isSleeping) translate(0, -0.61F, 0.1F);
|
||||||
if (model.isRiding()) translate(0, -0.2F, -0.2F);
|
if (model.isRiding()) translate(0, -0.2F, -0.2F);
|
||||||
|
@ -25,7 +26,7 @@ public enum PonyTransformation {
|
||||||
break;
|
break;
|
||||||
case HEAD:
|
case HEAD:
|
||||||
if (model.getAttributes().isCrouching) translate(0, 0.1F, 0);
|
if (model.getAttributes().isCrouching) translate(0, 0.1F, 0);
|
||||||
if (model.getAttributes().isSwimming) translate(0, 0.07F, 0.15F);
|
if (model.getAttributes().isSwimming) translate(0, 0.37F, 0.45F);
|
||||||
break;
|
break;
|
||||||
case BACK:
|
case BACK:
|
||||||
translateVec(riderOffset);
|
translateVec(riderOffset);
|
||||||
|
@ -37,6 +38,7 @@ public enum PonyTransformation {
|
||||||
LANKY(Size.LANKY, 0, 2.6F, 0.75F) {
|
LANKY(Size.LANKY, 0, 2.6F, 0.75F) {
|
||||||
@Override
|
@Override
|
||||||
public void transform(IModel model, BodyPart part) {
|
public void transform(IModel model, BodyPart part) {
|
||||||
|
if (model.getAttributes().isSwimming) translate(0, -0.2F, 0);
|
||||||
if (model.getAttributes().isCrouching) translate(0, -0.15F, 0);
|
if (model.getAttributes().isCrouching) translate(0, -0.15F, 0);
|
||||||
if (model.getAttributes().isSleeping) translate(0, -0.6F, 0.15F);
|
if (model.getAttributes().isSleeping) translate(0, -0.6F, 0.15F);
|
||||||
if (model.isRiding()) translate(0, 0, -0.2F);
|
if (model.isRiding()) translate(0, 0, -0.2F);
|
||||||
|
@ -51,7 +53,7 @@ public enum PonyTransformation {
|
||||||
translate(0, -0.17F, -0.04F);
|
translate(0, -0.17F, -0.04F);
|
||||||
if (model.getAttributes().isSleeping) translate(0, 0, -0.1F);
|
if (model.getAttributes().isSleeping) translate(0, 0, -0.1F);
|
||||||
if (model.getAttributes().isCrouching) translate(0, 0.15F, 0);
|
if (model.getAttributes().isCrouching) translate(0, 0.15F, 0);
|
||||||
if (model.getAttributes().isSwimming) translate(0, 0.25F, 0.25F);
|
if (model.getAttributes().isSwimming) translate(0, 0.45F, 0.45F);
|
||||||
break;
|
break;
|
||||||
case BODY:
|
case BODY:
|
||||||
translate(0, -0.2F, -0.04F);
|
translate(0, -0.2F, -0.04F);
|
||||||
|
@ -109,6 +111,7 @@ public enum PonyTransformation {
|
||||||
FOAL(Size.FOAL, 0, 3.8F, 0.75F) {
|
FOAL(Size.FOAL, 0, 3.8F, 0.75F) {
|
||||||
@Override
|
@Override
|
||||||
public void transform(IModel model, BodyPart part) {
|
public void transform(IModel model, BodyPart part) {
|
||||||
|
if (model.getAttributes().isSwimming) translate(0, -0.9F, 0);
|
||||||
if (model.getAttributes().isCrouching) translate(0, -0.3F, 0);
|
if (model.getAttributes().isCrouching) translate(0, -0.3F, 0);
|
||||||
if (model.getAttributes().isSleeping) translate(0, -0.65F, -0.3F);
|
if (model.getAttributes().isSleeping) translate(0, -0.65F, -0.3F);
|
||||||
if (model.isRiding()) translate(0, -0.6F, -0.2F);
|
if (model.isRiding()) translate(0, -0.6F, -0.2F);
|
||||||
|
@ -122,6 +125,7 @@ public enum PonyTransformation {
|
||||||
if (model.getAttributes().isCrouching) translate(0, -0.01F, 0.15F);
|
if (model.getAttributes().isCrouching) translate(0, -0.01F, 0.15F);
|
||||||
break;
|
break;
|
||||||
case HEAD:
|
case HEAD:
|
||||||
|
if (model.getAttributes().isSwimming) translate(0, 0.9F, 0.9F);
|
||||||
scale(1.3F, 1.3F, 1.3F);
|
scale(1.3F, 1.3F, 1.3F);
|
||||||
break;
|
break;
|
||||||
case LEGS:
|
case LEGS:
|
||||||
|
@ -172,6 +176,7 @@ public enum PonyTransformation {
|
||||||
YEARLING(Size.YEARLING, 0, 3.8F, 0.75F) {
|
YEARLING(Size.YEARLING, 0, 3.8F, 0.75F) {
|
||||||
@Override
|
@Override
|
||||||
public void transform(IModel model, BodyPart part) {
|
public void transform(IModel model, BodyPart part) {
|
||||||
|
if (model.getAttributes().isSwimming) translate(0, -0.6F, 0);
|
||||||
if (model.getAttributes().isCrouching) translate(0, -0.15F, 0);
|
if (model.getAttributes().isCrouching) translate(0, -0.15F, 0);
|
||||||
if (model.getAttributes().isSleeping) translate(0, -0.4F, -0.3F);
|
if (model.getAttributes().isSleeping) translate(0, -0.4F, -0.3F);
|
||||||
if (model.isRiding()) translate(0, -0.4F, -0.2F);
|
if (model.isRiding()) translate(0, -0.4F, -0.2F);
|
||||||
|
@ -185,7 +190,7 @@ public enum PonyTransformation {
|
||||||
case HEAD:
|
case HEAD:
|
||||||
translate(0, -0.15F, 0.01F);
|
translate(0, -0.15F, 0.01F);
|
||||||
if (model.getAttributes().isCrouching) translate(0, 0.04F, 0);
|
if (model.getAttributes().isCrouching) translate(0, 0.04F, 0);
|
||||||
if (model.getAttributes().isSwimming) translate(0, 0.2F, 0.25F);
|
if (model.getAttributes().isSwimming) translate(0, 0.8F, 0.85F);
|
||||||
scale(1.15F, 1.15F, 1.15F);
|
scale(1.15F, 1.15F, 1.15F);
|
||||||
break;
|
break;
|
||||||
case BODY:
|
case BODY:
|
||||||
|
|
Loading…
Reference in a new issue