Link to chickenrepresentation
The ChickenRepresentation is a template of what your Chicken will do.
By default, it will only exist and lay the egg you gave it as initial parameter.
You can change this behavior to allow for better chickens by modifying the given properties.
Importing the class
Link to importing-the-class
Want to import the class? Here you go:
Registering the chicken
Link to registering-the-chicken
After you have set your chickenRepresentation to be what you want it to be, the most important part is to register it.
Be careful though, as any changes done to this template after the the registering will still take effect, so you should create a new chickenRepresentation for each chicken you want to have.
Link to zenproperties
You can change or get the current value of the properties either by
object.name = newValue or by using the methods
chickenRep.layItem = <minecraft:iron_ingot>; print(chickenRep.layItem.displayName); chickenRep.setLayItem(<minecraft:gold_ingot>); print(chickenRep.getLayItem().displayName);