Table of Contents

Class EntityBehaviorPlayerInventory

Namespace
Vintagestory.GameContent
Assembly
VSEssentials.dll

Implements the inventory of player and rendering of the clothing and armor the player is currently wearing.
Also handles dropping items/armor on death.
Uses the "playerinventory" code Open in GitHub

[DocumentAsJson]
[AddDocumentationProperty("eyeprotective", "Use this on a collectible type. If true and the player is wearing this item, they won't cover their eyes with the right hand", "System.Boolean", "Optional", "false", true)]
[AddDocumentationProperty("keepContents", "If true, the player won't drop their inventory on death", "System.Boolean", "Optional", "false", true)]
[AddDocumentationProperty("dropArmorOnDeath", "If true, the player will drop the armor they are currently wearing on death. Only collectible types that have the 'protectionModifiers' attribute are affected", "System.Boolean", "Optional", "false", true)]
public class EntityBehaviorPlayerInventory : EntityBehaviorTexturedClothing
Inheritance
EntityBehaviorPlayerInventory
Inherited Members

Examples

"behaviors": [
 {
    "code": "playerinventory"
 }
]

Properties

dropArmorOnDeath (Optional) (Default: false)

If true, the player will drop the armor they are currently wearing on death. Only collectible types that have the 'protectionModifiers' attribute are affected

Property Value

Boolean

eyeprotective (Optional) (Default: false)

Use this on a collectible type. If true and the player is wearing this item, they won't cover their eyes with the right hand

Property Value

Boolean

keepContents (Optional) (Default: false)

If true, the player won't drop their inventory on death

Property Value

Boolean