Search in sources :

Example 1 with IMixinModelBiped

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

the class AbstractPostCopyAnglesAnimationHandler method onPostCopyPlayerModelAngles.

@InvokeEvent
public void onPostCopyPlayerModelAngles(PostCopyPlayerModelAnglesEvent event) {
    AbstractClientPlayer entity = event.getEntity();
    IMixinModelBiped player = event.getModel();
    modify(entity, player, false);
}
Also used : AbstractClientPlayer(net.minecraft.client.entity.AbstractClientPlayer) IMixinModelBiped(cc.hyperium.mixinsimp.client.model.IMixinModelBiped) InvokeEvent(cc.hyperium.event.InvokeEvent)

Example 2 with IMixinModelBiped

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

the class AnimatedDance method onPostCopyPlayerModelAngles.

// Added so we can do legs
@InvokeEvent
public void onPostCopyPlayerModelAngles(PostCopyPlayerModelAnglesEvent event) {
    AbstractClientPlayer entity = event.getEntity();
    IMixinModelBiped player = event.getModel();
    modify(entity, player, false);
}
Also used : AbstractClientPlayer(net.minecraft.client.entity.AbstractClientPlayer) IMixinModelBiped(cc.hyperium.mixinsimp.client.model.IMixinModelBiped) InvokeEvent(cc.hyperium.event.InvokeEvent)

Example 3 with IMixinModelBiped

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

the class AbstractPreCopyAnglesAnimationHandler method onPreCopyPlayerModelAngles.

@InvokeEvent
public void onPreCopyPlayerModelAngles(PreCopyPlayerModelAnglesEvent event) {
    AbstractClientPlayer entity = event.getEntity();
    IMixinModelBiped player = event.getModel();
    modify(entity, player, true);
}
Also used : AbstractClientPlayer(net.minecraft.client.entity.AbstractClientPlayer) IMixinModelBiped(cc.hyperium.mixinsimp.client.model.IMixinModelBiped) InvokeEvent(cc.hyperium.event.InvokeEvent)

Example 4 with IMixinModelBiped

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

the class TwoPartLayerBipedArmor method setModelPartVisible.

/**
 * The only method which is edited. Shows some more model te make everything
 * render properly.
 *
 * @param model     The model which gets rendered
 * @param armorSlot The slot of the armor (1 = boots, 2 = leggins, etc..). Don't ask
 *                  me why it doesn't start at 0.
 * @author 9Y0
 */
protected void setModelPartVisible(ModelBiped model, int armorSlot) {
    model.setInvisible(false);
    IMixinModelBiped modelBiped = (IMixinModelBiped) model;
    switch(armorSlot) {
        case 1:
            {
                model.bipedRightLeg.showModel = true;
                model.bipedLeftLeg.showModel = true;
                modelBiped.getBipedRightLowerLeg().showModel = true;
                modelBiped.getBipedLeftLowerLeg().showModel = true;
                break;
            }
        case 2:
            {
                model.bipedBody.showModel = true;
                model.bipedRightLeg.showModel = true;
                model.bipedLeftLeg.showModel = true;
                modelBiped.getBipedRightLowerLeg().showModel = true;
                modelBiped.getBipedLeftLowerLeg().showModel = true;
                break;
            }
        case 3:
            {
                model.bipedBody.showModel = true;
                model.bipedRightArm.showModel = true;
                model.bipedLeftArm.showModel = true;
                modelBiped.getBipedRightForeArm().showModel = true;
                modelBiped.getBipedLeftForeArm().showModel = true;
                break;
            }
        case 4:
            {
                model.bipedHead.showModel = true;
                model.bipedHeadwear.showModel = true;
                break;
            }
    }
}
Also used : IMixinModelBiped(cc.hyperium.mixinsimp.client.model.IMixinModelBiped)

Aggregations

IMixinModelBiped (cc.hyperium.mixinsimp.client.model.IMixinModelBiped)4 InvokeEvent (cc.hyperium.event.InvokeEvent)3 AbstractClientPlayer (net.minecraft.client.entity.AbstractClientPlayer)3