Package datatypes

Examples of datatypes.MCItemSlot


  }

  @Override
  public void handle(MCConnection conn) throws UnrecoverableException {
    short slot = conn.r.readShort();
    MCItemSlot slotcontent = MCItemSlot.readFromSocket(conn.r);
   
    if(slot >= 36) {
      slot -= 36;
      conn.getPlayer().setSlotItem(slot, slotcontent);
    } else {
View Full Code Here


    super(0x05);
    addInt(player.geteid());
    addShort((short) 0x00);    // 0 = held item changed
   
    try {
      MCItemSlot itemslot = player.getHeldItemAtSlot(player.getSelectedSlot());
     
      addShort(itemslot.getItem().getItemId());
      addShort(itemslot.getMetaData());
     
    } catch (Exception e) {
      addShort((short) 0x00);
      addShort((short) 0x00);
    }
View Full Code Here

    add((byte) player.getYaw());      // Rotation
    add((byte) player.getPitch());    // Pitch
   
    short selecteditem = 0;
    try {
      MCItemSlot currentitem = player.getHeldItemAtSlot(player.getSelectedSlot());
      selecteditem = currentitem.getItem().getItemId();
    } catch (UnrecoverableException e) {
      e.printStackTrace();
    } catch (NullPointerException e) {}
   
    addShort(selecteditem);    // Current item
View Full Code Here

TOP

Related Classes of datatypes.MCItemSlot

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.