Class CreativeTabAndStackList
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Allows you to add a list of item stacks to put various into creative menu tabs.
public class CreativeTabAndStackList
- Inheritance
-
CreativeTabAndStackList
- Inherited Members
- Extension Methods
Examples
"creativeinventoryStacksByType": {
"*-fired": [
{
"tabs": [ "general", "decorative" ],
"stacks": [
{
"type": "block",
"code": "bowl-fired",
"attributes": {
"ucontents": [
{
"type": "item",
"code": "waterportion",
"makefull": true
}
]
}
},
{
"type": "block",
"code": "bowl-fired",
"attributes": {
"ucontents": [
{
"type": "item",
"code": "honeyportion",
"makefull": true
}
]
}
},
{
"type": "block",
"code": "bowl-fired"
},
{
"type": "block",
"code": "bowl-raw"
}
]
}
]
},
Fields
Stacks
A list of item stacks to put in tabs. Note that every itemstack here will be placed in every Tabs entry.
public JsonItemStack[] Stacks
Field Value
Tabs
A list of creative tabs to put items into. Note that all itemstacks in Stacks will be placed in all tabs.
public string[] Tabs
Field Value
- string[]
Methods
FromBytes(BinaryReader, IClassRegistryAPI)
Reads the blocks and items from the Json files and converts them to an array of tabs which contain those blocks and items.
public void FromBytes(BinaryReader reader, IClassRegistryAPI registry)
Parameters
reader
BinaryReaderThe reader to read the json.
registry
IClassRegistryAPIThe registry of blocks and items.
ToBytes(BinaryWriter, IClassRegistryAPI)
Writes all the data to the BinaryWriter.
public void ToBytes(BinaryWriter writer, IClassRegistryAPI registry)
Parameters
writer
BinaryWriterThe writer to write the save data
registry
IClassRegistryAPIThe registry of blocks and items.