
Description
Shared library for <span style="color: #3598db; --darkreader-inline-color: var(--darkreader-text-3598db, #46a1de);" data-darkreader-inline-color="">Catch and Release: Butterflies</span> and <span style="color: #3598db; --darkreader-inline-color: var(--darkreader-text-3598db, #46a1de);" data-darkreader-inline-color="">Catch and Release: Fish</span>.
Contains common code for "cages" and storing creatures within those cages.

<span style="color: #e03e2d;" data-darkreader-inline-color="">Below is for modders who want to extend the mod or create their own caged creatures</span>
TODO: Documentation on API. If anyone is interested in using this for further mods, come and discuss in Catch and Release post in the VS Discord.
Example how to setup new cages:
- Create shape + animations for caged creature entities
- Entity definition for caged creature(s). Including:
Caged creature behaviour snipped
behaviors: [
{
code: "taskai",
aitasks: [{
code: "crlib.CreatureCaged",
priority: 0,
movespeed: 0.6, <- How fast caged creature moves
turnspeed: 2.5, <- How fast caged creature turns to target position
moveAnim: "fly", <- Name of animation for when moving
restAnim: "feed", <- Name of animation for when sleeping
restTime: "Day", <- Creature sleeps during "Day" "Night" or "None" (to not rest)
restDaylightLevel: 0.7, <- Daylight amount to trigger sleeping (basically, time of day)
groundOnRest: true <- When resting, does the creature find the ground first
}]
}
]
{
code: "taskai",
aitasks: [{
code: "crlib.CreatureCaged",
priority: 0,
movespeed: 0.6, <- How fast caged creature moves
turnspeed: 2.5, <- How fast caged creature turns to target position
moveAnim: "fly", <- Name of animation for when moving
restAnim: "feed", <- Name of animation for when sleeping
restTime: "Day", <- Creature sleeps during "Day" "Night" or "None" (to not rest)
restDaylightLevel: 0.7, <- Daylight amount to trigger sleeping (basically, time of day)
groundOnRest: true <- When resting, does the creature find the ground first
}]
}
]
- Shape for your cage(s) (plus textures if needed)
- Custom cage block(s). Including:
Cage config attribute
attributes: {
cageConfig: {
cageName: "crbutterfly:cage_name", <- Just some display test when refering to this type of cage
fits: 4, <- How many creatures fit in the cage
radius: 0.3, <- Size of the cage (for the purpose of determining creatures walking around)
height: 0.5, <- Height of the cage (for the purpose of flying creatures - 0 for walking creatures)
bottom: 0.05, <- Offset the 'floor' of the cage
validItems: "game:creature-butterfly-*", <- What creature items can be placed in the cage
dropsEntity: "game:butterfly-", <- What creature items fall out of a broken cage
spawnEntity: "crbutterfly:cagedbutterfly-", <- What creature entities 'wander' in the cage
displays: 1 <- How many items to display in a cage
},
}
cageConfig: {
cageName: "crbutterfly:cage_name", <- Just some display test when refering to this type of cage
fits: 4, <- How many creatures fit in the cage
radius: 0.3, <- Size of the cage (for the purpose of determining creatures walking around)
height: 0.5, <- Height of the cage (for the purpose of flying creatures - 0 for walking creatures)
bottom: 0.05, <- Offset the 'floor' of the cage
validItems: "game:creature-butterfly-*", <- What creature items can be placed in the cage
dropsEntity: "game:butterfly-", <- What creature items fall out of a broken cage
spawnEntity: "crbutterfly:cagedbutterfly-", <- What creature entities 'wander' in the cage
displays: 1 <- How many items to display in a cage
},
}
- Recipe(s) for cage(s)
Ratings & reviews
No ratings yet
Sign in to leave a rating or comment.

