Search in sources :

Example 6 with ModelPart

use of net.minecraft.client.model.ModelPart in project Biome-Makeover by Lemonszz.

the class StoneGolemEntityModel method charge.

public static void charge(ModelPart holdingArm, ModelPart pullingArm, LivingEntity actor, boolean rightArmed) {
    ModelPart modelPart = rightArmed ? holdingArm : pullingArm;
    ModelPart pullArm = rightArmed ? pullingArm : holdingArm;
    modelPart.yaw = rightArmed ? -0.8F : 0.8F;
    modelPart.pitch = -0.97079635F;
    pullArm.pitch = modelPart.pitch;
    float f = (float) CrossbowItem.getPullTime(actor.getActiveItem());
    float g = MathHelper.clamp((float) actor.getItemUseTime(), 0.0F, f);
    float h = g / f;
    pullArm.yaw = MathHelper.lerp(h, 0.2F, 0.4F) * (float) (rightArmed ? 1 : -1);
    pullArm.pitch = MathHelper.lerp(h, pullArm.pitch, -1);
}
Also used : ModelPart(net.minecraft.client.model.ModelPart)

Example 7 with ModelPart

use of net.minecraft.client.model.ModelPart in project Biome-Makeover by Lemonszz.

the class TapestryBlockEntityRenderer method createTapestry.

private ModelPart createTapestry() {
    ModelPart tapestry = new ModelPart(64, 64, 0, 0);
    tapestry.setPivot(0.0F, -16.0F, -1.7F);
    tapestry.setTextureOffset(0, 36).addCuboid(-10.0F, 35.0F, -0.3F, 4.0F, 5.0F, 1.0F, 0.0F, false);
    tapestry.setTextureOffset(10, 36).addCuboid(-2.0F, 35.0F, -0.3F, 4.0F, 5.0F, 1.0F, 0.0F, false);
    tapestry.setTextureOffset(20, 36).addCuboid(6.0F, 35.0F, -0.3F, 4.0F, 5.0F, 1.0F, 0.0F, false);
    tapestry.setTextureOffset(0, 0).addCuboid(-10.0F, 0.0F, -0.3F, 20.0F, 35.0F, 1.0F, 0.0F, false);
    return tapestry;
}
Also used : ModelPart(net.minecraft.client.model.ModelPart)

Aggregations

ModelPart (net.minecraft.client.model.ModelPart)7 VertexConsumer (net.minecraft.client.render.VertexConsumer)2 Color (meteordevelopment.meteorclient.utils.render.color.Color)1 SettingColor (meteordevelopment.meteorclient.utils.render.color.SettingColor)1 EventHandler (meteordevelopment.orbit.EventHandler)1 PlayerEntityRenderer (net.minecraft.client.render.entity.PlayerEntityRenderer)1 PlayerEntityModel (net.minecraft.client.render.entity.model.PlayerEntityModel)1 MatrixStack (net.minecraft.client.util.math.MatrixStack)1 HorseEntity (net.minecraft.entity.passive.HorseEntity)1 PlayerEntity (net.minecraft.entity.player.PlayerEntity)1 CompoundTag (net.minecraft.nbt.CompoundTag)1 Identifier (net.minecraft.util.Identifier)1 BeeEntityModelAccessor (nomble.beebuddy.client.mixin.accessor.BeeEntityModelAccessor)1 IFriendlyPlayer (nomble.beebuddy.duck.IFriendlyPlayer)1 HorseHat (party.lemons.biomemakeover.util.extensions.HorseHat)1