本文整理汇总了Java中net.minecraft.client.entity.AbstractClientPlayer类的典型用法代码示例。如果您正苦于以下问题:Java AbstractClientPlayer类的具体用法?Java AbstractClientPlayer怎么用?Java AbstractClientPlayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractClientPlayer类属于net.minecraft.client.entity包,在下文中一共展示了AbstractClientPlayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateFovModifierHand
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
/**
* Update FOV modifier hand
*/
private void updateFovModifierHand()
{
float f = 1.0F;
if (this.mc.getRenderViewEntity() instanceof AbstractClientPlayer)
{
AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer)this.mc.getRenderViewEntity();
f = abstractclientplayer.getFovModifier();
}
this.fovModifierHandPrev = this.fovModifierHand;
this.fovModifierHand += (f - this.fovModifierHand) * 0.5F;
if (this.fovModifierHand > 1.5F)
{
this.fovModifierHand = 1.5F;
}
if (this.fovModifierHand < 0.1F)
{
this.fovModifierHand = 0.1F;
}
}
示例2: renderExtra
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
private static void renderExtra(float partialTicks) {
AbstractClientPlayer abstractclientplayer = Minecraft.getMinecraft().player;
float f = abstractclientplayer.getSwingProgress(partialTicks);
EnumHand enumhand = (EnumHand) MoreObjects.firstNonNull(abstractclientplayer.swingingHand, EnumHand.MAIN_HAND);
float f1 = abstractclientplayer.prevRotationPitch
+ (abstractclientplayer.rotationPitch - abstractclientplayer.prevRotationPitch) * partialTicks;
float f2 = abstractclientplayer.prevRotationYaw
+ (abstractclientplayer.rotationYaw - abstractclientplayer.prevRotationYaw) * partialTicks;
rotateArroundXAndY(f1, f2);
setLightmap();
rotateArm(partialTicks);
GlStateManager.enableRescaleNormal();
float f3 = enumhand == EnumHand.MAIN_HAND ? f : 0.0F;
float f5 = 1.0F - (1F);
renderArmsFirstPerson(f1, f5, f3);
//float f4 = enumhand == EnumHand.OFF_HAND ? f : 0.0F;
//float f6 = 1.0F - (0F);
//renderArmsFirstPerson(f1, f6, f4);
GlStateManager.disableRescaleNormal();
}
示例3: getRelationship
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
public static MobTypeEnum getRelationship(Entity entity) {
if(entity instanceof AbstractClientPlayer)
return MobTypeEnum.PLAYER;
else {
// check special cases first
for (MobType type : MobTypeRegistry.getSortedSpecialMobTypes())
if (type.isMobType(entity))
return type.getMobType(entity);
// this code will continue if no special was found
if(MobTypeRegistry.HOSTILE.isMobType(entity))
return MobTypeEnum.HOSTILE;
else if(MobTypeRegistry.FRIENDLY.isMobType(entity))
return MobTypeEnum.FRIENDLY;
else
return MobTypeEnum.HOSTILE; // default to hostile
}
}
示例4: doRenderLayer
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
if (entitylivingbaseIn.getName().equals("deadmau5") && entitylivingbaseIn.hasSkin() && !entitylivingbaseIn.isInvisible())
{
this.playerRenderer.bindTexture(entitylivingbaseIn.getLocationSkin());
for (int i = 0; i < 2; ++i)
{
float f = entitylivingbaseIn.prevRotationYaw + (entitylivingbaseIn.rotationYaw - entitylivingbaseIn.prevRotationYaw) * partialTicks - (entitylivingbaseIn.prevRenderYawOffset + (entitylivingbaseIn.renderYawOffset - entitylivingbaseIn.prevRenderYawOffset) * partialTicks);
float f1 = entitylivingbaseIn.prevRotationPitch + (entitylivingbaseIn.rotationPitch - entitylivingbaseIn.prevRotationPitch) * partialTicks;
GlStateManager.pushMatrix();
GlStateManager.rotate(f, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(f1, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(0.375F * (float)(i * 2 - 1), 0.0F, 0.0F);
GlStateManager.translate(0.0F, -0.375F, 0.0F);
GlStateManager.rotate(-f1, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
float f2 = 1.3333334F;
GlStateManager.scale(f2, f2, f2);
this.playerRenderer.getMainModel().renderDeadmau5Head(0.0625F);
GlStateManager.popMatrix();
}
}
}
示例5: doRender
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks)
{
if (!entity.isUser() || this.renderManager.livingPlayer == entity)
{
double d0 = y;
if (entity.isSneaking() && !(entity instanceof EntityPlayerSP))
{
d0 = y - 0.125D;
}
this.setModelVisibilities(entity);
super.doRender(entity, x, d0, z, entityYaw, partialTicks);
}
}
示例6: func_178095_a
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
private void func_178095_a(AbstractClientPlayer clientPlayer, float p_178095_2_, float p_178095_3_)
{
float f = -0.3F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
float f1 = 0.4F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI * 2.0F);
float f2 = -0.4F * MathHelper.sin(p_178095_3_ * (float)Math.PI);
GlStateManager.translate(f, f1, f2);
GlStateManager.translate(0.64000005F, -0.6F, -0.71999997F);
GlStateManager.translate(0.0F, p_178095_2_ * -0.6F, 0.0F);
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
float f3 = MathHelper.sin(p_178095_3_ * p_178095_3_ * (float)Math.PI);
float f4 = MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
GlStateManager.rotate(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
GlStateManager.translate(-1.0F, 3.6F, 3.5F);
GlStateManager.rotate(120.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.scale(1.0F, 1.0F, 1.0F);
GlStateManager.translate(5.6F, 0.0F, 0.0F);
Render<AbstractClientPlayer> render = this.renderManager.<AbstractClientPlayer>getEntityRenderObject(this.mc.thePlayer);
GlStateManager.disableCull();
RenderPlayer renderplayer = (RenderPlayer)render;
renderplayer.renderRightArm(this.mc.thePlayer);
GlStateManager.enableCull();
}
示例7: func_178098_a
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
private void func_178098_a(float p_178098_1_, AbstractClientPlayer clientPlayer)
{
GlStateManager.rotate(-18.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(-12.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(-8.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9F, 0.2F, 0.0F);
float f = (float)this.itemToRender.getMaxItemUseDuration() - ((float)clientPlayer.getItemInUseCount() - p_178098_1_ + 1.0F);
float f1 = f / 20.0F;
f1 = (f1 * f1 + f1 * 2.0F) / 3.0F;
if (f1 > 1.0F)
{
f1 = 1.0F;
}
if (f1 > 0.1F)
{
float f2 = MathHelper.sin((f - 0.1F) * 1.3F);
float f3 = f1 - 0.1F;
float f4 = f2 * f3;
GlStateManager.translate(f4 * 0.0F, f4 * 0.01F, f4 * 0.0F);
}
GlStateManager.translate(f1 * 0.0F, f1 * 0.0F, f1 * 0.1F);
GlStateManager.scale(1.0F, 1.0F, 1.0F + f1 * 0.2F);
}
示例8: TeamSelectionObject
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
this.field_178676_b = p_i45492_2_;
this.field_178675_d = Lists.<NetworkPlayerInfo>newArrayList();
for (String s : p_i45492_2_.getMembershipCollection())
{
NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(s);
if (networkplayerinfo != null)
{
this.field_178675_d.add(networkplayerinfo);
}
}
if (!this.field_178675_d.isEmpty())
{
String s1 = ((NetworkPlayerInfo)this.field_178675_d.get((new Random()).nextInt(this.field_178675_d.size()))).getGameProfile().getName();
this.field_178677_c = AbstractClientPlayer.getLocationSkin(s1);
AbstractClientPlayer.getDownloadImageSkin(this.field_178677_c, s1);
}
else
{
this.field_178677_c = DefaultPlayerSkin.getDefaultSkinLegacy();
}
}
示例9: getPlayerConfiguration
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
public static synchronized PlayerConfiguration getPlayerConfiguration(AbstractClientPlayer p_getPlayerConfiguration_0_)
{
String s = p_getPlayerConfiguration_0_.getNameClear();
if (s == null)
{
return null;
}
else
{
PlayerConfiguration playerconfiguration = (PlayerConfiguration)getMapConfigurations().get(s);
if (playerconfiguration == null)
{
playerconfiguration = new PlayerConfiguration();
getMapConfigurations().put(s, playerconfiguration);
PlayerConfigurationReceiver playerconfigurationreceiver = new PlayerConfigurationReceiver(s);
String s1 = "http://s.optifine.net/users/" + s + ".cfg";
FileDownloadThread filedownloadthread = new FileDownloadThread(s1, playerconfigurationreceiver);
filedownloadthread.start();
}
return playerconfiguration;
}
}
示例10: renderLeftArm
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的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();
}
示例11: TeamSelectionObject
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
public TeamSelectionObject(ScorePlayerTeam p_i45492_2_)
{
this.team = p_i45492_2_;
this.players = Lists.<NetworkPlayerInfo>newArrayList();
for (String s : p_i45492_2_.getMembershipCollection())
{
NetworkPlayerInfo networkplayerinfo = Minecraft.getMinecraft().getConnection().getPlayerInfo(s);
if (networkplayerinfo != null)
{
this.players.add(networkplayerinfo);
}
}
if (this.players.isEmpty())
{
this.location = DefaultPlayerSkin.getDefaultSkinLegacy();
}
else
{
String s1 = ((NetworkPlayerInfo)this.players.get((new Random()).nextInt(this.players.size()))).getGameProfile().getName();
this.location = AbstractClientPlayer.getLocationSkin(s1);
AbstractClientPlayer.getDownloadImageSkin(this.location, s1);
}
}
示例12: renderOffsetLivingLabel
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
protected void renderOffsetLivingLabel(AbstractClientPlayer entityIn, double x, double y, double z, String str, float p_177069_9_, double p_177069_10_)
{
if (p_177069_10_ < 100.0D)
{
Scoreboard scoreboard = entityIn.getWorldScoreboard();
ScoreObjective scoreobjective = scoreboard.getObjectiveInDisplaySlot(2);
if (scoreobjective != null)
{
Score score = scoreboard.getValueFromObjective(entityIn.getName(), scoreobjective);
this.renderLivingLabel(entityIn, score.getScorePoints() + " " + scoreobjective.getDisplayName(), x, y, z, 64);
y += (double)((float)this.getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F * p_177069_9_);
}
}
super.renderOffsetLivingLabel(entityIn, x, y, z, str, p_177069_9_, p_177069_10_);
}
示例13: renderEntityName
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
protected void renderEntityName(AbstractClientPlayer entityIn, double x, double y, double z, String name, double distanceSq)
{
if (distanceSq < 100.0D)
{
Scoreboard scoreboard = entityIn.getWorldScoreboard();
ScoreObjective scoreobjective = scoreboard.getObjectiveInDisplaySlot(2);
if (scoreobjective != null)
{
Score score = scoreboard.getOrCreateScore(entityIn.getName(), scoreobjective);
this.renderLivingLabel(entityIn, score.getScorePoints() + " " + scoreobjective.getDisplayName(), x, y, z, 64);
y += (double)((float)this.getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F * 0.025F);
}
}
super.renderEntityName(entityIn, x, y, z, name, distanceSq);
}
示例14: func_178095_a
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
private void func_178095_a(AbstractClientPlayer clientPlayer, float p_178095_2_, float p_178095_3_)
{
float f = -0.3F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
float f1 = 0.4F * MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI * 2.0F);
float f2 = -0.4F * MathHelper.sin(p_178095_3_ * (float)Math.PI);
GlStateManager.translate(f, f1, f2);
GlStateManager.translate(0.64000005F, -0.6F, -0.71999997F);
GlStateManager.translate(0.0F, p_178095_2_ * -0.6F, 0.0F);
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
float f3 = MathHelper.sin(p_178095_3_ * p_178095_3_ * (float)Math.PI);
float f4 = MathHelper.sin(MathHelper.sqrt_float(p_178095_3_) * (float)Math.PI);
GlStateManager.rotate(f4 * 70.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(f3 * -20.0F, 0.0F, 0.0F, 1.0F);
this.mc.getTextureManager().bindTexture(clientPlayer.getLocationSkin());
GlStateManager.translate(-1.0F, 3.6F, 3.5F);
GlStateManager.rotate(120.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(200.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.scale(1.0F, 1.0F, 1.0F);
GlStateManager.translate(5.6F, 0.0F, 0.0F);
Render render = this.renderManager.getEntityRenderObject(this.mc.thePlayer);
GlStateManager.disableCull();
RenderPlayer renderplayer = (RenderPlayer)render;
renderplayer.renderRightArm(this.mc.thePlayer);
GlStateManager.enableCull();
}
示例15: func_178104_a
import net.minecraft.client.entity.AbstractClientPlayer; //导入依赖的package包/类
private void func_178104_a(AbstractClientPlayer clientPlayer, float p_178104_2_)
{
float f = (float)clientPlayer.getItemInUseCount() - p_178104_2_ + 1.0F;
float f1 = f / (float)this.itemToRender.getMaxItemUseDuration();
float f2 = MathHelper.abs(MathHelper.cos(f / 4.0F * (float)Math.PI) * 0.1F);
if (f1 >= 0.8F)
{
f2 = 0.0F;
}
GlStateManager.translate(0.0F, f2, 0.0F);
float f3 = 1.0F - (float)Math.pow((double)f1, 27.0D);
GlStateManager.translate(f3 * 0.6F, f3 * -0.5F, f3 * 0.0F);
GlStateManager.rotate(f3 * 90.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(f3 * 10.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(f3 * 30.0F, 0.0F, 0.0F, 1.0F);
}