Grazable Component

From wiki
Jump to: navigation, search

Category:Component Modding are all optional properties that can be added to any file. Components are useful in extending the original files with even more information, such as the cost of the item or whether the block can be broken by a weapon.

On this page, we go over the Grazable component, signified by the following;

"grazable": {
  "turnsInto": "staxel.tile.dirt.Dirt"
},

Grazable components are used by animals in order to "eat" this tile.


When and How to use

Grazable components should be used on any tile that you would want eaten by an animal.This can include grass but can also include stuff like hay blocks.

To create this component you would use the following;

"grazable": {
  "turnsInto": "staxel.tile.dirt.Dirt"
},

"turnsInto" is the tile you want to turn into. Normally this would be dirt. If you want the tile completely dissappear, use "staxel.tile.Sky".


Config Options

All config options must be inside the body of;

"grazable": {
  =Config Here=
}

"turnsInto"

Valid options (String): A string containing the code to a Tile.

Default Value: No default value is specified. Always need to provide your own.


This is the tile this tile will turn into when grazed upon.