Throwable Component

From wiki
Revision as of 06:51, 1 February 2018 by DeamonHunter (Talk | contribs) (Added new variable.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 Throwable component, signified by the following;

"throwable": {
  =Content=
}

Throwable components are added to any item, to allow them to be thrown forwards.


When and How to use

Pricing components should be used whenever you want an item to be sold or bought. It is not needed when the item should not be bought OR sold. (i.e. Creative only items, Debugging items etc).

To create this component you would use the following;

"pricing": {
  "throwStrength": 10.0
}

With this, the object can be thrown. It will be thrown with the force specified by "throwStrength".


Config Options

All config options must be inside the body of;

"pricing": {
  =Config Here=
}

"throwStrength"

Valid options (Double): A positive decimal number.

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


This is how much power the item will be thrown with.


"petWillFetch"

Valid options (Bool): True or False.

Default Value: If not specified, will default to False.


Whether or not the pet will fetch this when thrown.