项目:拯救宠物!
版本: 4.0.1-alpha
许可证: Apache-2.0
客户端/服务端: 均可(部分功能仅限客户端)
Forge/Fabric/Quilt: 任意
贡献者: Sisby folk (they/them)
保护你的宠物免受你自己、朋友以及环境带来的伤害,让它们重获新生!
该模组在客户端(功能受限)或服务端均能运行(单人游戏同时算作两者)。与大多数模组不同,本模组无需依赖另一侧即可独立工作。如果安装在服务端,所有客户端都将获得服务端功能。如果安装在客户端,你可以毫无问题地加入原版服务器。
Forge、Fabric 和 Quilt 拥有相同的功能和配置文件,并且可以互相兼容(例如:原版/Forge 服务端 + Fabric/原版 客户端)。
依赖项
Minecraft 1.20.0+
Java 版本: 19+
Fabric Loader: 0.14.0+
Fabric API: 0.87.0+
Forge Loader: 47.0.0+
Quilt Loader: 0.20.2+
Quilted Fabric API: 7.1.2+
功能
保护(客户端/服务端)
你的宠物将受到各种伤害来源的保护,这些伤害可能来自你、你的朋友或环境。
由朋友或你造成的伤害(客户端/服务端)
你可以防止由你或你的朋友造成的伤害。以下来源默认启用:
- 直接攻击(客户端或服务端)
- 爆炸(仅服务端)
- 投射物(仅服务端)
- 横扫攻击(仅服务端)
环境因素(仅服务端)
出于平衡性考虑,默认禁用。你可以启用以下选项以保护宠物免受其影响:
- 爆炸
- 甜浆果丛
- 火焰/岩浆
- 粉雪导致的冻结
- 溺水
白名单(客户端/服务端)
你可以将朋友添加到白名单中,使他们受到模组的保护。你只需提供用户名或账户的 UUID,其他值将自动生成。服务端和客户端的行为有所不同。
服务端
添加到白名单的用户将受到所有玩家的保护。
客户端
所有者在白名单中的实体将受到保护,免受你造成的伤害(受限于客户端功能)。
原版队伍(客户端/服务端)
处于同一原版队伍且关闭了友军伤害的玩家,无法伤害彼此的宠物。出于平衡性原因及客户端 Bug,默认禁用。
注意: 由于原版队伍使用用户名而非 UUID,客户端实现可能会导致游戏短暂卡顿几秒。
复活(仅服务端)
当你的宠物死亡时,它会掉落一张纸条。你可以手持这张纸条并右键点击铜块或其他已配置的方块来复活宠物。该方块会被消耗,宠物将会重生!再也不用担心失去伙伴了!
转移宠物所有权(仅服务端)
你可以手持木棍或其他可配置物品,蹲下后右键点击宠物来接管其所有权。
但是,此功能默认禁用,且服务端白名单中的用户受此功能保护。你只能转移那些被视为朋友的宠物(属于同一原版队伍或 PvP 已禁用)。
解除驯服(仅服务端)
不想要你的宠物了,或者想把它给别人?你可以蹲下并使用剪刀或其他已配置的物品来移除所有权。
伤害你的宠物(仅客户端)
在攻击时按住 Shift 键或你配置的按键,可以绕过客户端保护并伤害宠物。我不确定你为什么想这么做,但以防万一,这个功能就在这里。
注意: 如果服务端安装了该模组,此功能将被移除。
玩家保护(客户端/服务端)
默认禁用。你可以将玩家添加到你的白名单中(行为见白名单部分),从而无法伤害他们或其宠物!
注意: 此功能可能会因改变服务器的 PvP 机制而导致你被封禁。请谨慎使用。
配置
该模组高度可配置,允许用户根据需要禁用或启用各项功能,以获得理想的体验。
配置文件基于 JSON 格式。请参阅文件 CONFIG.md 查看带有注释的示例。
APIs(供开发者使用)
本模组在设计上支持从编程层面进行高度配置,以便其他模组调整或添加功能。
提供了许多方法和接口,方便添加新的环境保护、受保护的实体类型,甚至处理保护逻辑(适用于阵营类模组等类似模组)。
建议查看源代码以获取灵感。主要检查区域包括:
dcp.mc.projectsavethepets.ProjectSaveThePets- 主实例和逻辑处理器dcp.mc.projectsavethepets.apis.*- 包含模组使用的接口dcp.mc.projectsavethepets.blockers.*- 防止友军伤害的代码dcp.mc.projectsavethepets.entities.*- 受保护的实体dcp.mc.projectsavethepets.mixins.*- 用于防护各类伤害来源dcp.mc.projectsavethepets.notes.*- 复活纸条 NBT 处理器
常见问题
Forge 版?
已经完成了!我还更新了它,加入了 Quilt Loader 的支持!
整合包?
尽管拿去用!你已获得我的完全许可,可以将此模组添加到你的公开或私有整合包中。无需署名!
我可以将其用于我的模组吗?
当然可以!同上!
嘿!我看了你的代码,想截取一段片段!
没问题,我不介意!只要不是 blatantly(明目张胆地)复制粘贴整个文件就行!如果可能的话,我希望得到提及,但这并非强制要求。
我需要 Fabric API/Quilted Fabric API 吗?
是的,因为模组需要它们来实现自定义按键绑定。但仅当你使用 Fabric/Quilt 版本的模组时才需要!
这是客户端还是服务端模组?
它可以在客户端运行,无需服务器端安装。但许多功能将会缺失。这更适合与朋友在公共原版服务器上游玩,以免你的宠物之间爆发战争。注意: 我们不对在公共服务器中使用此模组导致的封禁负责。
然而,如果服务器已安装该模组,则所有玩家都无需单独安装即可访问全部功能。
祝你玩得愉快!
我的客户端需要安装此模组吗?
仅当服务器未安装此模组,以及用于单人游戏/局域网时才有必要。更多信息请参阅上文。
局域网多人游戏支持此模组吗?
支持!只要主机拥有该模组,所有人都能访问全部功能!
我有问题或发现了 Bug。
欢迎在下方留言提问,但我更建议将任何 Bug 报告提交至 GitLab 仓库!谢谢!
我有建议或希望添加的功能!
同上,欢迎留言提出!我会尽力实现,即使出于平衡性考虑(例如环境保护)我可能持保留意见。我认为模组应满足你的需求,即使是小众需求也是如此。因此某些功能可能在配置文件中默认禁用,但你始终可以手动启用它们!
Project: Save the Pets!
Version: 4.0.1-alpha
License: Apache-2.0
Client/Server Side: Either (Limited Client features)
Forge/Fabric/Quilt: Any
Contributor[s]: Sisby folk (they/them)
Protect your pets from yourself, friends, and the environment while giving them a second chance at life!
Works on the Client (with limited features) or the Server (Singleplayer counts as both). Unlike most mods, this mod will work on both without the other. If installed on the server, all clients will receive server side features. If installed on the client, you can join vanilla servers without issue.
Forge, Fabric, and Quilt have the same features and configuration files and can work with each other (IE: Vanilla/Forge Server and Fabric/Vanilla Client).
Dependencies
Minecraft 1.20.0+
Java Version: 19+
Fabric Loader: 0.14.0+
Fabric API: 0.87.0+
Forge Loader: 47.0.0+
Quilt Loader: 0.20.2+
Quilted Fabric API: 7.1.2+
Features
Protection (Client/Server Side)
Your pets are protected from various sources of damage, either caused by you, your friends, or the environment.
Damage caused by Friends or You (Client/Server Side)
Damage that you or your friends cause can be prevented. The following sources are available and enabled by default:
- Direct (Client or Server)
- Explosions (Server only)
- Projectiles (Server only)
- Sweeping (Server only)
Environmental (Server Side Only)
Disabled by default for balancing reasons. The following can be enabled to protect your pets from them:
- Explosions
- Sweet Berry Bushes
- Fire/Lava
- Freezing from Powder Snow
- Drowning
Whitelist (Client/Server Side)
You can whitelist friends that should be protected by the mod. You only need to provide the username or the UUID of the account as the other values will be automatically generated. Behaviour is different between the server and client.
Server Side
Users added to the whitelist are protected from all players.
Client Side
Entities whose owners are in the whitelist are protected from damage caused by you (Limited by Client Side features).
Vanilla Teams (Client/Server Side)
Players in the same vanilla team with Friendly Fire disabled cannot harm each other's pets. Disabled by default for balancing reasons and Client Side bug.
Note: Client Side implementation might cause the game to freeze for a few seconds as Vanilla Teams uses usernames rather than UUIDs.
Revival (Server Side Only)
When your pet dies, it drops a note. You can then use this note to revive the pet by holding the note and right-clicking on a Copper Block or other blocks that you have configured. The block will be consumed and the pet will be respawned! No more missing your friend!
Transferring Pets (Server Side Only)
You can assume ownership of a pet by holding a stick or other configurable items, crouching, and then right-clicking on the pet.
However, this feature is disabled by default and users in the server's whitelist are protected from this. You can only transfer pets that you are considered friends with (Same Vanilla Team or PvP is disabled).
Untaming (Server Side Only)
Don't want your pet or want to give it to someone else? You can remove ownership by crouching and using a shear or other configured items.
Harming your pets (Client Side only)
Holding down the Shift key or the key you configured while attacking will bypass the Client Side protection and harm the pet. I'm not sure why you want to do this, but it's here, just in case.
Note: Feature is removed if Server has the mod installed.
Player Protection (Client/Server Side)
Disabled by default, you can add players to your whitelist (see whitelist for behaviour) and be unable to harm them or their pets!
Note: This feature could get you banned for changing how PvP works in servers. Use with caution.
Configuration
The mod is highly configurable with options to disable or enable features to suit the experience the user wants to have.
The configuration file is based on JSON. Please see the file CONFIG.md for an example with comments.
APIs (For Devs)
This mod is designed to be highly configurable from the programming aspects to allow other mods to adjust or add behaviour to the mod.
Many methods and interfaces are available to use to easily add new environmental protection, new entity type to be protected, or even logic to handle how protection is done (for Factions and similarly based mods).
I suggest having a look at the source code for ideas. Main areas to check are:
dcp.mc.projectsavethepets.ProjectSaveThePets- Main instance and logic handlerdcp.mc.projectsavethepets.apis.*- Contains interfaces that is used by the moddcp.mc.projectsavethepets.blockers.*- Code to prevent friendly firedcp.mc.projectsavethepets.entities.*- Entities that are protecteddcp.mc.projectsavethepets.mixins.*- Used to protect from sources of damagedcp.mc.projectsavethepets.notes.*- Revival Notes NBT handlers
FAQ
Forge?
It's done already! I also updated it to include the Quilt Loader as well!
Mod Packs?
Go for it! You have my full permission to add the mod to your Public or Private Mod Pack. No credits required!
Can I use this for my mod?
Sure thing! Same as above!
Hey! I saw your code and would like to take a snippet!
Sure, I don't mind! As long as it's not a blatant copy and paste of an entire file! I do wish to be mentioned if possible but isn't a requirement.
Do I need Fabric API/Quilted Fabric API?
Yes you do as the mod needs it for the custom keybindings. But only if you are using the Fabric/Quilt version of the mod!
Is this client or server sided?
It can run on the Client without the Server having it installed. But, many features will be missing. This is more useful for playing on a Public Vanilla Servers with your friends, so that you don't start a war between your pets. Note: We are not responsible for bans for using this mod in a public server.
However, if the server has it installed, no Players will need to install the mod to get access to all the features.
Enjoy!
Does my client need this mod?
Only for servers that don't have this mod and for Singleplayer/LAN! See above for more information.
Does LAN Multiplayer work with this mod?
It does! As long as the person who is hosting the session has the mod, then everyone will have access to all features!
I got a question or a bug.
Feel free to comment below the question, however I would prefer if you left any bug reports in the GitLab Repository! Thanks!
I got a suggestion or feature I want added!
As above, feel free to comment it! I do my best to add it, even if I disagree with it for balance reasons (Such as environmental protection). I feel as if the mod should fit your needs, even if it is a niche. So it might be disabled in the config by default, but you can always enable it!
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Project: Save the Pets!
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
未指定更新日志。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧