✨ 特性
生物生成控制
蝙蝠生成(开启/关闭)
发光鱿鱼生成(开启/关闭)
幻翼生成(开启/关闭)
爆炸破坏控制
TNT 爆炸 – 选择是否破坏方块
苦力怕爆炸 – 选择是否破坏方块
方块交互控制
末影人拾取方块 – 防止末影人偷走方块
耕地踩踏 – 保护耕地免受实体踩踏
凋灵头颅自定义
启用/禁用自定义凋灵头颅持续时间
设置头颅的持续时间(以刻为单位,20 刻 = 1 秒)
所有功能均可通过单个 YAML 配置文件进行切换。无需修改代码或使用复杂命令。
? 安装
Minecraft 版本:1.21.1
加载器:Fabric Loader 0.15.0 或更高版本
必需模组:Fabric API(用于命令和事件)
只需将模组 .jar 文件与 Fabric API 一起放入 mods 文件夹即可。
? 配置
配置文件位于 config/xysmalltool/xysmalltool.yaml。如果该文件不存在,模组在首次运行时会自动生成一个带有有用注释的默认配置文件。
示例配置
yaml
XySmallTool Configuration
enableBatSpawn: true
enableGlowSquidSpawn: true
enablePhantomSpawn: true
allowTntGriefing: true
allowCreeperGriefing: true
allowEndermanPickUpBlocks: true
controlWitherSkullLife: false
witherSkullLifeTicks: 50
allowFarmlandTrample: true
如何应用更改
重启游戏/服务器 – 模组在启动时读取配置文件。
使用游戏内重载命令(需要 OP 等级 4):/xytool reload
成功消息将广播给所有操作员。
⌨️ 命令
| 命令 |
权限 |
描述 |
/xytool reload |
OP 等级 4 |
重新加载配置文件并立即应用更改 |
❓ 常见问题
问:我需要在客户端和服务器上都安装模组吗?
答:大多数功能(如生成控制、防止破坏等)仅在服务器上安装模组即可生效。但是,如果没有安装模组,客户端上显示的命令反馈文本可能无法正确翻译。为了获得最佳体验,建议在两端都安装。
问:我更改了配置但没有任何反应。
答:请检查你的 YAML 文件格式是否正确(缩进很重要)。你也可以运行 /xytool reload 并查看服务器日志以查找错误。
问:我如何恢复默认配置?
答:只需删除 config/xysmalltool/xysmalltool.yaml 文件并重启游戏/服务器,系统会重新生成一份带有默认设置的副本。
? 许可证
本模组基于 MIT 许可证开源。你可以自由地使用、修改和分发它。
✨ Features
Mob Spawn Control
Bat spawns (on/off)
Glow squid spawns (on/off)
Phantom spawns (on/off)
Explosion Griefing Control
TNT explosions – choose whether they destroy blocks
Creeper explosions – choose whether they destroy blocks
Block Interaction Control
Enderman block picking – prevent endermen from stealing blocks
Farmland trampling – protect farmland from being trampled by entities
Wither Skull Customization
Enable/disable custom wither skull lifetime
Set the skull’s lifetime in ticks (20 ticks = 1 second)
All features are toggleable via a single YAML configuration file. No need to edit code or use complex commands.
? Installation
Minecraft Version: 1.21.1
Mod Loader: Fabric Loader 0.15.0 or newer
Required Mod: Fabric API (for commands and events)
Simply drop the mod .jar file into your mods folder along with Fabric API.
? Configuration
The configuration file is located at config/xysmalltool/xysmalltool.yaml. If the file does not exist, the mod will generate a default one with helpful comments on first run.
Example Configuration
yaml
XySmallTool Configuration
enableBatSpawn: true
enableGlowSquidSpawn: true
enablePhantomSpawn: true
allowTntGriefing: true
allowCreeperGriefing: true
allowEndermanPickUpBlocks: true
controlWitherSkullLife: false
witherSkullLifeTicks: 50
allowFarmlandTrample: true
How to Apply Changes
Restart the game/server – the mod reads the config at startup.
Use the in-game reload command (requires OP level 4): /xytool reload
A success message will be broadcast to all operators.
⌨️ Commands
Command Permission Description
/xytool reload OP level 4 Reloads the configuration file and applies changes immediately
❓ FAQ
Q: Do I need the mod on both client and server?
A: Most functionality (spawn control, griefing prevention, etc.) works with the mod installed only on the server. However, command feedback texts may appear untranslated on clients without the mod. For the best experience, install it on both sides.
Q: I changed the config but nothing happened.
A: Check that your YAML file has the correct syntax (indentation matters). You can also run /xytool reload and check the server log for errors.
Q: How do I restore the default config?
A: Simply delete the config/xysmalltool/xysmalltool.yaml file and restart the game/server – a fresh copy with defaults will be generated.
? License
This mod is open-source under the MIT License. You are free to use, modify, and distribute it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧