CustomItemService

Functions

Link copied to clipboard
abstract fun canBreakBlock(block: Block, tool: ItemStack?): Boolean?

Checks if the specified tool is good enough for the block to drop items.

Link copied to clipboard
abstract fun getBlockItemModelPaths(): Map<ResourceLocation, ResourcePath>

Gets the paths of all item models that are blocks.

Link copied to clipboard
abstract fun getBlockType(block: Block): CustomBlockType?

Gets the CustomBlockType of this Block or null if the Block is not from this CustomItemService

Link copied to clipboard
abstract fun getDrops(block: Block, tool: ItemStack?): List<ItemStack>?

Gets all drops of a block from this CustomItemService

Link copied to clipboard
abstract fun getId(block: Block): String?

Gets a namespaced if from a placed Block

abstract fun getId(item: ItemStack): String?

Gets a namespaced name from an ItemStack

Link copied to clipboard
abstract fun getItemById(id: String): ItemStack?

Gets an ItemStack from a namespaced name

Link copied to clipboard
abstract fun getItemTest(id: String): SingleItemTest?

Gets an SingleItemTest from a namespaced name

Link copied to clipboard
abstract fun getItemType(item: ItemStack): CustomItemType?

Gets the CustomItemType of this ItemStack or null if the ItemStack is not from this CustomItemService

Link copied to clipboard
abstract fun getName(block: Block, locale: String): Component?

Gets a localized name from a placed Block

abstract fun getName(item: ItemStack, locale: String): Component?

Gets a localized name for an ItemStack

Link copied to clipboard
abstract fun hasRecipe(key: NamespacedKey): Boolean

Checks if this CustomItemService registered a recipe with that key

Link copied to clipboard
abstract fun placeBlock(item: ItemStack, location: Location, playSound: Boolean): Boolean

Places an item from this CustomItemService

Link copied to clipboard
abstract fun removeBlock(block: Block, breakEffects: Boolean): Boolean

Remove a block from the world