本文整理汇总了Java中net.minecraft.client.model.ModelBiped类的典型用法代码示例。如果您正苦于以下问题:Java ModelBiped类的具体用法?Java ModelBiped怎么用?Java ModelBiped使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelBiped类属于net.minecraft.client.model包,在下文中一共展示了ModelBiped类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAttachModel
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
public static ModelRenderer getAttachModel(ModelBiped p_getAttachModel_0_, int p_getAttachModel_1_)
{
switch (p_getAttachModel_1_)
{
case 0:
return p_getAttachModel_0_.bipedBody;
case 1:
return p_getAttachModel_0_.bipedHead;
case 2:
return p_getAttachModel_0_.bipedLeftArm;
case 3:
return p_getAttachModel_0_.bipedRightArm;
case 4:
return p_getAttachModel_0_.bipedLeftLeg;
case 5:
return p_getAttachModel_0_.bipedRightLeg;
default:
return null;
}
}
示例2: renderEquippedItems
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
protected void renderEquippedItems(EntityLivingBase p_renderEquippedItems_1_, float p_renderEquippedItems_2_, float p_renderEquippedItems_3_)
{
if (Config.isShowCapes())
{
if (p_renderEquippedItems_1_ instanceof AbstractClientPlayer)
{
AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer)p_renderEquippedItems_1_;
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableRescaleNormal();
GlStateManager.enableCull();
ModelBiped modelbiped = this.renderPlayer.getMainModel();
PlayerConfigurations.renderPlayerItems(modelbiped, abstractclientplayer, p_renderEquippedItems_2_, p_renderEquippedItems_3_);
GlStateManager.disableCull();
}
}
}
示例3: setModelSlotVisible
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
@SuppressWarnings("incomplete-switch")
protected void setModelSlotVisible(ModelBiped p_188359_1_, EntityEquipmentSlot slotIn)
{
this.setModelVisible(p_188359_1_);
switch (slotIn)
{
case HEAD:
p_188359_1_.bipedHead.showModel = true;
p_188359_1_.bipedHeadwear.showModel = true;
break;
case CHEST:
p_188359_1_.bipedBody.showModel = true;
p_188359_1_.bipedRightArm.showModel = true;
p_188359_1_.bipedLeftArm.showModel = true;
break;
case LEGS:
p_188359_1_.bipedBody.showModel = true;
p_188359_1_.bipedRightLeg.showModel = true;
p_188359_1_.bipedLeftLeg.showModel = true;
break;
case FEET:
p_188359_1_.bipedRightLeg.showModel = true;
p_188359_1_.bipedLeftLeg.showModel = true;
}
}
示例4: renderHeldItem
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
private void renderHeldItem(EntityLivingBase p_188358_1_, ItemStack p_188358_2_, ItemCameraTransforms.TransformType p_188358_3_, EnumHandSide handSide)
{
if (p_188358_2_ != null)
{
GlStateManager.pushMatrix();
if (p_188358_1_.isSneaking())
{
GlStateManager.translate(0.0F, 0.2F, 0.0F);
}
// Forge: moved this call down, fixes incorrect offset while sneaking.
((ModelBiped)this.livingEntityRenderer.getMainModel()).postRenderArm(0.0625F, handSide);
GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
boolean flag = handSide == EnumHandSide.LEFT;
GlStateManager.translate((float)(flag ? -1 : 1) / 16.0F, 0.125F, -0.625F);
Minecraft.getMinecraft().getItemRenderer().renderItemSide(p_188358_1_, p_188358_2_, p_188358_3_, flag);
GlStateManager.popMatrix();
}
}
示例5: setLivingAnimations
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
@Override
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime) {
this.rightArmPose = ModelBiped.ArmPose.EMPTY;
this.leftArmPose = ModelBiped.ArmPose.EMPTY;
ItemStack itemstack = entitylivingbaseIn.getHeldItem(EnumHand.MAIN_HAND);
if (!itemstack.isEmpty() && itemstack.getItem() == Items.BOW && ((EntitySkeletonWarrior) entitylivingbaseIn).isSwingingArms()) {
if (entitylivingbaseIn.getPrimaryHand() == EnumHandSide.RIGHT) {
this.rightArmPose = ModelBiped.ArmPose.BOW_AND_ARROW;
} else {
this.leftArmPose = ModelBiped.ArmPose.BOW_AND_ARROW;
}
}
super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime);
}
示例6: setupRenderer
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
/**
* Setup renderer
*
* This method is responsible for setting up any client side stuff like
* the renderer, texture of the entity and the "hands"
*/
@SideOnly(Side.CLIENT)
protected void setupRenderer()
{
this.renderer = Minecraft.getMinecraft().getRenderManager().getEntityRenderObject(this.entity);
if (this.renderer instanceof RenderLivingBase<?>)
{
ModelBase model = ((RenderLivingBase<?>) renderer).getMainModel();
if (this.customSettings && model instanceof ModelBiped || model instanceof ModelQuadruped)
{
this.settings.hands = true;
}
}
}
示例7: setLivingAnimations
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
/**
* Used for easily adding entity-dependent animations. The second and third
* float params here are the same second and third as in the
* setRotationAngles method.
*/
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
this.rightArmPose = ModelBiped.ArmPose.EMPTY;
this.leftArmPose = ModelBiped.ArmPose.EMPTY;
ItemStack itemstack = entitylivingbaseIn.getHeldItem(EnumHand.MAIN_HAND);
if (itemstack != null && itemstack.getItem() == Items.BOW && ((MobSkeleton) entitylivingbaseIn).isSwingingArms())
{
if (entitylivingbaseIn.getPrimaryHand() == EnumHandSide.RIGHT)
{
this.rightArmPose = ModelBiped.ArmPose.BOW_AND_ARROW;
}
else
{
this.leftArmPose = ModelBiped.ArmPose.BOW_AND_ARROW;
}
}
super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime);
}
示例8: getArmorModel
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
@Nullable
public ModelBiped getArmorModel(EntityLivingBase living, ItemStack stack, EntityEquipmentSlot slot, ModelBiped defaultModel) {
if (!stack.isEmpty()) {
if (stack.getItem() instanceof ItemArmor) {
if (EntityEquipmentSlot.LEGS == slot) {
ModelElytraJetLegs armorModel = RenderElytraJetAlegs.elytraJetLegsModel;
armorModel.isRiding = defaultModel.isRiding;
armorModel.isChild = defaultModel.isChild;
armorModel.isElytraFlying = living.isElytraFlying();
return armorModel;
}
}
}
return null;
}
示例9: setModelVisibilities
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
public void setModelVisibilities (T entity) {
final ModelPlayerMob model = this.getMainModel();
final ItemStack mainhand = entity.getHeldItemMainhand();
final ItemStack offhand = entity.getHeldItemOffhand();
model.setVisible(true);
this.setOverlayVisibility(entity, model);
model.isSneak = entity.isSneaking();
final ModelBiped.ArmPose mainArm = this.getPoseForStack(entity, mainhand);
final ModelBiped.ArmPose offhandArm = this.getPoseForStack(entity, offhand);
final boolean isRightHanded = entity.getPrimaryHand() == EnumHandSide.RIGHT;
model.rightArmPose = isRightHanded ? mainArm : offhandArm;
model.leftArmPose = isRightHanded ? offhandArm : mainArm;
}
示例10: getArmPose
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
/**
* Gets the arm pose for a player's hand.
*
* @param stack The stack in the player's hand.
* @param player The player to get info for.
* @return The pose of the player's hand.
*/
private ArmPose getArmPose (ItemStack stack, EntityPlayer player) {
if (stack.isEmpty()) {
return ArmPose.EMPTY;
}
ArmPose pose = ModelBiped.ArmPose.ITEM;
if (player.getItemInUseCount() > 0) {
final EnumAction action = stack.getItemUseAction();
pose = action == EnumAction.BLOCK ? ArmPose.BLOCK : action == EnumAction.BOW ? ArmPose.BOW_AND_ARROW : pose;
}
return pose;
}
示例11: registerRenderThings
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
public void registerRenderThings()
{
RenderingRegistry.registerEntityRenderingHandler(EntityZombieNotch.class, new RenderZombieNotch(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieMiner.class, new RenderZombieMiner(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieChef.class, new RenderZombieChef(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieCreeper.class, new RenderZombieCreeper(new ModelCreeper(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombiePirate.class, new RenderZombiePirate(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombiePa.class, new RenderZombiePa(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityNetherZombie.class, new RenderNetherZombie(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieCyborg.class, new RenderZombieCyborg(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieDwarf.class, new RenderZombieDwarf(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieHerobrine.class, new RenderZombieHerobrine(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieKing.class, new RenderZombieKing(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityZombieKnight.class, new RenderZombieKnight(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityDiscoZombie.class, new RenderDiscoZombie(new ModelZombie(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntitySurvivor.class, new RenderSurvivor(new ModelBiped(), 0));
}
示例12: getArmorModel
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot)
{
ModelCustomArmor model = ModelCustomArmor.INSTANCE;
if(this == MekanismItems.Jetpack)
{
model.modelType = ArmorModel.JETPACK;
}
else if(this == MekanismItems.ArmoredJetpack)
{
model.modelType = ArmorModel.ARMOREDJETPACK;
}
return model;
}
示例13: func_82427_a
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
private void func_82427_a(EntityZombie par1EntityZombie)
{
if (par1EntityZombie.isVillager())
{
if (this.field_82431_q != this.zombieVillagerModel.func_82897_a())
{
this.zombieVillagerModel = new ModelZombieVillager();
this.field_82431_q = this.zombieVillagerModel.func_82897_a();
this.field_82436_m = new ModelZombieVillager(1.0F, 0.0F, true);
this.field_82433_n = new ModelZombieVillager(0.5F, 0.0F, true);
}
this.mainModel = this.zombieVillagerModel;
this.field_82423_g = this.field_82436_m;
this.field_82425_h = this.field_82433_n;
}
else
{
this.mainModel = this.field_82434_o;
this.field_82423_g = this.field_82437_k;
this.field_82425_h = this.field_82435_l;
}
this.modelBipedMain = (ModelBiped)this.mainModel;
}
示例14: getArmorModel
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
@Override
@SideOnly( Side.CLIENT )
public ModelBiped getArmorModel( EntityLivingBase entity, ItemStack stack, int slot )
{
if ( slot != 3 )
{
return null;
}
WingsModel model = wingModels.get( entity );
if ( model == null )
{
wingModels.put( entity, new WingsModel( entity ) );
return getArmorModel( entity, stack, slot );
}
return model;
}
示例15: getArmorModel
import net.minecraft.client.model.ModelBiped; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
// @Override
public ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int armorSlot) {
ModelBiped armorModel = null;
if (itemStack != null) {
if (itemStack.getItem() instanceof ItemDaedricArmor) {
}
}
int type = ((ItemArmor) itemStack.getItem()).armorType;
if (type == 1 || type == 3) {
armorModel = TheDarkEra.proxy.getArmorModel(0);
} else {
armorModel = TheDarkEra.proxy.getArmorModel(1);
}
// if (armorSlot == 0)
// return new ModelScaleHelm();
return null;
}