Contents
Class InternalContainerUtilResource
java.lang.Object
com.hypixel.hytale.server.core.inventory.container.InternalContainerUtilResource
- Since:
- 2020/01/29
- Version:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic inttestRemoveResourceFromItems(ItemContainer container, ResourceQuantity resource, int testQuantityRemaining, boolean filter) Calculated the remaining quantity if an attempt is made to remove aResourceQuantityfrom existingItemStack's that have a matchingItem.getResourceTypes()resource type in the container.static inttestRemoveResourceFromSlot(ItemContainer container, short slot, ResourceQuantity resource, int testQuantityRemaining, boolean filter) static TestRemoveItemSlotResulttestRemoveResourceSlotFromItems(ItemContainer container, ResourceQuantity resource, int testQuantityRemaining, boolean filter)
-
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 aResourceQuantityfrom existingItemStack's that have a matchingItem.getResourceTypes()resource type in the container.- Parameters:
container-resource- TheResourceQuantityto be removedtestQuantityRemaining- The quantity in theResourceQuantitythat 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)
-