Package net.minecraft.client

Examples of net.minecraft.client.Minecraft


  }

  @Override
  public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    GL11.glPushMatrix();
    Minecraft mc = FMLClientHandler.instance().getClient();
    if (item.getItem() instanceof LogisticsFluidContainer) {
      FluidStack liquid = SimpleServiceLocator.logisticsFluidManager.getFluidFromContainer(ItemIdentifierStack.getFromStack(item));
      if ((type != ItemRenderType.INVENTORY && type != ItemRenderType.ENTITY) || liquid == null) {
        doRenderItem(item, mc, type, data);
        GL11.glPopMatrix();
View Full Code Here


  //TODO: only load this once, rather than twice
  private static final ResourceLocation TEXTURE = new ResourceLocation("textures/gui/icons.png");
 
  public void renderPlayerDisplay(long renderTicks) {
    if(!displayRenderer()) return;
    Minecraft mc = FMLClientHandler.instance().getClient();
    if(displayCross) {
      ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
          int width = res.getScaledWidth();
          int height = res.getScaledHeight();
          if (GuiIngameForge.renderCrosshairs && mc.ingameGUI != null) {
View Full Code Here

    }
  }
 
  public void renderWorldRelative(long renderTicks, float partialTick) {
    if(!displayRenderer()) return;
    Minecraft mc = FMLClientHandler.instance().getClient();
    EntityPlayer player = mc.thePlayer;
    if(list.size() == 0 || Math.hypot(lastXPos - player.posX,Math.hypot(lastYPos - player.posY, lastZPos - player.posZ)) > 0.5 || (renderTicks % 10 == 0 && (lastXPos != player.posX || lastYPos != player.posY || lastZPos != player.posZ)) || renderTicks % 600 == 0) {
      refreshList(player.posX,player.posY,player.posZ);
      lastXPos = player.posX;
      lastYPos = player.posY;
View Full Code Here

      default:
    }
  }
 
  private void displayOneView(IHeadUpDisplayRendererProvider renderer, IHUDConfig config, float partialTick) {
    Minecraft mc = FMLClientHandler.instance().getClient();
    EntityPlayer player = mc.thePlayer;
    double x = renderer.getX() + 0.5 - player.prevPosX - ((player.posX - player.prevPosX) * partialTick);
    double y = renderer.getY() + 0.5 - player.prevPosY - ((player.posY - player.prevPosY) * partialTick);
    double z = renderer.getZ() + 0.5 - player.prevPosZ - ((player.posZ - player.prevPosZ) * partialTick);
    GL11.glTranslatef((float)x, (float)y, (float)z);
View Full Code Here

    }
    return input;
  }
 
  private int[] getCursor(IHeadUpDisplayRendererProvider renderer) {
    Minecraft mc = FMLClientHandler.instance().getClient();
    EntityPlayer player = mc.thePlayer;
   
    MathVector playerView = MathVector.getFromAngles((270 - player.rotationYaw) / 360 * -2 * Math.PI, (player.rotationPitch) / 360 * -2 * Math.PI);
    MathVector playerPos = new MathVector();
    playerPos.X = player.posX;
View Full Code Here

   * @param y
   * @param gui The gui to render on.
   */
  private void renderAspectAt(Aspect tag, int x, int y, GuiScreen gui, int amount, boolean drawBackground) {
    if(!(tag instanceof Aspect)) return;
    Minecraft mc = FMLClientHandler.instance().getClient();
    if(drawBackground) {
      UtilsFX.bindTexture("textures/aspects/_back.png");
      GL11.glPushMatrix();
      GL11.glEnable(GL11.GL_BLEND);
      GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
View Full Code Here

     
 
 
  @Override
  public void renderButton(boolean hover, boolean clicked) {
    Minecraft minecraft = FMLClientHandler.instance().getClient();
        //GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/,
        minecraft.renderEngine.bindTexture(GUI); //TODO: check this change
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        int k = !buttonEnabled() ? 0 : hover ? 2 : 1;
       
View Full Code Here

    }

    @Override
    public void renderButton(boolean hover, boolean clicked) {
      GL11.glTranslatef(0.0F, 0.0F, -0.00005F);
      Minecraft mc = FMLClientHandler.instance().getClient();
      if(hover && !isSlotSelected(position)) {
        GL11.glColor4b((byte)127, (byte)127, (byte)127, (byte)127);
        if(!clicked) {
          GL11.glTranslatef(0.0F, 0.0F, -0.01F);
        }
View Full Code Here

    public void renderAlways() {
      if(inv.getStackInSlot(position) == null && shouldDisplayButton(position)) {
        GL11.glPushMatrix();
        GL11.glColor4b((byte)127, (byte)127, (byte)127, (byte)64);
        GL11.glScaled(0.5D, 0.5D, 1.0D);
        Minecraft mc = FMLClientHandler.instance().getClient();
        BasicGuiHelper.drawGuiBackGround(mc, posX * 2, posY * 2, (posX + sizeX) * 2, (posY + sizeY) * 2, 0, false);
        GL11.glPopMatrix();
      }
    }
View Full Code Here

    this.module = module;
  }
 
  @Override
  public void renderContent() {
    Minecraft mc = FMLClientHandler.instance().getClient();
    GL11.glScalef(1.0F, 1.0F, -0.00001F);
    BasicGuiHelper.renderItemIdentifierStackListIntoGui(ItemIdentifierStack.getListFromInventory(module.getFilterInventory()), null, 0, -25, -32, 3, 9, 18, 18, mc, false, false, true, true);
    GL11.glScalef(1.0F, 1.0F, 1 / -0.00001F);
  }
View Full Code Here

TOP

Related Classes of net.minecraft.client.Minecraft

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.