java.lang.Object
meteordevelopment.meteorclient.utils.player.SlotUtils

public class SlotUtils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
    These constants refer to the slot index of relevant player slots.
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    indexToId(int i)
    Slot ids are used when inventory interactions have to be communicated to the server - you'll only find references to slot ids when dealing with screen handlers or slot/inventory packets.
    static boolean
    isArmor(int slotIndex)
     
    static boolean
    isHotbar(int slotIndex)
     
    static boolean
    isMain(int slotIndex)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HOTBAR_START

      public static final int HOTBAR_START
      These constants refer to the slot index of relevant player slots. They are used when dealing directly with the player inventory - e.g. mc.player.getInventory().getSelectedSlot() returns the slot index of your selected slot (i.e. main hand).
      See Also:
    • HOTBAR_END

      public static final int HOTBAR_END
      See Also:
    • MAIN_START

      public static final int MAIN_START
      See Also:
    • MAIN_END

      public static final int MAIN_END
      See Also:
    • ARMOR_START

      public static final int ARMOR_START
      See Also:
    • ARMOR_END

      public static final int ARMOR_END
      See Also:
    • OFFHAND

      public static final int OFFHAND
      See Also:
  • Method Details

    • indexToId

      public static int indexToId(int i)
      Slot ids are used when inventory interactions have to be communicated to the server - you'll only find references to slot ids when dealing with screen handlers or slot/inventory packets. All the methods in this class are used to translate slot indices to the ids for each handled screen.
      See Also:
      • the minecraft.wiki page for every slot id
      • ClientPlayerInteractionManager.clickSlot(int, int, int, SlotActionType, PlayerEntity)
      • ScreenHandler.internalOnSlotClick(int, int, SlotActionType, PlayerEntity)
      • Slot.id
    • isHotbar

      public static boolean isHotbar(int slotIndex)
    • isMain

      public static boolean isMain(int slotIndex)
    • isArmor

      public static boolean isArmor(int slotIndex)