Package net.minecraft.src

Examples of net.minecraft.src.EntityClientPlayerMP


        cont2PosZ = userScale * cont2.pos[2] * ZDIRECTION;

        if( mc.lookaimController != this) return;
        if( mc.theWorld != null )
        {
          EntityClientPlayerMP thePlayer = mc.thePlayer;
         
          //buttons?
          //TODO: move this somewhere sane and make configurable
          GameSettings settings = mc.gameSettings;
 
          if((cont2.buttons & EnumButton.START.mask())>0 &&
            (lastcont2Buttons & EnumButton.START.mask()) == 0)
          {
            if(mc.currentScreen != null)
              thePlayer.closeScreen();
            else
              settings.keyBindInventory.pressTime=1;
          }

          if((cont1.buttons & EnumButton.START.mask())>0 &&
            (lastcont1Buttons & EnumButton.START.mask()) == 0)
          {
            if(mc.currentScreen != null)
              thePlayer.closeScreen();
            else
              mc.displayInGameMenu();
          }
        
          //In game!
View Full Code Here


    super("key.left","key.left");
  }

  @Override
  public void setValue(float value) {
        EntityClientPlayerMP thePlayer = Minecraft.getMinecraft().thePlayer;
        if( thePlayer != null )
          thePlayer.movementInput.baseMoveStrafe = Math.abs(value);
  }
View Full Code Here

    super("key.forward","walk.forward");
  }

  @Override
  public void setValue(float value) {
        EntityClientPlayerMP thePlayer = Minecraft.getMinecraft().thePlayer;
        if( thePlayer != null )
          thePlayer.movementInput.baseMoveForward = Math.abs(value);
   
  }
View Full Code Here

    super("key.back","key.back");
  }

  @Override
  public void setValue(float value) {
        EntityClientPlayerMP thePlayer = Minecraft.getMinecraft().thePlayer;
        if( thePlayer != null )
          thePlayer.movementInput.baseMoveForward = -value;
  }
View Full Code Here

    super("key.right","key.right");
  }

  @Override
  public void setValue(float value) {
        EntityClientPlayerMP thePlayer = Minecraft.getMinecraft().thePlayer;
        if( thePlayer != null )
          thePlayer.movementInput.baseMoveStrafe = -value;
  }
View Full Code Here

  }

  @Override
  public void setState(boolean state) {
    if( state ) {
      EntityClientPlayerMP thePlayer = Minecraft.getMinecraft().thePlayer;
      if( thePlayer != null )
            thePlayer.inventory.changeCurrentItem(1);
    }
     
  }
View Full Code Here

  }

  @Override
  public void setState(boolean state) {
    if( state ) {
      EntityClientPlayerMP thePlayer = Minecraft.getMinecraft().thePlayer;
      if( thePlayer != null )
            thePlayer.inventory.changeCurrentItem(-1);
    }
     
  }
View Full Code Here

    new Thread() {
      public void run() {
        if (keyReleased && screen == 0) {
          for (String cmd:getCommands()) {
            if (SpoutClient.getHandle().isMultiplayerWorld()) {
              EntityClientPlayerMP player = (EntityClientPlayerMP)SpoutClient.getHandle().thePlayer;
              player.sendQueue.addToSendQueue(new Packet3Chat(cmd));
            }
            if (delay > 0) {
              try {
                sleep(delay);
View Full Code Here

   * @param packet the Packet to send
   * @returns if the sending was successful
   */
  public boolean sendSpoutPacket(SpoutPacket packet) {
    if (mc.thePlayer instanceof EntityClientPlayerMP && SpoutClient.getInstance().isSpoutEnabled()) {
      EntityClientPlayerMP player = (EntityClientPlayerMP)mc.thePlayer;
      player.sendQueue.addToSendQueue(new CustomPacket(packet));
      return true;
    }
    return false;
  }
View Full Code Here

  public void sendCustomPacket(String channel, byte[] data) {
    sendPacket(new Packet250CustomPayload(channel, data));
  }

  private void sendPacket(Packet packet) {
    EntityClientPlayerMP player = (EntityClientPlayerMP)mc.thePlayer;
    if (player != null) {
      player.sendQueue.addToSendQueue(packet);
    }
  }
View Full Code Here

TOP

Related Classes of net.minecraft.src.EntityClientPlayerMP

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.