Search in sources :

Example 1 with IMixinModelBox

use of cc.hyperium.mixinsimp.client.model.IMixinModelBox in project Hyperium by HyperiumClient.

the class MixinModelBiped method fixTopAndBottomOfLimbWrongTextures.

/**
 * Fixes boxes having the wrong textures, when they are the second part of a limb
 *
 * @param models The {@link ModelRenderer} parts you want to fix
 */
void fixTopAndBottomOfLimbWrongTextures(ModelRenderer... models) {
    for (ModelRenderer model : models) {
        // We only need the first box since we know there only is one
        ModelBox box = model.cubeList.get(0);
        ((IMixinModelBox) box).offsetTextureQuad(model, 3, 0.0F, -6.0F);
    }
}
Also used : ModelRenderer(net.minecraft.client.model.ModelRenderer) ModelBox(net.minecraft.client.model.ModelBox) IMixinModelBox(cc.hyperium.mixinsimp.client.model.IMixinModelBox) IMixinModelBox(cc.hyperium.mixinsimp.client.model.IMixinModelBox)

Aggregations

IMixinModelBox (cc.hyperium.mixinsimp.client.model.IMixinModelBox)1 ModelBox (net.minecraft.client.model.ModelBox)1 ModelRenderer (net.minecraft.client.model.ModelRenderer)1