Package net.minecraft.client

Examples of net.minecraft.client.Minecraft


  public static int elapsedTicks;

  @SubscribeEvent
  public void tickEnd(TickEvent event) {
    if (event.phase == TickEvent.Phase.END) {
      Minecraft mc = ClientHelper.minecraft();
      if (mc.currentScreen != null && mc.currentScreen instanceof GuiResearchRecipe && !(mc.currentScreen instanceof GuiResearchPeripheral)) {
        ResearchItem research = ReflectionHelper.getPrivateValue(GuiResearchRecipe.class, (GuiResearchRecipe) mc.currentScreen, 9);
        if (research.key.equals(LibResearch.KEY_PERIPHERALS) || research.key.equals(LibResearch.KEY_GOLEMCONNECTOR))
          mc.displayGuiScreen(new GuiResearchPeripheral(research));
      }

      ToolModeHUDHandler.clientTick();

      ++elapsedTicks;
View Full Code Here


  @SubscribeEvent
  @SideOnly(Side.CLIENT)
  public void drawDislocationFocusHUD(RenderGameOverlayEvent.Post event) {
    if (event.type == ElementType.ALL && tooltipDisplayTicks > 0 && !MathHelper.stringNullOrLengthZero(currentTooltip)) {
      Minecraft mc = Minecraft.getMinecraft();
      ScaledResolution var5 = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
      int var6 = var5.getScaledWidth();
      int var7 = var5.getScaledHeight();
      FontRenderer var8 = mc.fontRenderer;
View Full Code Here

  @SideOnly(Side.CLIENT)
  @SubscribeEvent
  public void renderHealthBar(RenderGameOverlayEvent event) {
    if (event.type == ElementType.FOOD && clientPlayerHP > 0) {
      if (event instanceof RenderGameOverlayEvent.Post) {
        Minecraft mc = Minecraft.getMinecraft();

        int x = event.resolution.getScaledWidth() / 2 + 10;
        int y = event.resolution.getScaledHeight() - 39;

        GL11.glTranslatef(0F, 10F, 0F);
View Full Code Here

    GL11.glPopMatrix();
    GL11.glColor4f(1F, 1F, 1F, 1F);
  }

  private void renderOverlay(TileRepairer tablet, ResourceLocation texture, double size) {
    Minecraft mc = ClientHelper.minecraft();
    mc.renderEngine.bindTexture(texture);
    GL11.glPushMatrix();
    GL11.glDepthMask(false);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
View Full Code Here

      GL11.glPopMatrix();
    }
  }

  private void renderOverlay(TileAnimationTablet tablet, ResourceLocation texture, int rotationMod, boolean useLighting, boolean useBlend, double size, float height, float forceDeg) {
    Minecraft mc = ClientHelper.minecraft();
    mc.renderEngine.bindTexture(texture);
    GL11.glPushMatrix();
    GL11.glDepthMask(false);
    if (!useLighting)
      GL11.glDisable(GL11.GL_LIGHTING);
View Full Code Here

  }

  @SubscribeEvent
  public void onRender(RenderWorldLastEvent event) {

    Minecraft mc = Minecraft.getMinecraft();
    Vector3d eye = Util.getEyePositionEio(mc.thePlayer);
    Vector3d lookAt = Util.getLookVecEio(mc.thePlayer);
    lookAt.add(eye);
    Matrix4d mv = VecmathUtil.createMatrixAsLookAt(eye, lookAt, new Vector3d(0, 1, 0));
View Full Code Here

  @Override
  public void draw(int mouseX, int mouseY, float partialTick) {

    RenderUtil.renderQuad2D(bounds.x, bounds.y, 0, bounds.width, bounds.height, ColorUtil.getRGB(Color.black));
    Minecraft mc = Minecraft.getMinecraft();
    ScaledResolution scaledresolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);

    int vpx = ( (screen.getGuiLeft() + bounds.x - screen.getOverlayOffsetX())* scaledresolution.getScaleFactor());
    int vpy = (screen.getGuiTop() + 4) * scaledresolution.getScaleFactor();
    int w = bounds.width * scaledresolution.getScaleFactor();
 
View Full Code Here

            textureFX instanceof Portal) {
            return null;
        }
        Class<? extends TextureFX> textureFXClass = textureFX.getClass();
        logger.info("attempting to refresh unknown animation %s", textureFXClass.getName());
        Minecraft minecraft = MCPatcherUtils.getMinecraft();
        loop:
        for (int i = 0; i < 3; i++) {
            Constructor<? extends TextureFX> constructor;
            try {
                switch (i) {
View Full Code Here

            }
        }
        textureList.clear();
        CustomAnimation.clear();

        Minecraft minecraft = MCPatcherUtils.getMinecraft();
        Compass compass = new Compass(minecraft);
        textureList.add(compass);
        if (fancyCompass && FancyCompass.refresh()) {
            compass.tileSize = 0;
        }
View Full Code Here

    private float plusY;
    private float plusOX;
    private float plusOY;

    private FancyCompass() {
        Minecraft minecraft = MCPatcherUtils.getMinecraft();
        RenderEngine renderEngine = minecraft.renderEngine;

        int targetTexture = renderEngine.getTexture(ITEMS_PNG);
        GL11.glBindTexture(GL11.GL_TEXTURE_2D, targetTexture);
        tileSize = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_WIDTH) / 16;
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.