Custom content
Custom blocks and items, and the resource pack they are served with.
| Type | Kind | Description |
|---|---|---|
BlockBreakContext |
class | What a custom block’s break handler gets. |
BlockInteractContext |
class | What a custom block’s interact handler gets. |
BlockPlaceContext |
class | What a custom block’s place handler gets. |
BlockRegistry |
class | Registers custom blocks. |
Content |
class | Entry point of the custom content API: Content.Items and Content.Blocks (and ResourcePackBuilder, ResourcePackHost). |
CustomBlock |
class | A custom block: a state of a vanilla block that vanilla play seldom produces (and never turns a block into: the engine guards it), with its own hardness, drops and behaviour. |
CustomItem |
class | A custom item: a vanilla item the client already knows (the base item decides the id the client sees and the behaviour class) carrying data components that make it a different item: custom_data (the id, found again with ItemStack.CustomId), item_model (the look, from a resource pack), a name, lore, a stack size and a rarity. |
ItemRarity |
enum | How rare an item is (the colour of its name). |
ItemRegistry |
class | Registers custom items. |
ItemUseContext |
class | What a custom item’s use handler gets. |
PackImage |
class | Small generated textures for packs and tests: 8-bit RGBA PNG files made without any imaging library. |
ResourcePackBuilder |
class | Builds the resource pack zip that goes with custom content: item definitions, models, textures, language files and the block state remap of custom blocks. |
ResourcePackFile |
class | A built resource pack: the zip, its SHA-1 and the id clients know it by. |
ResourcePackHost |
class | A small built-in web server that hands out the resource packs plugins publish, so a plugin needs no web space of its own. |