Modopedia

Item Gallery

modopedia:item_gallery


Description

Renders items on the page in a configurable format, using Item Displays which can be plugged into the component and chained together.

Screenshot

modopedia:page_components/item

JSON Schema

IDTypeRequiredDefaultDescription
displayItemDisplay*-ItemDisplay to render. See below for more details.

ItemDisplay

An Item Display is a component used inside item galleries to define how an item (or other displays) should be rendered. For example, modopedia:simple will simply render an item on the page, while modopedia:grid will render a grid of ItemDisplays on the page, the available types and their json schemas are listed below. An ItemDisplay is defined in JSON as a JSON Object with a type field, the rest of the object being defined by the type. For example:

{
"type": "modopedia:simple",
"item": { "id": "minecraft:diamond" }
}

Simple (modopedia:simple)

Renders a single ItemStack, nothing special happening here.

IDTypeRequiredDefaultDescription
itemItemStack-ItemStack to render.

Cycling (modopedia:cycling)

Renders a single ItemStack at a time from a group, cycling between the available items every second or 20 ticks.

IDTypeRequiredDefaultDescription
itemsItemStack[]-ItemStacks to render.

Tag (modopedia:tag)

Renders a single ItemStack at a time from a tag, cycling between the available items every second or 20 ticks.

IDTypeRequiredDefaultDescription
tagResourceLocation-Location of the item tag to render.

Grid (modopedia:grid)

Renders a list of Item Displays in a grid, with a configurable number of displays per row and padding.

IDTypeRequiredDefaultDescription
displaysItemDisplay[]-Item displays to be rendered.
columnsIntegerMAXNumber of columns in the grid.
paddingInteger16Padding (in pixels) between each item display.
centeredBooleanfalseIf true, the grid will be horizontally centered.

Tag Grid (modopedia:tag_grid)

Renders all Items in a given tag as a grid. This is an extension to the modopedia:grid display for ease of use.

IDTypeRequiredDefaultDescription
tagResourceLocation-Location of the item tag to render.
columnsIntegerMAXNumber of columns in the grid.
paddingInteger16Padding (in pixels) between each item display.
centeredBooleanfalseIf true, the grid will be horizontally centered.

Rings (modopedia:rings)

Renders a list of Item Displays in rings/circles, with a configurable radius and number of displays per ring.

IDTypeRequiredDefaultDescription
displaysItemDisplay[]-Item displays to be rendered.
ring_countInteger6Number of displays to be shown in the first ring.
radiusInteger16Radius of the rings, subsequent rings will multiply this.
offsetInteger8Centering offset for displays, the default of 8 will center a standard 16x16 item.

Empty (modopedia:empty)

Renders nothing, intended to be used for spacing on layout type displays such as grids. Has no additional fields.