mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Fixed armour stands not looking the right way
This commit is contained in:
parent
a2f12e9511
commit
e4fdad918a
1 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,7 @@ import net.minecraft.client.render.entity.feature.FeatureRendererContext;
|
||||||
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.HeldItemFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.HeldItemFeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.model.ArmorStandArmorEntityModel;
|
import net.minecraft.client.render.entity.model.ArmorStandArmorEntityModel;
|
||||||
|
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.decoration.ArmorStandEntity;
|
import net.minecraft.entity.decoration.ArmorStandEntity;
|
||||||
|
@ -46,7 +47,11 @@ public class PonyStandRenderer extends ArmorStandEntityRenderer {
|
||||||
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, ArmorStandEntity entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
|
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, ArmorStandEntity entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
|
||||||
if (entity.hasCustomName() && "Ponita".equals(entity.getCustomName().asString())) {
|
if (entity.hasCustomName() && "Ponita".equals(entity.getCustomName().asString())) {
|
||||||
|
|
||||||
pony.getBody().setAngles(entity, limbDistance, limbAngle, tickDelta, headYaw, headPitch);
|
headPitch = 0.017453292F * entity.getHeadRotation().getPitch();
|
||||||
|
headYaw = 0.017453292F * entity.getHeadRotation().getYaw();
|
||||||
|
|
||||||
|
pony.getBody().animateModel(entity, limbDistance, limbAngle, tickDelta);
|
||||||
|
pony.getBody().setAngles(entity, limbDistance, limbAngle, age, headYaw, headPitch);
|
||||||
|
|
||||||
for (EquipmentSlot i : EquipmentSlot.values()) {
|
for (EquipmentSlot i : EquipmentSlot.values()) {
|
||||||
if (i.getType() == EquipmentSlot.Type.ARMOR) {
|
if (i.getType() == EquipmentSlot.Type.ARMOR) {
|
||||||
|
|
Loading…
Reference in a new issue