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);
}
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;
}
Aggregations