How can I register a spawn egg for an entity type? #1591
-
I have created and registered an entity type. How can I give this entity type an associated spawn egg item? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Constructing
|
Beta Was this translation helpful? Give feedback.
Constructing
SpawnEggItem
The first step to registering a spawn egg item is to construct an item instance. Spawn eggs in particular use the
SpawnEggItem
class.The constructor takes four parameters:
type
: The entity type to spawnprimaryColor
: The primary color for the item modelsecondaryColor
: The secondary color for the item modelsettings
: The general item settingsAltogether, constructing a
SpawnEggItem
should look like this: