コード例 #1
0
  /** Render the EvolvedEndermans eyes */
  protected int renderEyes(
      SCSednaEntityEvolvedEnderman par1EntityEvolvedEnderman, int par2, float par3) {
    if (par2 != 0) {
      return -1;
    } else {
      this.bindTexture(EvolvedEndermanEyesTexture);
      float f1 = 1.0F;
      GL11.glEnable(GL11.GL_BLEND);
      GL11.glDisable(GL11.GL_ALPHA_TEST);
      GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
      GL11.glDisable(GL11.GL_LIGHTING);

      if (par1EntityEvolvedEnderman.isInvisible()) {
        GL11.glDepthMask(false);
      } else {
        GL11.glDepthMask(true);
      }

      char c0 = 61680;
      int j = c0 % 65536;
      int k = c0 / 65536;
      OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glEnable(GL11.GL_LIGHTING);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, f1);
      return 1;
    }
  }
コード例 #2
0
  /** Renders the EvolvedEnderman */
  public void renderEvolvedEnderman(
      SCSednaEntityEvolvedEnderman par1EntityEvolvedEnderman,
      double par2,
      double par4,
      double par6,
      float par8,
      float par9) {
    this.EvolvedEndermanModel.isAttacking = par1EntityEvolvedEnderman.isScreaming();

    if (par1EntityEvolvedEnderman.isScreaming()) {
      double d3 = 0.02D;
      par2 += this.rnd.nextGaussian() * d3;
      par6 += this.rnd.nextGaussian() * d3;
    }

    super.doRenderLiving(par1EntityEvolvedEnderman, par2, par4, par6, par8, par9);
  }