premium banner
Reduce lag and keep your animals neatly stored while maintaining full interactivity!

Description

๐Ÿพ Animal Pens Mod

โœ… Optimize Your Farms & Reduce Lag!

Tired of lag caused by massive animal farms? Animal Pens lets you store animals in specialized pens, aquariums and aviaries while keeping full functionality!
No more overcrowded barns - keep your animals neatly contained while still breeding, shearing, milking, and collecting drops like normal.


๐ŸŽฎ How It Works:

โœ”๏ธ Animal Cage & Container โ€“ Capture land animals with the Animal Cage and water creatures with the Animal Container.
โœ”๏ธ Feeding animals acts as breeding โ€“ No need for free-roaming animals, just feed them inside their pen!
โœ”๏ธ Most vanilla interactions(1) are possible, including:
    ๐Ÿ—ก๏ธ Animal farming for loot
    โœ‚๏ธ Shearing sheep
    ๐Ÿฅ› Milking cows, mooshrooms, and goats
    ๐Ÿ„ Collecting mushroom stew from mooshrooms
    ๐Ÿ Bee pollen regeneration
    ๐Ÿข Turtle scutes dropping based on settings
    ๐Ÿ–Œ๏ธ Brush scutes from armadillo
    ๐Ÿงบ Water bucket to pick up fishes or axolotls

โœ”๏ธ Custom Interactions:
๐Ÿ”น Chickens, Turtles and Sniffers โ€“ Use a bucket to collect eggs.
๐Ÿ”น Turtles โ€“ Drop scutes after feeding (configurable timing).
๐Ÿ”น Sniffers โ€“ Require a bowl to drop seeds.
๐Ÿ”น Fish Feeding โ€“ Fish eat kelp & seagrass, while other water creatures eat fish.
๐Ÿ”น Frogs โ€“ Drop Frog Lights when fed a Magma Cube.

โœ”๏ธ Variant Storage & Selection
    โ€ข Picking up an animal saves its variant inside the cage.
    โ€ข Right-click an empty-handed pen to view stored variants.
    โ€ข If visual animal growing is enabled, you can adjust the display size of the animals.     โ€ข You can adjust the minimal amount of animals that should be protected from killing.     โ€ข You can toggle if animal pen/aquarium should be interactable only by you.

โœ”๏ธ Releasing animals by crouch clicking on ground.
โœ”๏ธ Animal Pens, Aquariums and Aviaries can send Redstone signal with comparator.
โœ”๏ธ Dispenser can be used on Animal Pens, Aquariums and Aviaries with certain tools.

(1) Features not added:
     Any animal transformation
     Any animal interaction with other entities


๐Ÿ”ง Customizable Settings:

Easily adjust gameplay with the modโ€™s configuration file [config/animal_pen_config.json], allowing you to tweak:

๐Ÿ—ก๏ธ Attack cooldown - Allows to change how fast players can kill animals in pen.

๐Ÿ“ Animal Growth System (Optional):
    โ€ข If enabled, more animals = larger pen display.
    โ€ข Adjustable growth multiplier.

๐ŸŽจ Stored Variants โ€“ Allows to change how many variants can be stored per pen.

๐Ÿšซ Blocked Animals List โ€“ Prevent specific mobs from being captured.


๐Ÿ”ง Data Driven Settings:

Added Three New Item Tags:

These tags define which items can attack their respective blocks:

  • animal_pen:can_attack_aquarium โ€“ Items in this tag can attack the Aquarium block.
  • animal_pen:can_attack_pen โ€“ Items in this tag can attack the Animal Pen block.
  • animal_pen:can_attack_aviary โ€“ Items in this tag can attack the Aviary block.

Example: Adding Custom Weapons

To allow custom_knife and modded_dagger to attack pens, create the following file in your datapack:

๐Ÿ“‚ For Minecraft 1.20.6 and Below:

Path: your_custom_datapack/data/animal_pen/tags/items/can_attack_pen.json

๐Ÿ“‚ For Minecraft 1.21 and Above:

Path: your_custom_datapack/data/animal_pen/tags/item/can_attack_pen.json

{
  "replace": false,
  "values": [
    "mod1_id:custom_knife",
    "mod2_id:modded_dagger"
  ]
}

This allows custom weapons to be used for attacking animal pens and aquariums.

Added Three New Entity Tags:

These tags define which items can attack their respective blocks:

  • animal_pen:animal_cage_pickable โ€“ Mobs that can be picked up by Animal Cage.
  • animal_pen:bird_catcher_pickable โ€“ Mobs that can be picked up by Bird Catcher.
  • animal_pen:water_mob_container_pickable โ€“ Mobs that can be picked up by Water Animal Container.

๐Ÿ“‚ For Minecraft 1.20.6 and Below:

Path: <your_custom_datapack>/data/animal_pen/tags/entity_types/animal_cage_pickable.json

๐Ÿ“‚ For Minecraft 1.21 and Above:

Path: <your_custom_datapack>/data/animal_pen/tags/entity_type/animal_cage_pickable.json

Customizable Interaction

You can also add or change interactions each animal. You can do it with data packs. To add animal interaction you need to create a file: <your_custom_datapack>/data/<your_data_pack_id>/animal_interactions/<your_interaction>.json To change animal interaction you need to change animal file: <your_custom_datapack>/data/minecraft/animal_interactions/<entity_id>.json

The interaction definition you can check at: Wiki

Default Data Packs

Already made Expansions


๐Ÿ“œ Commands:

Use these commands (server moderators) to manage the mod:

๐Ÿ’พ /animal_pen reset โ€“ Resets the config file to default values.
๐Ÿ”„ /animal_pen reload โ€“ Reloads the config file without restarting the game.


๐Ÿ› ๏ธ Requirements:

๐Ÿ“Œ Architectury API (Required).
๐Ÿ“– Patchouli (Optional, adds an in-game guidebook).
๐Ÿ› ๏ธ ClothConfigAPI (Optional, adds config editing GUI).


๐ŸŽจ Mod Artwork:

Credit to Breadcrumb5550 for the modโ€™s blocks and items!


With Animal Pens, you can **reduce lag, keep your farms organized, and maintain full interactivity!

Feel free to use this mod in your modpacks.**