mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-18 02:24:22 +01:00
override transform in humanplayer instead of testing instanceof.
This commit is contained in:
parent
f5c2fe7045
commit
d68b335a62
2 changed files with 5 additions and 6 deletions
|
@ -2,7 +2,6 @@ package com.minelittlepony.model;
|
||||||
|
|
||||||
import com.minelittlepony.PonyData;
|
import com.minelittlepony.PonyData;
|
||||||
import com.minelittlepony.PonySize;
|
import com.minelittlepony.PonySize;
|
||||||
import com.minelittlepony.model.pony.ModelHumanPlayer;
|
|
||||||
import com.minelittlepony.model.pony.ModelPlayerPony;
|
import com.minelittlepony.model.pony.ModelPlayerPony;
|
||||||
import net.minecraft.client.model.ModelBase;
|
import net.minecraft.client.model.ModelBase;
|
||||||
import net.minecraft.client.model.ModelPlayer;
|
import net.minecraft.client.model.ModelPlayer;
|
||||||
|
@ -12,9 +11,7 @@ import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import static net.minecraft.client.renderer.GlStateManager.rotate;
|
import static net.minecraft.client.renderer.GlStateManager.*;
|
||||||
import static net.minecraft.client.renderer.GlStateManager.scale;
|
|
||||||
import static net.minecraft.client.renderer.GlStateManager.translate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO move this into constructor and make separate classes for the races.
|
* TODO move this into constructor and make separate classes for the races.
|
||||||
|
@ -88,8 +85,6 @@ public abstract class AbstractPonyModel extends ModelPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void transform(BodyPart part) {
|
public void transform(BodyPart part) {
|
||||||
if (this instanceof ModelHumanPlayer)
|
|
||||||
return;
|
|
||||||
if (this.isRiding) {
|
if (this.isRiding) {
|
||||||
translate(0.0F, -0.6F, -0.2F);
|
translate(0.0F, -0.6F, -0.2F);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.model.pony;
|
package com.minelittlepony.model.pony;
|
||||||
|
|
||||||
import com.minelittlepony.model.AbstractPonyModel;
|
import com.minelittlepony.model.AbstractPonyModel;
|
||||||
|
import com.minelittlepony.model.BodyPart;
|
||||||
|
|
||||||
public class ModelHumanPlayer extends AbstractPonyModel {
|
public class ModelHumanPlayer extends AbstractPonyModel {
|
||||||
|
|
||||||
|
@ -13,4 +14,7 @@ public class ModelHumanPlayer extends AbstractPonyModel {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void transform(BodyPart part) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue