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


Java AbstractClientPlayer類代碼示例

本文整理匯總了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;
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:27,代碼來源:EntityRenderer.java

示例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();
}
 
開發者ID:the-realest-stu,項目名稱:Etheric,代碼行數:22,代碼來源:SeeingStoneHandler.java

示例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
    }
}
 
開發者ID:fr1kin,項目名稱:ForgeHax,代碼行數:18,代碼來源:EntityUtils.java

示例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();
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:25,代碼來源:LayerDeadmau5Head.java

示例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);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:22,代碼來源:RenderPlayer.java

示例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();
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:27,代碼來源:ItemRenderer.java

示例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);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:27,代碼來源:ItemRenderer.java

示例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();
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:27,代碼來源:TeleportToTeam.java

示例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;
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:26,代碼來源:PlayerConfigurations.java

示例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();
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:18,代碼來源:RenderPlayer.java

示例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);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:27,代碼來源:TeleportToTeam.java

示例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_);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:18,代碼來源:RenderPlayer.java

示例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);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:18,代碼來源:RenderPlayer.java

示例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();
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:27,代碼來源:ItemRenderer.java

示例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);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:19,代碼來源:ItemRenderer.java


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