mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Fixed disguises not being rotated properly when using mine little pony
This commit is contained in:
parent
8081d4c1a6
commit
ab442461d3
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.client.minelittlepony;
|
|||
import com.minelittlepony.api.model.IModel;
|
||||
import com.minelittlepony.api.model.ModelAttributes;
|
||||
import com.minelittlepony.api.model.fabric.PonyModelPrepareCallback;
|
||||
import com.minelittlepony.unicopia.Owned;
|
||||
import com.minelittlepony.unicopia.Unicopia;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
|
||||
|
@ -20,10 +21,14 @@ public class Main implements ClientModInitializer {
|
|||
PonyModelPrepareCallback.EVENT.register(this::onPonyModelPrepared);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void onPonyModelPrepared(Entity entity, IModel model, ModelAttributes.Mode mode) {
|
||||
if (hookErroring) return;
|
||||
try {
|
||||
if (entity instanceof PlayerEntity) {
|
||||
if (entity instanceof Owned) {
|
||||
entity = ((Owned<PlayerEntity>)entity).getMaster();
|
||||
}
|
||||
Pony pony = Pony.of((PlayerEntity)entity);
|
||||
|
||||
if (pony.getMotion().isFlying()) {
|
||||
|
|
Loading…
Reference in a new issue