Json block behaviors Container: Difference between revisions

From Vintage Story Wiki
(Created page with "== Purpose == This attaches a container to the block and should be paired with the entityClass "GenericContainer". It has attributes that apply to the Generic Container. An e...")
 
mNo edit summary
 
Line 1: Line 1:
== Purpose ==
== Purpose ==
This attaches a container to the block and should be paired with the entityClass "GenericContainer". It has attributes that apply to the Generic Container.  An example implementation from VintageStorage is below.
This attaches a container to the block and should be paired with the entityClass "GenericContainer". It has attributes that apply to the Generic Container.  An example implementation from Vintage Story is below.
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
behaviors: [{name: "Container"}],
behaviors: [{name: "Container"}],

Latest revision as of 19:58, 1 January 2021

Purpose

This attaches a container to the block and should be paired with the entityClass "GenericContainer". It has attributes that apply to the Generic Container. An example implementation from Vintage Story is below.

	behaviors: [{name: "Container"}],
	entityclass: "GenericContainer",
	attributes: {
		inventoryClassName: "chest",
		quantitySlots: 12,
		dialogTitleLangCode: "basketcontents",
	},
Icon Sign.png

Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.

Modding
Modding Introduction Getting Started Theme Pack
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository