Hatchable
Automatically hatches eggs into their chicken variants or any configured item/entity before they despawn.
截图
介绍
Hatchable
What it does
Hatchable automatically hatches dropped eggs shortly before they would despawn. By default, eggs hatch into their respective baby chicken variants when resting on blocks such as Hay, Mud, Packed Mud or Mud Bricks.
Its hatch mapping system can also make any configured item hatch into any configured entity.
Default Behavior
By default:
- Items are checked after 5900 ticks.
- Each egg has an 80% chance to hatch.
- Spawned chickens are babies.
- Hatching is blocked when 50 entities from
#hatchable:density_entitiesare already within 20 blocks. - All eggs hatch their respective chicken variant.
When the chance fails or the density limit is reached, that item disappears instead of hatching. Items in a stack are handled one at a time.
Customization
Use /function hatchable:_config to configure:
- Hatch chance.
- Minimum item age.
- Spawned entity age.
- Density limit and range.
- Ordered hatch mappings.
- Hatch particles and sound.
- Debug categories and message subscriptions.
Each global hatching value has a Force option. When enabled, mappings cannot override that value.
Settings are divided into General, Feedback and Debug screens. Each setting can be reset individually, or the entire configuration can be restored to its defaults.
Hatch Mappings
Hatch Mappings are ordered rules that decide where, when and what hatches.
A rule can use:
itemsfor item IDs or item tags.hatchersfor block IDs or block tags.predicatefor an additional referenced predicate.entityfor the entity type to spawn.entity_datafor data merged into the spawned entity.chance,minimum_item_age,entity_age,density_limitanddensity_rangefor rule-specific behavior.
Every selector present in a rule must match. Matching rules compose from top to bottom: later scalar values take priority, while entity_data compounds merge.
A successful hatch needs a final resolved entity.
Inherited Item Data
Hatchable can copy compatible data from the item into the entity it creates.
A matching minecraft:entity_data component can provide base summon data. Entity-specific components can also carry variants, sound variants, collars, colors, sizes and patterns into the final entity.
Composed mapping data is applied afterward, so entity_data can override inherited values.
Tags
Edit #hatchable:hatchers to change the default blocks on which items can hatch.
Edit #hatchable:density_entities to change which nearby entities count toward the density limit.
The #hatchable:eggs, #hatchable:chicken/eggs and chicken-variant tags organize the default mappings. Hatch eligibility itself is controlled by Hatch Mappings, so custom items do not need to be added to #hatchable:eggs when a mapping already matches them.
Uninstallation
Use /function hatchable:uninstall to remove its persistent data if you ever need to remove the datapack.
常见问题
Hatchable 支持哪些 Minecraft 版本?
Hatchable 支持 Minecraft Java 版 1.21–26.3,共 17 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。
Hatchable 怎么安装?
新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。
Smidul 的其他作品
查看全部 →
Vitalboard
Displays live player health below names, in the list and sidebar.
Overbrew
Expands brewing with missing potions, new duration and strength tiers, particle-free variants, and custom fuels.
Incensed
Turn fire-like blocks into effect emitter incenses.
Chromaglow
Automatically grants every player and pet a glowing effect, allowing them to customize their outline color and auto-hide it using contextual settings.
评论
登录后评论和评分