net.minecraft.entity.decoration.ArmorStandEntity Java Examples

The following examples show how to use net.minecraft.entity.decoration.ArmorStandEntity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PonyStandRenderer.java    From MineLittlePony with MIT License 6 votes vote down vote up
@Override
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())) {

        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()) {
            if (i.getType() == EquipmentSlot.Type.ARMOR) {
                ArmourFeature.renderArmor(pony, stack, renderContext, lightUv, entity, limbDistance, limbAngle, age, headYaw, headPitch, i, ArmourLayer.INNER);
                ArmourFeature.renderArmor(pony, stack, renderContext, lightUv, entity, limbDistance, limbAngle, age, headYaw, headPitch, i, ArmourLayer.OUTER);
            }
        }
    } else {
        super.render(stack, renderContext, lightUv, entity, limbDistance, limbAngle, tickDelta, age, headYaw, headPitch);
    }
}
 
Example #2
Source File: PonyStandRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> context) {
    super(context, new ArmorStandArmorEntityModel(0.5F), new ArmorStandArmorEntityModel(1));

    pony.apply(new PonyData(Race.EARTH));
}