mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed passengers' arms swinging whilst being carried
This commit is contained in:
parent
622ffa31de
commit
a585435aa0
2 changed files with 3 additions and 8 deletions
|
@ -7,7 +7,6 @@ import com.minelittlepony.api.model.IModel;
|
|||
import com.minelittlepony.api.model.gear.IGear;
|
||||
import com.minelittlepony.client.model.IPonyModel;
|
||||
import com.minelittlepony.unicopia.client.render.HeldEntityFeatureRenderer;
|
||||
import com.minelittlepony.unicopia.entity.Living;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.VertexConsumer;
|
||||
|
@ -16,7 +15,6 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
class HeldEntityGear extends HeldEntityFeatureRenderer<LivingEntity> implements IGear {
|
||||
|
||||
|
@ -61,9 +59,4 @@ class HeldEntityGear extends HeldEntityFeatureRenderer<LivingEntity> implements
|
|||
MinecraftClient.getInstance().getTickDelta(), 0, 0, 0
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Vec3d getCarryPosition(Living<LivingEntity> entity, Living<?> passenger) {
|
||||
return super.getCarryPosition(entity, passenger);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.minelittlepony.unicopia.entity.Living;
|
|||
import com.minelittlepony.unicopia.entity.duck.EntityDuck;
|
||||
import com.minelittlepony.unicopia.entity.duck.LivingEntityDuck;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
import com.minelittlepony.unicopia.util.LimbAnimationUtil;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
|
@ -79,6 +80,7 @@ public class HeldEntityFeatureRenderer<E extends LivingEntity> implements Access
|
|||
}
|
||||
|
||||
private void renderCarriedEntity(LivingEntity p, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, float tickDelta) {
|
||||
LimbAnimationUtil.resetToZero(p.limbAnimator);
|
||||
Entity vehicle = p.getVehicle();
|
||||
((EntityDuck)p).setVehicle(null);
|
||||
|
||||
|
@ -109,7 +111,7 @@ public class HeldEntityFeatureRenderer<E extends LivingEntity> implements Access
|
|||
((EntityDuck)p).setVehicle(vehicle);
|
||||
}
|
||||
|
||||
protected Vec3d getCarryPosition(Living<E> entity, Living<?> passenger) {
|
||||
public static Vec3d getCarryPosition(Living<?> entity, Living<?> passenger) {
|
||||
float passengerHeight = MineLPDelegate.getInstance().getPonyHeight(passenger.asEntity()) / 2F;
|
||||
float carrierHeight = MineLPDelegate.getInstance().getPonyHeight(entity.asEntity()) / 5F;
|
||||
|
||||
|
|
Loading…
Reference in a new issue