Class SlotUtils
java.lang.Object
meteordevelopment.meteorclient.utils.player.SlotUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intThese constants refer to the slot index of relevant player slots.static final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic intindexToId(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 booleanisArmor(int slotIndex) static booleanisHotbar(int slotIndex) static booleanisMain(int slotIndex)
-
Field Details
-
HOTBAR_START
public static final int HOTBAR_STARTThese 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:
-
isHotbar
public static boolean isHotbar(int slotIndex) -
isMain
public static boolean isMain(int slotIndex) -
isArmor
public static boolean isArmor(int slotIndex)
-