Consumable Component
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 Consumable Component, signified by the following;
"consumable": { =Content= }
Consumable Components are specifically used alongside Craft Items that have been made a Food or Drink. This is used to specify the extra little things that go into making a food/drink.
When and How to use
Consumable 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;
"consumable": { "colour": "FFF3D377", "particles": "staxel.particle.item.Drink", "sound": "" },
There are only three 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 #"particles", which points to Particle System Code. The third is the #"sound", which points to Sound Code.
These are all used immediately after eating/drinking the item.
Config Options
All config options must be inside the body of;
"consumable": { =Config Here= }
"colour"
Valid options (Colour): A string that is formatted to be in ARGB or RGB 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)
"particles"
Valid options (String): A string containing the code to a Particle spawner.
Default Value: If not specified, will not play particles.
This is the particle spawner that will be used to create the particles while eating/drinking.
"sound"
Valid options (String): A string containing the code to a Sound.
Default Value: If not specified, will not play sound.
This is the sound that will play while eating/drinking.