Difference between revisions of "Consumable Component"

From wiki
Jump to: navigation, search
(Update formatting.)
(Updated drinkable component page to consumable component.)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
[[: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.
 
[[: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;
+
On this page, we go over the Consumable Component, signified by the following;
 
<pre>
 
<pre>
"drinkable": {
+
"consumable": {
 
   =Content=
 
   =Content=
 
}
 
}
 
</pre>
 
</pre>
  
Drinkable Components are specifically used alongside [[Craft Items]] that have been made a [[Craft Items#Creating a Food/Drink Item|Drink]]. This is used to specify the extra little things that go into making a drink.
+
Consumable Components are specifically used alongside [[Craft Items]] that have been made a [[Craft Items#Creating a Food/Drink Item|Food or Drink]]. This is used to specify the extra little things that go into making a food/drink.
  
  
 
= When and How to use =
 
= When and How to use =
Drinkable components are only used when a [[Craft Items]] is a [[Craft Items#Creating a Food/Drink Item|Drink]]. It helps specify the visual particles that happen when drinking.
+
Consumable components are only used when a [[Craft Items]] is a [[Craft Items#Creating a Food/Drink Item|Drink]]. It helps specify the visual particles that happen when drinking.
  
 
To create this component you would use the following;
 
To create this component you would use the following;
 
<pre>
 
<pre>
"drinkable": {
+
"consumable": {
 
   "colour": "FFF3D377",
 
   "colour": "FFF3D377",
   "drinkParticles": "staxel.particle.item.Drink"
+
   "particles": "staxel.particle.item.Drink",
 +
  "sound": ""
 
},
 
},
 
</pre>
 
</pre>
  
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 [[Particles|Particle's Code]].
+
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 [[Particles|Particle System Code]]. The third is the [[#"sound"]], which points to [[Sound|Sound Code]].
  
And that is all.
+
These are all used immediately after eating/drinking the item.
  
  
Line 31: Line 32:
 
All config options must be inside the body of;
 
All config options must be inside the body of;
 
<pre>
 
<pre>
"drinkable": {
+
"consumable": {
 
   =Config Here=
 
   =Config Here=
 
}
 
}
Line 45: Line 46:
  
  
== "drinkParticles" ==
+
== "particles" ==
 
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Particles|Particle]] spawner.</code>'''
 
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Particles|Particle]] spawner.</code>'''
  
Line 51: Line 52:
  
  
This is the particle spawner that will be used to create the particles while drinking.
+
This is the particle spawner that will be used to create the particles while eating/drinking.
 +
 
 +
 
 +
== "sound" ==
 +
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Sound]].</code>'''
 +
 
 +
'''Default Value:''' If not specified, will not play sound.
 +
 
 +
 
 +
This is the sound that will play while eating/drinking.

Latest revision as of 04:26, 5 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 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.