Class InternalContainerUtilResource

java.lang.Object
com.hypixel.hytale.server.core.inventory.container.InternalContainerUtilResource

public class InternalContainerUtilResource extends Object
Since:
2020/01/29
Version:
1.0
  • Constructor Details

    • InternalContainerUtilResource

      public InternalContainerUtilResource()
  • Method Details

    • testRemoveResourceFromItems

      public static int testRemoveResourceFromItems(@Nonnull ItemContainer container, @Nonnull ResourceQuantity resource, int testQuantityRemaining, boolean filter)
      Calculated the remaining quantity if an attempt is made to remove a ResourceQuantity from existing ItemStack's that have a matching Item.getResourceTypes() resource type in the container.
      Parameters:
      container -
      resource - The ResourceQuantity to be removed
      testQuantityRemaining - The quantity in the ResourceQuantity that is remaining
      Returns:
      The calculated remaining quantity that could not be removed from the container
    • testRemoveResourceSlotFromItems

      public static TestRemoveItemSlotResult testRemoveResourceSlotFromItems(@Nonnull ItemContainer container, @Nonnull ResourceQuantity resource, int testQuantityRemaining, boolean filter)
    • testRemoveResourceFromSlot

      public static int testRemoveResourceFromSlot(@Nonnull ItemContainer container, short slot, @Nonnull ResourceQuantity resource, int testQuantityRemaining, boolean filter)