Class InventoryUtilsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static DropResult addOrDrop(ItemStack $self, Inventory inventory, Boolean dropOverflow, Location location, Boolean naturally, Function1<Item, Unit> consumer) Attempts to add all items to the inventory and drops the remaining items to the world.
      final static DropResult addOrDrop(Inventory $self, ItemStack itemStack, Boolean dropOverflow, Location location, Boolean naturally, Function1<Item, Unit> consumer) Attempts to add all items to the inventory and drops the remaining items to the world.
      final static Item dropItem(World $self, Location location, ItemStack itemStack, Boolean naturally, Function1<Item, Unit> consumer)
      final static Location findLocation(Inventory $self)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • addOrDrop

         final static DropResult addOrDrop(ItemStack $self, Inventory inventory, Boolean dropOverflow, Location location, Boolean naturally, Function1<Item, Unit> consumer)

        Attempts to add all items to the inventory and drops the remaining items to the world.

        Parameters:
        inventory - Inventory to add the items to
        location - Location where the items should be dropped.
        naturally - Whether the items should be dropped naturally or not
        consumer - Consumer for the spawned items
        Returns:

        The result of the operation

      • addOrDrop

         final static DropResult addOrDrop(Inventory $self, ItemStack itemStack, Boolean dropOverflow, Location location, Boolean naturally, Function1<Item, Unit> consumer)

        Attempts to add all items to the inventory and drops the remaining items to the world.

        Parameters:
        itemStack - Items to add to the inventory
        location - Location where the items should be dropped.
        naturally - Whether the items should be dropped naturally or not
        consumer - Consumer for the spawned items
        Returns:

        The result of the operation

      • dropItem

         final static Item dropItem(World $self, Location location, ItemStack itemStack, Boolean naturally, Function1<Item, Unit> consumer)
      • findLocation

         final static Location findLocation(Inventory $self)