當前位置: 首頁>>代碼示例>>Java>>正文


Java RenderBiped類代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.entity.RenderBiped的典型用法代碼示例。如果您正苦於以下問題:Java RenderBiped類的具體用法?Java RenderBiped怎麽用?Java RenderBiped使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RenderBiped類屬於net.minecraft.client.renderer.entity包,在下文中一共展示了RenderBiped類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setRenderHead

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
private void setRenderHead(EntityLivingBase entity, boolean setRender) {
    if (entity.getItemStackFromSlot(EntityEquipmentSlot.HEAD).getItem() == Itemss.PNEUMATIC_HELMET
            && (ConfigHandler.client.useHelmetModel || DateEventHandler.isIronManEvent())) {
        Render renderer = Minecraft.getMinecraft().getRenderManager().getEntityRenderObject(entity);
        if (renderer instanceof RenderBiped) {
            ModelBiped modelBiped = (ModelBiped) ((RenderBiped) renderer).getMainModel();
            modelBiped.bipedHead.showModel = setRender;
        }
    }
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:11,代碼來源:ClientEventHandler.java

示例2: getArmorTexture

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
	if(stack.toString().contains("leggings") || stack.toString().contains("Leggings")) {
		return ModInfo.MODID + ":textures/models/armor/" + RenderBiped.bipedArmorFilenamePrefix[index] + "_layer_2.png";
	} else {
		return ModInfo.MODID + ":textures/models/armor/" + RenderBiped.bipedArmorFilenamePrefix[index] + "_layer_1.png";
	}
}
 
開發者ID:Spencerio1,項目名稱:Spencerios-Mod-Mod,代碼行數:9,代碼來源:ItemSMMArmor.java

示例3: addArmourRenderString

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
/**
 * Adds a render name for armour. Uses reflection because Mojang choices.
 * @param renderId
 */
public static final void addArmourRenderString(String renderId)
{
	String[] bipedArmorFilenamePrefixes = ReflectionManipulateValues.getValue(RenderBiped.class, null, "bipedArmorFilenamePrefix");
	String[] newPrefixes = new String[bipedArmorFilenamePrefixes.length + 1];

	for (int i = 0; i == bipedArmorFilenamePrefixes.length; i++)
	{
		newPrefixes[i] = bipedArmorFilenamePrefixes[i];
	}

	newPrefixes[newPrefixes.length] = renderId;
	ReflectionManipulateValues.setValue(RenderBiped.class, null, "bipedArmorFilenamePrefix", newPrefixes);
}
 
開發者ID:Niadel,項目名稱:N-API,代碼行數:18,代碼來源:ClientRegistry.java

示例4: func_130220_b

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
protected void func_130220_b(AbstractClientPlayer p_130220_1_, int p_130220_2_, float p_130220_3_) {
   ItemStack var4 = p_130220_1_.field_71071_by.func_70440_f(3 - p_130220_2_);
   if(var4 != null) {
      Item var5 = var4.func_77973_b();
      if(var5 instanceof ItemArmor) {
         this.func_110776_a(RenderBiped.func_110858_a((ItemArmor)var5, p_130220_2_, "overlay"));
         float var6 = 1.0F;
         GL11.glColor3f(var6, var6, var6);
      }
   }

}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:13,代碼來源:RenderPlayer.java

示例5: func_130220_b

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
protected void func_130220_b(EntityStatuePlayer par1EntityFakePlayer, int par2, float par3) {
	ItemStack itemstack = par1EntityFakePlayer.inventory.armorItemInSlot(3 - par2);

	if (itemstack != null) {
		Item item = itemstack.getItem();

		if (item instanceof ItemArmor) {
			bindTexture(RenderBiped.getArmorResource(par1EntityFakePlayer, itemstack, par2, "overlay"));
			float f1 = 1.0F;
			GL11.glColor3f(f1, f1, f1);
		}
	}
}
 
開發者ID:asiekierka,項目名稱:Statues,代碼行數:14,代碼來源:RenderPlayerStatue.java

示例6: setRenderHead

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
private void setRenderHead(EntityLivingBase entity, boolean setRender){
    if(entity.getEquipmentInSlot(4) != null && entity.getEquipmentInSlot(4).getItem() == Itemss.pneumaticHelmet && (Config.useHelmetModel || DateEventHandler.isIronManEvent())) {
        Render renderer = RenderManager.instance.getEntityRenderObject(entity);
        if(renderer instanceof RenderBiped) {
            ((RenderBiped)renderer).modelBipedMain.bipedHead.showModel = setRender;
        }
    }
}
 
開發者ID:MineMaarten,項目名稱:PneumaticCraft,代碼行數:9,代碼來源:ClientEventHandler.java

示例7: addNewArmourRendererPrefix

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
/**
 * Add a new armour prefix to the RenderPlayer
 *
 * @param armor
 */
public static int addNewArmourRendererPrefix(String armor)
{
    RenderBiped.field_82424_k = ObjectArrays.concat(RenderBiped.field_82424_k, armor);
    return RenderBiped.field_82424_k.length - 1;
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:11,代碼來源:RenderingRegistry.java

示例8: onRenderPlayerSetArmorModel

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onRenderPlayerSetArmorModel(RenderPlayerEvent.SetArmorModel event) {
	if (!ProxyClient.isVRPlayer(event.entityPlayer)) return;
	if (event.stack != null) {
		Item item = event.stack.getItem();

		if (item instanceof ItemArmor) {
			VRPlayerData data = ProxyClient.vrPlayerIds.get(event.entityPlayer.getEntityId());
			ItemArmor itemarmor = (ItemArmor)item;
			((RenderPlayer)event.renderer).bindTexture(RenderBiped.getArmorResource(event.entityPlayer, event.stack, 3 - event.slot, null));
			ModelBiped modelbiped = event.slot == 1 ? ((RenderPlayer)event.renderer).modelArmor : ((RenderPlayer)event.renderer).modelArmorChestplate;
			modelbiped.bipedHead.showModel = event.slot == 3;
			modelbiped.bipedHeadwear.showModel = event.slot == 3;
			modelbiped.bipedBody.showModel = event.slot == 2 || event.slot == 1;
			modelbiped.bipedRightArm.showModel = event.slot == 2;
			modelbiped.bipedLeftArm.showModel = event.slot == 2;
			modelbiped.bipedRightLeg.showModel = event.slot == 1 || event.slot == 0;
			modelbiped.bipedLeftLeg.showModel = event.slot == 1 || event.slot == 0;
			modelbiped = net.minecraftforge.client.ForgeHooksClient.getArmorModel(event.entityPlayer, event.stack, 3 - event.slot, modelbiped);
			modelbiped.bipedHead.showModel = false;
			modelbiped.bipedHeadwear.showModel = false;
			modelbiped.bipedRightArm.showModel &= data.seated;
			modelbiped.bipedLeftArm.showModel &= data.seated;
			event.renderer.setRenderPassModel(modelbiped);
			modelbiped.onGround = ((RenderPlayer)event.renderer).mainModel.onGround;
			modelbiped.isRiding = ((RenderPlayer)event.renderer).mainModel.isRiding;
			modelbiped.isChild = ((RenderPlayer)event.renderer).mainModel.isChild;

			// Move outside if to allow for more then just CLOTH
			int j = itemarmor.getColor(event.stack);
			if (j != -1) {
				float f1 = (float) (j >> 16 & 255) / 255.0F;
				float f2 = (float) (j >> 8 & 255) / 255.0F;
				float f3 = (float) (j & 255) / 255.0F;
				GL11.glColor3f(f1, f2, f3);

				if (event.stack.isItemEnchanted()) {
					event.result = 31;
					return;
				}

				event.result = 16;
				return;
			}

			GL11.glColor3f(1.0F, 1.0F, 1.0F);

			if (event.stack.isItemEnchanted()) {
				event.result = 15;
				return;
			}

			event.result = 1;
			return;
		}
	}
	event.result = -2;
}
 
開發者ID:Techjar,項目名稱:VivecraftForgeExtensions,代碼行數:60,代碼來源:HandlerRenderEvent.java

示例9: onRenderLivingPre

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
@SubscribeEvent
public void onRenderLivingPre(RenderLivingEvent.Pre event)
{
    EntityGib[] gibs = amputationMap.get(event.getEntity());
    if(gibs != null)
    {
        boolean gibbed = false;
        for(int i = 0; i <= 2; i++)
        {
            if(!gibs[i].attached)
            {
                gibbed = true;
                break;
            }
        }
        if(gibbed)
        {
            if(event.getRenderer() instanceof RenderBiped || event.getRenderer() instanceof RenderPlayer)
            {
                ModelBase model = event.getRenderer().mainModel;
                ModelBiped bipedPass1 = null;
                ModelBiped bipedPass2 = null;
                for(int i = 0; i < event.getRenderer().layerRenderers.size(); i++)
                {
                    LayerRenderer layer = (LayerRenderer)event.getRenderer().layerRenderers.get(i);
                    if(layer instanceof LayerBipedArmor)
                    {
                        LayerBipedArmor armor = (LayerBipedArmor)layer;
                        bipedPass1 = armor.modelLeggings;
                        bipedPass2 = armor.modelArmor;
                        break;
                    }
                }
                if(model instanceof ModelBiped && bipedPass1 != null && bipedPass2 != null)
                {
                    ModelBiped biped = (ModelBiped)model;

                    ModelGib.bipedHead1 = bipedPass1.bipedHead;
                    ModelGib.bipedHeadwear1 = bipedPass1.bipedHeadwear;
                    ModelGib.bipedLeftArm1 = bipedPass1.bipedLeftArm;
                    ModelGib.bipedRightArm1 = bipedPass1.bipedRightArm;

                    ModelGib.bipedHead2 = bipedPass2.bipedHead;
                    ModelGib.bipedHeadwear2 = bipedPass2.bipedHeadwear;
                    ModelGib.bipedLeftArm2 = bipedPass2.bipedLeftArm;
                    ModelGib.bipedRightArm2 = bipedPass2.bipedRightArm;

                    if(!gibs[0].attached)
                    {
                        biped.bipedHead.showModel = false;
                        biped.bipedHeadwear.showModel = false;

                        bipedPass1.bipedHead = bipedPass2.bipedHead = bipedPass1.bipedHeadwear = bipedPass2.bipedHeadwear = ModelGib.emptyModel;
                    }
                    if(!gibs[1].attached)
                    {
                        biped.bipedLeftArm.showModel = false;

                        bipedPass1.bipedLeftArm = bipedPass2.bipedLeftArm = ModelGib.emptyModel;
                    }
                    if(!gibs[2].attached)
                    {
                        biped.bipedRightArm.showModel = false;

                        bipedPass1.bipedRightArm = bipedPass2.bipedRightArm = ModelGib.emptyModel;
                    }
                }
            }
        }
    }
}
 
開發者ID:iChun,項目名稱:Mob-Amputation,代碼行數:72,代碼來源:EventHandlerClient.java

示例10: onRenderLivingPost

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
@SubscribeEvent
public void onRenderLivingPost(RenderLivingEvent.Post event)
{
    EntityGib[] gibs = amputationMap.get(event.getEntity());
    if(gibs != null)
    {
        boolean gibbed = false;
        for(int i = 0; i <= 2; i++)
        {
            if(!gibs[i].attached)
            {
                gibbed = true;
                break;
            }
        }
        if(gibbed)
        {
            if(event.getRenderer() instanceof RenderBiped || event.getRenderer() instanceof RenderPlayer)
            {
                ModelBase model = event.getRenderer().mainModel;
                ModelBiped bipedPass1 = null;
                ModelBiped bipedPass2 = null;
                for(int i = 0; i < event.getRenderer().layerRenderers.size(); i++)
                {
                    LayerRenderer layer = (LayerRenderer)event.getRenderer().layerRenderers.get(i);
                    if(layer instanceof LayerBipedArmor)
                    {
                        LayerBipedArmor armor = (LayerBipedArmor)layer;
                        bipedPass1 = armor.modelLeggings;
                        bipedPass2 = armor.modelArmor;
                        break;
                    }
                }
                if(model instanceof ModelBiped && bipedPass1 != null && bipedPass2 != null)
                {
                    ModelBiped biped = (ModelBiped)model;

                    bipedPass1.bipedHead = ModelGib.bipedHead1;
                    bipedPass1.bipedHeadwear = ModelGib.bipedHeadwear1;
                    bipedPass1.bipedLeftArm = ModelGib.bipedLeftArm1;
                    bipedPass1.bipedRightArm = ModelGib.bipedRightArm1;

                    bipedPass2.bipedHead = ModelGib.bipedHead2;
                    bipedPass2.bipedHeadwear = ModelGib.bipedHeadwear2;
                    bipedPass2.bipedLeftArm = ModelGib.bipedLeftArm2;
                    bipedPass2.bipedRightArm = ModelGib.bipedRightArm2;

                    biped.bipedHead.showModel = true;
                    biped.bipedHeadwear.showModel = true;
                    biped.bipedLeftArm.showModel = true;
                    biped.bipedRightArm.showModel = true;
                }
            }
        }
    }
}
 
開發者ID:iChun,項目名稱:Mob-Amputation,代碼行數:57,代碼來源:EventHandlerClient.java

示例11: addNewArmourRendererPrefix

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
/**
 * Add a new armour prefix to the RenderPlayer
 *
 * @param armor
 */
public static int addNewArmourRendererPrefix(String armor)
{
    RenderBiped.bipedArmorFilenamePrefix = ObjectArrays.concat(RenderBiped.bipedArmorFilenamePrefix, armor);
    return RenderBiped.bipedArmorFilenamePrefix.length - 1;
}
 
開發者ID:alexandrage,項目名稱:CauldronGit,代碼行數:11,代碼來源:RenderingRegistry.java

示例12: getArmorTexture

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
    return DefaultProps.blockKey + ":armor_sets/" + RenderBiped.bipedArmorFilenamePrefix[renderIndex] + "_"
            + (armorType == 2 ? 2 : 1) + ".png";
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10-pre-1.3a,代碼行數:6,代碼來源:ItemZuluArmor.java

示例13: render

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
@Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
    if (this.isChild) {
        float var8 = 2.0F;
        GL11.glPushMatrix();
        GL11.glScalef(1.5F / var8, 1.5F / var8, 1.5F / var8);
        GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F);
        this.bipedHead.render(par7);
        GL11.glPopMatrix();
        GL11.glPushMatrix();
        GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
        GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
        this.bipedBody.render(par7);
        this.bipedRightArm.render(par7);
        this.bipedLeftArm.render(par7);
        this.bipedRightLeg.render(par7);
        this.bipedLeftLeg.render(par7);
        GL11.glPopMatrix();
    } else {
        String textureLocation;
        ResourceLocation resource;
        ItemStack itemStack;
        float scale;

        /* Render Armor Legs */
        textureLocation = "/armor/iron_2.png";
        EntityHauntedArmor var5 = (EntityHauntedArmor) par1Entity;
        itemStack = var5.func_130225_q(2) != null ? var5.func_130225_q(2) : new ItemStack(Items.golden_chestplate);
        
        resource = RenderBiped.getArmorResource(par1Entity, itemStack, 2, null);
        Minecraft.getMinecraft().renderEngine.bindTexture(resource);
        scale = par7 * 0.85f;
        this.bipedRightLeg2.render(scale);
        this.bipedLeftLeg2.render(scale);

        /* Render Armor Upper Body */
        textureLocation = "/armor/iron_1.png";
        itemStack = var5.func_130225_q(1) != null ? var5.func_130225_q(2) : new ItemStack(Items.golden_leggings);
        resource = RenderBiped.getArmorResource(par1Entity, itemStack, 1, null);
        Minecraft.getMinecraft().renderEngine.bindTexture(resource);
        this.bipedHead.render(par7);
        this.bipedBody.render(par7);
        this.bipedRightArm.render(par7);
        this.bipedLeftArm.render(par7);
        this.bipedRightLeg.render(par7);
        this.bipedLeftLeg.render(par7);
    }
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10-pre-1.3a,代碼行數:49,代碼來源:ModelHauntedArmor.java

示例14: func_77107_a

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
protected int func_77107_a(AbstractClientPlayer p_77107_1_, int p_77107_2_, float p_77107_3_) {
   ItemStack var4 = p_77107_1_.field_71071_by.func_70440_f(3 - p_77107_2_);
   if(var4 != null) {
      Item var5 = var4.func_77973_b();
      if(var5 instanceof ItemArmor) {
         ItemArmor var6 = (ItemArmor)var5;
         this.func_110776_a(RenderBiped.func_110857_a(var6, p_77107_2_));
         ModelBiped var7 = p_77107_2_ == 2?this.field_77111_i:this.field_77108_b;
         var7.field_78116_c.field_78806_j = p_77107_2_ == 0;
         var7.field_78114_d.field_78806_j = p_77107_2_ == 0;
         var7.field_78115_e.field_78806_j = p_77107_2_ == 1 || p_77107_2_ == 2;
         var7.field_78112_f.field_78806_j = p_77107_2_ == 1;
         var7.field_78113_g.field_78806_j = p_77107_2_ == 1;
         var7.field_78123_h.field_78806_j = p_77107_2_ == 2 || p_77107_2_ == 3;
         var7.field_78124_i.field_78806_j = p_77107_2_ == 2 || p_77107_2_ == 3;
         this.func_77042_a(var7);
         var7.field_78095_p = this.field_77045_g.field_78095_p;
         var7.field_78093_q = this.field_77045_g.field_78093_q;
         var7.field_78091_s = this.field_77045_g.field_78091_s;
         float var8 = 1.0F;
         if(var6.func_82812_d() == EnumArmorMaterial.CLOTH) {
            int var9 = var6.func_82814_b(var4);
            float var10 = (float)(var9 >> 16 & 255) / 255.0F;
            float var11 = (float)(var9 >> 8 & 255) / 255.0F;
            float var12 = (float)(var9 & 255) / 255.0F;
            GL11.glColor3f(var8 * var10, var8 * var11, var8 * var12);
            if(var4.func_77948_v()) {
               return 31;
            }

            return 16;
         }

         GL11.glColor3f(var8, var8, var8);
         if(var4.func_77948_v()) {
            return 15;
         }

         return 1;
      }
   }

   return -1;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:45,代碼來源:RenderPlayer.java

示例15: setArmorModel

import net.minecraft.client.renderer.entity.RenderBiped; //導入依賴的package包/類
/**
 * Set the specified armor model as the player model. Args: player,
 * armorSlot, partialTick
 */
protected int setArmorModel(EntityStatuePlayer par1EntityFakePlayer, int par2, float par3) {
	ItemStack itemstack = par1EntityFakePlayer.inventory.armorItemInSlot(3 - par2);

	if (itemstack != null) {
		Item item = itemstack.getItem();

		if (item instanceof ItemArmor) {
			ItemArmor itemarmor = (ItemArmor) item;
			bindTexture(RenderBiped.getArmorResource(par1EntityFakePlayer, itemstack, par2, null));
			ModelBiped modelbiped = par2 == 2 ? modelArmor : modelArmorChestplate;
			modelbiped.bipedHead.showModel = par2 == 0;
			modelbiped.bipedHeadwear.showModel = par2 == 0;
			modelbiped.bipedBody.showModel = par2 == 1 || par2 == 2;
			modelbiped.bipedRightArm.showModel = par2 == 1;
			modelbiped.bipedLeftArm.showModel = par2 == 1;
			modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
			modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
			modelbiped = ForgeHooksClient.getArmorModel(par1EntityFakePlayer, itemstack, par2, modelbiped);
			setRenderPassModel(modelbiped);
			modelbiped.onGround = mainModel.onGround;
			modelbiped.isRiding = mainModel.isRiding;
			modelbiped.isChild = mainModel.isChild;
			float f1 = 1.0F;

			// Move outside if to allow for more then just CLOTH
			int j = itemarmor.getColor(itemstack);
			if (j != -1) {
				float f2 = (j >> 16 & 255) / 255.0F;
				float f3 = (j >> 8 & 255) / 255.0F;
				float f4 = (j & 255) / 255.0F;
				GL11.glColor3f(f1 * f2, f1 * f3, f1 * f4);

				if (itemstack.isItemEnchanted()) {
					return 31;
				}

				return 16;
			}

			GL11.glColor3f(f1, f1, f1);

			if (itemstack.isItemEnchanted()) {
				return 15;
			}

			return 1;
		}
	}

	return -1;
}
 
開發者ID:asiekierka,項目名稱:Statues,代碼行數:56,代碼來源:RenderPlayerStatue.java


注:本文中的net.minecraft.client.renderer.entity.RenderBiped類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。