Package net.minecraft.client

Examples of net.minecraft.client.Minecraft


  public void onUpdateClient(ItemStack itemstack, World world, Entity entity, int i, boolean flag)
  {
    if(entity instanceof EntityPlayer && ((EntityPlayer)entity).inventory.getCurrentItem() == itemstack)
    {     
      //Get useful objects
      Minecraft mc = Minecraft.getMinecraft();
      EntityPlayer player = (EntityPlayer)entity;
      PlayerData data = PlayerHandler.getPlayerData(player, Side.CLIENT);
     
      //Play idle sounds
      if (soundDelay <= 0 && type.idleSound != null)
View Full Code Here


  }
 
  @SubscribeEvent
  public void eventHandler(RenderGameOverlayEvent event)
  {
    Minecraft mc = Minecraft.getMinecraft();
   
    //Remove crosshairs if looking down the sights of a gun
    if(event.type == ElementType.CROSSHAIRS && FlansModClient.currentScope != null)
    {
      event.setCanceled(true);
View Full Code Here

  public boolean needsMenu = false;

  @SubscribeEvent
  public void tickEnd(ClientTickEvent evt) {

    Minecraft mc = Minecraft.getMinecraft();

    if (evt.phase == Phase.END) {
      if (mc.currentScreen instanceof GuiMainMenu) {
        if (needsMenu) {
          onMainMenu();
View Full Code Here

        return InvTweaksConst.MOD_VERSION;
    }
   
  @Override
  public void load() {
    Minecraft mc = ModLoader.getMinecraftInstance();
    obf = new InvTweaksObfuscation(mc);
   
    // Register onTick hook
    ModLoader.setInGameHook(this, true, true);
View Full Code Here

    ClientRegistry.registerKeyBinding(drinkingHelmet);
  }
 
  @SubscribeEvent
  public void onKey(KeyInputEvent event) {
    Minecraft mc = Minecraft.getMinecraft();
    EntityPlayer player = mc.thePlayer;
    if (!mc.inGameHasFocus || (player == null)) return;
    if (backpackOpen.isPressed() && (ItemBackpack.getBackpack(player) != null) &&
        BetterStorage.globalConfig.getBoolean(GlobalConfig.enableBackpackOpen))
      BetterStorage.networkChannel.sendToServer(new PacketBackpackOpen());
View Full Code Here

            FMLLog.warning("Warning: Texture %s not preloaded, will cause render glitches!", texture);
            if (Tessellator.class.getPackage() != null)
            {
                if (Tessellator.class.getPackage().getName().startsWith("net.minecraft."))
                {
                    Minecraft mc = FMLClientHandler.instance().getClient();
                    if (mc.ingameGUI != null)
                    {
                        mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("forge.texture.preload.warning", texture));
                    }
                }
View Full Code Here

    this.targetBiome = coordinates;
  }

  @Override
  public void updateAnimation() {
    Minecraft minecraft = Minecraft.getMinecraft();

    if (minecraft.theWorld != null && minecraft.thePlayer != null)
      updateCompass(minecraft.theWorld, minecraft.thePlayer.posX, minecraft.thePlayer.posZ, minecraft.thePlayer.rotationYaw, false, true);
    else
      updateCompass((World)null, 0.0d, 0.0d, 0.0d, true, true);
View Full Code Here

        if (leftOfCursor.charAt(0) == '/')
        {
            leftOfCursor = leftOfCursor.substring(1);

            Minecraft mc = FMLClientHandler.instance().getClient();
            if (mc.currentScreen instanceof GuiChat)
            {
                @SuppressWarnings("unchecked")
                List<String> commands = getPossibleCommands(mc.thePlayer, leftOfCursor);
                if (commands != null && !commands.isEmpty())
View Full Code Here

  }

  private boolean shouldSpawnParticle(World world, boolean canDisable) {
    if (canDisable && !Config.enableParticleFX)
      return false;
    Minecraft mc = FMLClientHandler.instance().getClient();
    int particleSetting = mc.gameSettings.particleSetting;
    if (!canDisable && particleSetting > 1)
      particleSetting = 1;
    if (particleSetting == 1 && world.rand.nextInt(3) == 0)
      particleSetting = 2;
View Full Code Here

    public WorldClient getWorld() {
        return getWorld(minecraft);
    }

    public Entity spawnEntity() {
        Minecraft mc = this.controller.getMinecraft();

        Entity entity = new RenderEntity(this.controller, getWorld(mc));
        setEntityPositionToPlayer(mc, entity);
        getWorld(mc).d(entity);
        setEntityPositionToPlayer(mc, entity);
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.