本文整理汇总了Java中net.minecraft.client.model.ModelPlayer类的典型用法代码示例。如果您正苦于以下问题:Java ModelPlayer类的具体用法?Java ModelPlayer怎么用?Java ModelPlayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelPlayer类属于net.minecraft.client.model包,在下文中一共展示了ModelPlayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RenderPlayer
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public RenderPlayer(RenderManager renderManager, boolean useSmallArms)
{
super(renderManager, new ModelPlayer(0.0F, useSmallArms), 0.5F);
this.smallArms = useSmallArms;
this.addLayer(new LayerBipedArmor(this));
this.addLayer(new LayerHeldItem(this));
this.addLayer(new LayerArrow(this));
this.addLayer(new LayerDeadmau5Head(this));
this.addLayer(new LayerCape(this));
this.addLayer(new LayerCustomHead(this.getMainModel().bipedHead));
}
示例2: renderRightArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public void renderRightArm(AbstractClientPlayer clientPlayer)
{
float f = 1.0F;
GlStateManager.color(1.0F, 1.0F, 1.0F);
float f1 = 0.0625F;
ModelPlayer modelplayer = this.getMainModel();
this.setModelVisibilities(clientPlayer);
GlStateManager.enableBlend();
modelplayer.swingProgress = 0.0F;
modelplayer.isSneak = false;
modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
modelplayer.bipedRightArm.rotateAngleX = 0.0F;
modelplayer.bipedRightArm.render(0.0625F);
modelplayer.bipedRightArmwear.rotateAngleX = 0.0F;
modelplayer.bipedRightArmwear.render(0.0625F);
GlStateManager.disableBlend();
}
示例3: renderLeftArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public void renderLeftArm(AbstractClientPlayer clientPlayer)
{
float f = 1.0F;
GlStateManager.color(1.0F, 1.0F, 1.0F);
float f1 = 0.0625F;
ModelPlayer modelplayer = this.getMainModel();
this.setModelVisibilities(clientPlayer);
GlStateManager.enableBlend();
modelplayer.isSneak = false;
modelplayer.swingProgress = 0.0F;
modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
modelplayer.bipedLeftArm.rotateAngleX = 0.0F;
modelplayer.bipedLeftArm.render(0.0625F);
modelplayer.bipedLeftArmwear.rotateAngleX = 0.0F;
modelplayer.bipedLeftArmwear.render(0.0625F);
GlStateManager.disableBlend();
}
示例4: renderRightArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Override
public void renderRightArm(AbstractClientPlayer clientPlayer)
{
ExtendedPlayer exPlayer = ExtendedPlayerProvider.getExtendedPlayer(clientPlayer);
ResourceLocation skin = clientPlayer.getLocationSkin();
if(exPlayer.getPlayerDisguiseUUID() !=null){
ResourceLocation res = DownloadedTextures.getSkin(exPlayer.getPlayerDisguiseUUID());
if(res !=null){
skin = res;
}
}
Minecraft.getMinecraft().getRenderManager().renderEngine.bindTexture(skin);
GlStateManager.color(1.0F, 1.0F, 1.0F);
ModelPlayer modelplayer = this.getMainModel();
this.setModelVisibilities(clientPlayer);
GlStateManager.enableBlend();
modelplayer.swingProgress = 0.0F;
modelplayer.isSneak = false;
modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
modelplayer.bipedRightArm.rotateAngleX = 0.0F;
modelplayer.bipedRightArm.render(0.0625F);
modelplayer.bipedRightArmwear.rotateAngleX = 0.0F;
modelplayer.bipedRightArmwear.render(0.0625F);
GlStateManager.disableBlend();
}
示例5: renderLeftArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Override
public void renderLeftArm(AbstractClientPlayer clientPlayer)
{
ExtendedPlayer exPlayer = ExtendedPlayerProvider.getExtendedPlayer(clientPlayer);
ResourceLocation skin = clientPlayer.getLocationSkin();
if(exPlayer.getPlayerDisguiseUUID() !=null){
ResourceLocation res = DownloadedTextures.getSkin(exPlayer.getPlayerDisguiseUUID());
if(res !=null){
skin = res;
}
}
Minecraft.getMinecraft().getRenderManager().renderEngine.bindTexture(skin);
GlStateManager.color(1.0F, 1.0F, 1.0F);
ModelPlayer modelplayer = this.getMainModel();
this.setModelVisibilities(clientPlayer);
GlStateManager.enableBlend();
modelplayer.isSneak = false;
modelplayer.swingProgress = 0.0F;
modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
modelplayer.bipedLeftArm.rotateAngleX = 0.0F;
modelplayer.bipedLeftArm.render(0.0625F);
modelplayer.bipedLeftArmwear.rotateAngleX = 0.0F;
modelplayer.bipedLeftArmwear.render(0.0625F);
GlStateManager.disableBlend();
}
示例6: doRender
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Override
public void doRender(M par1Entity, double par2, double par4, double par6, float par8, float par9) {
ModelPlayer player = this.getEntityModel(par1Entity);
this.mainModel = player;
Set<EnumPlayerModelParts> parts = Minecraft.getMinecraft().gameSettings.getModelParts();
player.bipedHeadwear.isHidden = !parts.contains(EnumPlayerModelParts.HAT);
player.bipedBodyWear.isHidden = !parts.contains(EnumPlayerModelParts.JACKET);
player.bipedLeftLegwear.isHidden = !parts.contains(EnumPlayerModelParts.LEFT_PANTS_LEG);
player.bipedRightLegwear.isHidden = !parts.contains(EnumPlayerModelParts.RIGHT_PANTS_LEG);
player.bipedLeftArmwear.isHidden = !parts.contains(EnumPlayerModelParts.LEFT_SLEEVE);
player.bipedRightArmwear.isHidden = !parts.contains(EnumPlayerModelParts.RIGHT_SLEEVE);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
super.doRender(par1Entity, par2, par4, par6, par8, par9);
popAttrib();
pushMatrix();
scale(1.0F, -1.0F, 1.0F);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
super.doRender(par1Entity, par2, par4, par6, par8, par9);
popAttrib();
popMatrix();
}
示例7: doRender
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Override
public void doRender(@Patch.Generic("Lnet/minecraft/entity/EntityLivingBase;") AbstractClientPlayer entity,
double x, double y, double z, float entityYaw, float partialTicks) {
if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(
new net.minecraftforge.client.event.RenderPlayerEvent.Pre(entity, this, partialTicks, x, y, z)))
return;
if (!entity.isUser() || renderManager.renderViewEntity == entity || Minecraft.getMinecraft().player == entity) {
double ny = y;
if (entity.isSneaking() && !(entity instanceof EntityPlayerSP))
ny = y - 0.125D;
ModelPlayer modelplayer = getMainModel();
modelplayer.bipedHead.isHidden = false;
modelplayer.bipedHeadwear.isHidden = false;
GlStateManager.enableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
super.doRender(entity, x, ny, z, entityYaw, partialTicks);
GlStateManager.disableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
}
net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(
new net.minecraftforge.client.event.RenderPlayerEvent.Post(entity, this, partialTicks, x, y, z));
}
示例8: replaceEntriesInRenderPlayer
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
private static void replaceEntriesInRenderPlayer(RenderPlayer renderer, ModelPlayer newModel) {
if(renderer == null) {
return;
}
//replace relevant fields in RenderPlayer
for(Field field : RenderLivingBase.class.getDeclaredFields()) {
if(field.getType() == ModelBase.class) {
field.setAccessible(true);
try {
field.set(renderer, newModel);
} catch (IllegalAccessException e) {
InfinityLib.instance.getLogger().printStackTrace(e);
}
break;
}
}
}
示例9: renderRightArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public void renderRightArm(AbstractClientPlayer clientPlayer)
{
float f = 1.0F;
GlStateManager.color(f, f, f);
ModelPlayer modelplayer = this.getMainModel();
this.setModelVisibilities(clientPlayer);
modelplayer.swingProgress = 0.0F;
modelplayer.isSneak = false;
modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
modelplayer.renderRightArm();
}
示例10: renderLeftArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public void renderLeftArm(AbstractClientPlayer clientPlayer)
{
float f = 1.0F;
GlStateManager.color(f, f, f);
ModelPlayer modelplayer = this.getMainModel();
this.setModelVisibilities(clientPlayer);
modelplayer.isSneak = false;
modelplayer.swingProgress = 0.0F;
modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
modelplayer.renderLeftArm();
}
示例11: RenderPlayer
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public RenderPlayer(RenderManager renderManager, boolean useSmallArms)
{
super(renderManager, new ModelPlayer(0.0F, useSmallArms), 0.5F);
this.smallArms = useSmallArms;
this.addLayer(new LayerBipedArmor(this));
this.addLayer(new LayerHeldItem(this));
this.addLayer(new LayerArrow(this));
this.addLayer(new LayerDeadmau5Head(this));
this.addLayer(new LayerCape(this));
this.addLayer(new LayerCustomHead(this.getMainModel().bipedHead));
this.addLayer(new LayerElytra(this));
}
示例12: getEntityModel
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Override
public ModelPlayer getEntityModel(EntityPonyModel playermodel) {
ResourceLocation loc = this.getEntityTexture(playermodel);
if (loc == null) {
return super.getEntityModel(playermodel);
}
Pony thePony = MineLittlePony.getInstance().getManager().getPony(loc);
// TODO small arms
PlayerModel pm = thePony.getModel(true, false);
pm.apply(thePony.getMetadata());
return pm.getModel();
}
示例13: redirectLeftArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Redirect(
method = "renderLeftArm(Lnet/minecraft/client/entity/AbstractClientPlayer;)V",
at = @At(
value = "FIELD",
target = "Lnet/minecraft/client/model/ModelPlayer;bipedLeftArm:Lnet/minecraft/client/model/ModelRenderer;",
opcode = Opcodes.GETFIELD),
require = 2)
private ModelRenderer redirectLeftArm(ModelPlayer mr) {
return this.playerModel.getModel().steveLeftArm;
}
示例14: redirectLeftArmwear
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Redirect(
method = "renderLeftArm(Lnet/minecraft/client/entity/AbstractClientPlayer;)V",
at = @At(
value = "FIELD",
target = "Lnet/minecraft/client/model/ModelPlayer;bipedLeftArmwear:Lnet/minecraft/client/model/ModelRenderer;",
opcode = Opcodes.GETFIELD),
require = 2)
private ModelRenderer redirectLeftArmwear(ModelPlayer mr) {
return this.playerModel.getModel().steveLeftArmwear;
}
示例15: redirectRightArm
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@Redirect(
method = "renderRightArm(Lnet/minecraft/client/entity/AbstractClientPlayer;)V",
at = @At(
value = "FIELD",
target = "Lnet/minecraft/client/model/ModelPlayer;bipedRightArm:Lnet/minecraft/client/model/ModelRenderer;",
opcode = Opcodes.GETFIELD),
require = 2)
private ModelRenderer redirectRightArm(ModelPlayer mr) {
return this.playerModel.getModel().steveRightArm;
}