Class InventoryUtil
java.lang.Object
com.binaris.wizardry.api.content.util.InventoryUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.entity.EquipmentSlot[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandoAllArmourPiecesHaveMana(net.minecraft.world.entity.LivingEntity entity) static booleandoesPlayerHaveItem(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item item) static Collection<net.minecraft.world.item.ItemStack>getAllItems(net.minecraft.world.entity.player.Player player) static Collection<net.minecraft.world.item.ItemStack>getAllItemsIncludingCarried(net.minecraft.world.entity.player.Player player) Gets all items including the carried item (cursor item when inventory is open).static List<net.minecraft.world.item.ItemStack>getHotbar(net.minecraft.world.entity.player.Player player) static List<net.minecraft.world.item.ItemStack>getHotBarAndOffhand(net.minecraft.world.entity.player.Player player) static booleanisWearingFullSet(net.minecraft.world.entity.LivingEntity entity, Element element, WizardArmorType armor)
-
Field Details
-
ARMOR_SLOTS
public static final net.minecraft.world.entity.EquipmentSlot[] ARMOR_SLOTS
-
-
Constructor Details
-
InventoryUtil
public InventoryUtil()
-
-
Method Details
-
getAllItems
public static Collection<net.minecraft.world.item.ItemStack> getAllItems(net.minecraft.world.entity.player.Player player) -
getAllItemsIncludingCarried
public static Collection<net.minecraft.world.item.ItemStack> getAllItemsIncludingCarried(net.minecraft.world.entity.player.Player player) Gets all items including the carried item (cursor item when inventory is open). This is important for systems that need to track ALL items a player has access to. -
getHotBarAndOffhand
public static List<net.minecraft.world.item.ItemStack> getHotBarAndOffhand(net.minecraft.world.entity.player.Player player) -
doesPlayerHaveItem
public static boolean doesPlayerHaveItem(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item item) -
getHotbar
public static List<net.minecraft.world.item.ItemStack> getHotbar(net.minecraft.world.entity.player.Player player) -
isWearingFullSet
public static boolean isWearingFullSet(net.minecraft.world.entity.LivingEntity entity, @Nullable Element element, @Nullable WizardArmorType armor) -
doAllArmourPiecesHaveMana
public static boolean doAllArmourPiecesHaveMana(net.minecraft.world.entity.LivingEntity entity)
-