Implement pose changes for the swimming mode

This commit is contained in:
Sollace 2019-07-16 12:14:22 +02:00
parent 402e055112
commit eb54809f1e

View file

@ -50,6 +50,16 @@ public class RenderDummyPony extends RenderDummyPlayer<DummyPony, ClientPonyMode
protected void scale(DummyPony entity, float ticks) { protected void scale(DummyPony entity, float ticks) {
renderPony.preRenderCallback(entity, ticks); renderPony.preRenderCallback(entity, ticks);
if (entity.isSwimming()) {
if (entity.getVelocity().x < 100) {
entity.addVelocity(100, 0, 0);
}
model.getAttributes().motionPitch = 70;
} else {
model.getAttributes().motionPitch = 0;
}
if (entity.hasVehicle()) { if (entity.hasVehicle()) {
GlStateManager.translated(0, entity.getHeightOffset(), 0); GlStateManager.translated(0, entity.getHeightOffset(), 0);
} }