本文整理汇总了Java中net.minecraft.client.model.ModelPlayer类的典型用法代码示例。如果您正苦于以下问题:Java ModelPlayer类的具体用法?Java ModelPlayer怎么用?Java ModelPlayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelPlayer类属于net.minecraft.client.model包,在下文中一共展示了ModelPlayer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:RenderPlayer.java
示例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();
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:RenderPlayer.java
示例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();
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:RenderPlayer.java
示例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();
}
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:27,代码来源:RenderPlayerHand.java
示例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();
}
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:27,代码来源:RenderPlayerHand.java
示例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();
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:24,代码来源:RenderPlayerModel.java
示例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));
}
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:23,代码来源:SingleProjection.java
示例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;
}
}
}
开发者ID:InfinityRaider,项目名称:InfinityLib,代码行数:18,代码来源:ModelPlayerCustomized.java
示例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();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:RenderPlayer.java
示例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();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:RenderPlayer.java
示例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));
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:RenderPlayer.java
示例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();
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:15,代码来源:RenderPonyModel.java
示例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;
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:11,代码来源:MixinRenderPlayer.java
示例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;
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:11,代码来源:MixinRenderPlayer.java
示例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;
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:11,代码来源:MixinRenderPlayer.java
示例16: redirectRightArmwear
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;bipedRightArmwear:Lnet/minecraft/client/model/ModelRenderer;",
opcode = Opcodes.GETFIELD),
require = 2)
private ModelRenderer redirectRightArmwear(ModelPlayer mr) {
return this.playerModel.getModel().steveRightArmwear;
}
开发者ID:MineLittlePony,项目名称:MineLittlePony,代码行数:11,代码来源:MixinRenderPlayer.java
示例17: initializePlayerLayers
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public static void initializePlayerLayers()
{
RenderPlayer slim_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("slim");
slim_render.addLayer(new AccessoriesLayer(true, (ModelPlayer) slim_render.getMainModel()));
RenderPlayer default_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("default");
default_render.addLayer(new AccessoriesLayer(false, (ModelPlayer) default_render.getMainModel()));
}
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:9,代码来源:AetherEntityRenderingRegistry.java
示例18: AccessoriesLayer
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public AccessoriesLayer(boolean slimFit, ModelPlayer modelPlayer)
{
this.modelPlayer = modelPlayer;
this.slimFit = slimFit;
this.modelWings = new ModelAetherWings(1.0F);
this.modelMisc = new ModelBiped(1.0F);
this.modelHalo = new ModelHalo();
}
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:9,代码来源:AccessoriesLayer.java
示例19: onPlayerRenderCall
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
@SubscribeEvent
@SuppressWarnings("unused")
public void onPlayerRenderCall(RenderPlayerEvent.Pre event) {
ModelPlayer model = event.getRenderer().getMainModel();
if(model instanceof ModelPlayerCustomized) {
float left = this.getSwingProgress(event.getEntityPlayer(), EnumHand.OFF_HAND, event.getPartialRenderTick());
float right = this.getSwingProgress(event.getEntityPlayer(), EnumHand.MAIN_HAND, event.getPartialRenderTick());
((ModelPlayerCustomized) model).setSwingProgress(left, right);
}
}
开发者ID:InfinityRaider,项目名称:InfinityLib,代码行数:11,代码来源:ArmSwingHandler.java
示例20: replaceOldModel
import net.minecraft.client.model.ModelPlayer; //导入依赖的package包/类
public static void replaceOldModel() {
RenderPlayer renderer = getOldRenderer("default");
if(renderer == null) {
InfinityLib.instance.getLogger().debug("Failed overriding left arm swing behaviour");
return;
}
ModelPlayer oldModel = renderer.getMainModel();
ModelPlayer newModel = null;
for(Field field : RenderLivingBase.class.getDeclaredFields()) {
if(field.getType() == ModelBase.class) {
try {
field.setAccessible(true);
Object obj = field.get(renderer);
if (obj == oldModel) {
newModel = MODEL_MAIN;
field.set(renderer, newModel);
break;
}
} catch (Exception e) {
InfinityLib.instance.getLogger().printStackTrace(e);
}
}
}
if(newModel != null) {
//replace relevant fields in RenderPlayer
replaceEntriesInRenderPlayer(renderer, newModel);
replaceEntriesInRenderPlayer(getOldRenderer("slim"), MODEL_SLIM);
}
}
开发者ID:InfinityRaider,项目名称:InfinityLib,代码行数:30,代码来源:ModelPlayerCustomized.java
注:本文中的net.minecraft.client.model.ModelPlayer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论