ChickenFactory
Link to 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.
Импорт пакета
Link to импорт-пакета
ZenScript Copyimport mods.contenttweaker.ChickenFactory;
Creating chickens
Link to 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:
- String name: the entity name of the chicken, used for models and the entity registry.
- CTColor color: The color, the chicken will have.
- IItemStack layedItem: The item the chicken will lay later on.
ZenScript CopyChickenFactory.createChicken(String name, CTColor color, IItemStack item);
Example Script
Link to example-script
ZenScript Copy#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();