net.minecraft.client.model.ModelBox Java Examples

The following examples show how to use net.minecraft.client.model.ModelBox. 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: ArmorLogicRebreather.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SideOnly(Side.CLIENT)
private ModelBiped getArmorModel() {
    if (armorModel == null) {
        this.armorModel = new ModelBiped(1.0f, 0.0f, 32, 32);
        this.armorModel.bipedHeadwear.isHidden = true;
        ModelRenderer bipedHead = this.armorModel.bipedHead;
        bipedHead.cubeList.add(new ModelBox(bipedHead, 0, 16, -2.0F, -6.0F, 4.0f, 4, 4, 4, 0.0f));
    }
    return armorModel;
}
 
Example #2
Source File: MixinModelBiped.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * 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);
    }
}