public class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.item.ItemStack |
getInvalidSeed(net.minecraft.item.Item item)
Provides an invalid version of the given item.
|
static int |
getItemDamage(net.minecraft.item.ItemStack stack)
Provides the damage value of the given ItemStack.
|
static boolean |
isValidSeed(int seedIndex)
Determines if the given seed is valid or not based on
the index of it.
|
static boolean |
isValidSeed(Seed seed)
Determines if the given seed is valid or not.
|
static boolean |
isValidSeed(java.lang.String seedName)
Determines if the given seed is valid or not based on
the registered name of it.
|
static java.lang.String |
itemStackToString(net.minecraft.item.ItemStack stack)
Converts an ItemStack into a string with the formatting of:
domain:regname:meta#amount
Basically the inverse of
parseItemStack(String, boolean) |
static net.minecraft.item.ItemStack |
parseItemStack(java.lang.String stackString,
boolean input)
Takes a string input with a specific formatting and
parses it as an ItemStack.
|
static void |
playBlockBreakAnim(net.minecraft.world.World world,
int x,
int y,
int z,
BlockStack blockStack)
Causes a break animation at the given coordinates.
|
static void |
registerCompat(java.lang.Class clazz,
java.lang.String modid)
Loads a class if the given modid is found
|
public static net.minecraft.item.ItemStack parseItemStack(java.lang.String stackString,
boolean input)
stackString - - Formatted stringinput - - Whether the string defines an input or not.public static java.lang.String itemStackToString(net.minecraft.item.ItemStack stack)
parseItemStack(String, boolean)stack - - ItemStack to create a string ofpublic static net.minecraft.item.ItemStack getInvalidSeed(net.minecraft.item.Item item)
item - - Item to give an invalid version ofpublic static int getItemDamage(net.minecraft.item.ItemStack stack)
stack.getItemDamage()stack - - ItemStack to get the metadata of.public static boolean isValidSeed(int seedIndex)
seedIndex - - Index of the seed to check.public static boolean isValidSeed(java.lang.String seedName)
seedName - - Name of the seed to check.public static boolean isValidSeed(Seed seed)
seed - - Seed to check.public static void playBlockBreakAnim(net.minecraft.world.World world,
int x,
int y,
int z,
BlockStack blockStack)
world - - The world objectx - - X coordinate to play aty - - Y coordinate to play atz - - Z coordinate to play atblockStack - - BlockStack to get the particle texture frompublic static void registerCompat(java.lang.Class clazz,
java.lang.String modid)
clazz - - Compatibility classmodid - - Required modid