ChickenFactory

The ChickenFactory allows you to create custom Chickens to the game.
Note that this module is a feature addition to the Chickens mod by setycz, so this module is only available if that mod is loaded.

Importing the package

import mods.contenttweaker.ChickenFactory;

Creating chickens

First of all, you will need to create a Chicken Representation.
This is essentially an empty template of what your chicken will become.
This method returns such a Chicken Representation object, by taking the following parameters:

ChickenFactory.createChicken(String name, CTColor color, IItemStack item);

Example Script

#loader contenttweaker
#modloaded chickens

import mods.contenttweaker.ChickenFactory;
import mods.contenttweaker.Color;


val chickenRepresentation = ChickenFactory.createChicken("bedrocked_chicken", Color.fromInt(0xffffff), <item:minecraft:bedrock>);

chickenRepresentation.setForegroundColor(Color.fromInt(0xabcdef));

chickenRepresentation.register();