API 实用工具
API 实用工具
这些是一些静态实用工具,用于快速获取一些信息。
请注意,这些静态实用方法是为了懒人使用,你应该使用其他 API 类。
// Check if itemsadder finished loading its items and if they are available
// Normally you should use ItemsAdderFirstLoadEvent instead.
// but sometimes you might also need to check this programmatically.
public static boolean areItemsLoaded()
//Checks if an item is a custom item made with ItemsAdder
public static boolean isCustomItem(ItemStack itemStack)
public static boolean isCustomItem(String customItemName)
//returns the ItemStack of a custom block in world
public static ItemStack getCustomBlock(Block block)
//check if an entity in world is a furniture
public static boolean isFurniture(Entity entity)
//check if an ItemStack is a specific custom item
//(example: check if a pickaxe is 'amethyst_pickaxe')
public static boolean matchCustomItemName(ItemStack itemStack, String customItemName)旧 API
这是一些旧的 API,但仍能使用,且可以正常工作。
Last updated
Was this helpful?