Class ItemStackHelper
java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.ItemStackHelper
Useful methods for
ItemStack
s- Since:
- 25/06/2022
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<net.minecraft.world.item.ItemStack>
parseUserInput
(String data, int amount) Reads the data from a user and converts it into anItemStack
with the given amount
-
Constructor Details
-
ItemStackHelper
public ItemStackHelper()
-
-
Method Details
-
parseUserInput
public static Optional<net.minecraft.world.item.ItemStack> parseUserInput(String data, int amount) throws RuntimeException Reads the data from a user and converts it into anItemStack
with the given amount- Parameters:
data
- The user dataamount
- The amount- Returns:
- The parsed itemstack
- Throws:
RuntimeException
-