Difference between revisions of "Grazable Component"

From wiki
Jump to: navigation, search
(Initial commit.)
 
(Update Page.)
 
Line 33: Line 33:
  
 
== "turnsInto" ==
 
== "turnsInto" ==
'''Valid options (String): <code>A string containing the code to a [[Tile]].</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Tile]].</code>'''
  
 
'''Default Value:''' No default value is specified. Always need to provide your own.
 
'''Default Value:''' No default value is specified. Always need to provide your own.

Latest revision as of 06:07, 14 December 2017

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.