Consumable Component

From wiki
Revision as of 22:49, 18 July 2017 by DeamonHunter (Talk | contribs) (Small grammar issue.)

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 Drinkable component, signified by the following;

"drinkable": {
  =Content=
}

Drinkable components are specifically used alongside Craft Items that have been made a Drink. This is used to specify the extra little things that go into making a drink.


When and How to use

Drinkable components are only used when a Craft Items is a Drink. It helps specify the visual particles that happen when drinking.

To create this component you would use the following;

"drinkable": {
  "colour": "FFF3D377",
  "drinkParticles": "staxel.particle.item.Drink"
},

There are only two properties. The first is the 'colour' value of the particles. This is an ARGB colour (That is Alpha, Red, Green, Blue) specified in hexadecimal. The second is the "drinkParticles", which points to Particle's Code.

And that is all.


Config Options

All config options must be inside the body of;

"drinkable": {
  =Config Here=
}

"colour"

Valid options (ARGB Colour): A string that is formatted to be in ARGB colour (Alpha, Red, Green, Blue in the format AARRGGBB in hexadecimal)

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


This is the colour that particles will spawn with. (Before colour variance)


"drinkParticles"

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

Default Value: Can be omitted.


This is the particle spawner that will be used to create the particles while drinking.