-
Notifications
You must be signed in to change notification settings - Fork 9
Game components
In Chorus, a "game component" is any element from Minecraft that receives special highlighting in the editor and several specific features.
Within this category, there are: items, entities, enchantments, effects, particles and sounds.
Programmatically talking, they are represented as interfaces implemented by version-specific enumerations.
All of them can be accessed from JavaScript by calling getX(name)
, which returns an instance of the component, and getXs()
, which returns an array, where X
is the corresponding component type (e.g. getItem(name)
and getItems()
).
Since they all differ in some properties, this page will explain their properties explaining what they are and what components inherit them.
Inherited by all components.
Returns the enum name, uppercase and spaces replaced by underscores (e.g. OAK_PLANKS
).
Inherited by all components.
Returns the name capitalized and with spaces (e.g. Oak planks
).
Inherited by all component except Sound
.
Returns a list of JavaFX Image
s.
Its size can be either 0 or 1 from 1.13 upwards, but can be any on 1.12 items.
Inherited by Item
, Entity
, Enchantment
and Effect
.
Returns a description synchronously fetched from the official Minecraft wiki.
Note that it is not cached.
Inherited by Item
, Enchantment
and Effect
.
Returns a numeric ID.
Item
: always 0
from 1.13 and upwards.
Enchantment
: always -1
from 1.14 and upwards.