Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers

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

Want to import the class? Here you go:

script.zs
import mods.contenttweaker.Chicken;

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.

ZenProperties

You can change or get the current value of the properties either by object.name = newValue or by using the methods object.setName(newValue);

Example:

script.zs
chickenRep.layItem = <minecraft:iron_ingot>;
print(chickenRep.layItem.displayName);
chickenRep.setLayItem(<minecraft:gold_ingot>);
print(chickenRep.getLayItem().displayName);
nametype
name
name
type
string
name
layItem
type
IItemStack
name
dropItem
type
IItemStack
name
backgroundColor
type
CTColor
name
foregroundColor
type
CTColor
name
textureLocation
type
CTResourceLocation
name
spawnType
type
string
name
layCoefficient
type
float
name
parentOne
type
CTResourceLocation
name
parentTwo
type
CTResourceLocation