跳到正文

Spawner-Recovery

作者:CpyBadTHT

A Minecraft Java Edition datapack that allows players to recover and reuse mob spawners with Silk Touch while preserving the original mob type.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

🔥 Spawner Recovery

A Minecraft Java Edition datapack that allows players to recover and reuse mob spawners with Silk Touch while preserving the original mob type.


✨ Features

  • ⛏️ Recover mob spawners using Silk Touch
  • 🧟 Preserve the original mob type
  • 🔄 Automatically restore the spawner when placed
  • ♾️ Place multiple spawners without manually resetting anything
  • 🧩 Generic system supporting different mobs
  • 🪶 No mods required
  • ⚙️ Uses Minecraft’s native datapack system

🎯 How it works

When a player breaks a mob spawner with Silk Touch, the datapack stores the mob type inside the recovered spawner.

When the spawner is placed again:

  1. The placement is detected.
  2. A raycast searches for the newly placed spawner.
  3. The stored mob type is read from custom_data.
  4. SpawnData is restored.
  5. SpawnPotentials is restored.
  6. The spawner is ready to spawn the original mob again.

The system is completely generic and does not require a separate function for each mob.


🧪 Tested Mobs

The datapack has currently been tested successfully with:

  • 🔥 Blaze
  • 💀 Skeleton
  • 🧟 Zombie
  • 🕷️ Spider

Other mobs using standard mob spawners should work with the same system.


📦 Installation

  1. Download the datapack from the Files section or the latest release.
  2. Place the datapack inside your world’s datapacks folder.
  3. Start or reload the world.
  4. Run /reload.
  5. The datapack is ready to use.

The datapack does not require any mods.


🛠️ Usage

Obtain a mob spawner with Silk Touch.

Break the spawner normally with the Silk Touch tool.

Place the recovered spawner again.

The datapack automatically restores the original mob type.

No command is required between placements.


⚙️ Technical Details

The datapack uses:

  • minecraft:custom_data
  • SpawnData
  • SpawnPotentials
  • Advancements
  • Functions
  • Scoreboards
  • Raycasting

The mob identifier is read dynamically from:

minecraft:custom_data.spawner_mob

This allows the same functions to handle different mob types without hardcoding individual mobs.


📋 Requirements

  • Minecraft Java Edition
  • Minecraft 26.2
  • No mods required

🚧 Development Status

🟢 Functional — v1.0.0

The core recovery and restoration system has been tested with multiple mob types and repeated spawner placement.


📜 License

See the repository for licensing information.


👤 Author

Created by CpyBad.

View Spawner Recovery on GitHub →

常见问题

Spawner-Recovery 支持哪些 Minecraft 版本?

Spawner-Recovery 支持 Minecraft Java 版 26.2。下载时注意选择和你游戏版本一致的文件。

Spawner-Recovery 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分