PlayerPets
原版风格的玩家宠物与主人模组。现在你终于可以拥有其他玩家了!机制与原版狼相同 :3
为什么做这个?为了我和我男朋友 :3
这是我的第一个模组。不知道为什么我要发布它。它能用,也许别人也想用呢?
当前功能:
- 使用骨头对任意玩家进行驯服(基于原版的机制、粒子效果和驯服概率)
- 任何玩家都可以是主人或宠物,取决于谁先用骨头驯服了对方。被驯服的玩家无法再驯服其他人或被其他人驯服(除非他们先逃跑)
/playerpets runaway:逃离当前的主人(清除你的 NBT 数据,让你可以去拥有其他玩家或成为别人的宠物)
/playerpets owner:查看你当前的主人(输出你当前的 NBT 数据)
- 如果宠物离主人太远,且空间畅通(且无人处于载具、飞行、游泳等状态),宠物会被传送至更近的位置(1 秒冷却时间以防止错误)
- 宠物无法攻击其主人
服务端支持
从 v1.2 开始,此模组完全为服务端设计。
| PlayerPets |
玩家未安装 Player Pets |
玩家已安装 PlayerPets |
| 主机未安装 Player Pets |
什么都不会发生,傻 :p |
玩家可以正常加入,但 PlayerPets 不生效 |
| 主机已安装 Player Pets |
PlayerPets 功能 100% 正常 |
PlayerPets 功能 100% 正常,冗余但无害 |
请注意,“主机”可以是专用服务器,也可以是内部服务器(例如在单人世界中点击“对局域网开放”)。只要主机安装了该模组,模组即可正常工作。
但是为什么?为什么不计划支持其他版本?为什么要用 AI?
此模组专为 1.20.1 开发,因为这是我和我男朋友游玩的版本。虽然我的模组似乎能在其他 1.20.x 版本上运行,但我并不保证它们在那些版本上的功能,对这些版本的错误修复也将受到严重限制。抱歉。
其他主要或次要版本、其他加载器以及制作我自己的拴绳机制均不在计划中。为我和 bae 想要使用的特定版本和加载器构建此模组已经非常痛苦,所以很抱歉,我无法支持其他版本或加载器。
拴绳在技术上是不可能的,因为玩家不是实体。我没有能力制作变通方案,我知道它们存在,其他模组也做到了,但我做不到。不过这些模组不会与我的模组产生冲突,它们应该能很好地互补(我或许可以添加一个针对玩家拴绳模组的可选集成以配合我的主人机制,但也仅此而已了)
我通常讨厌使用 AI 进行编码,我通常手动编写一切代码(查看我的网站,它是完全手动编写的)。在这个项目中我与 AI 进行了大量的斗争,我非常讨厌它,甚至不能说我制作了最终产品。唉,算了。
但我不得不这么做,我不懂 Java,我只懂 HTML 和 CSS(甚至不太懂 JS)。这是我的第一个 Minecraft 模组,我真的想为我和我男朋友做一个简单的宠物模组(顺便学习一些 Java)。我甚至不确定是否要公开发布它,但既然做了,不如发出来吧?它确实能工作,也许别人也想用呢?
这就是没有许可证的原因。好吧,这代码不是我的,它几乎 100% 来自 AI,而 AI 的代码又来自不知何处。你能想象把它据为己有或要求版权尊重吗?绝对不行。因此采用公共领域(Public Domain)授权。
待办事项列表
- 确定哪些 1.20.x 版本可用
- 确定模组是客户端、服务端还是两者兼有
- 使用骨头对任意玩家进行驯服(基于原版的机制、粒子效果和驯服概率)
- 任何玩家都可以是主人或宠物,取决于谁先用骨头驯服了对方。被驯服的玩家无法再驯服其他人或被其他人驯服(除非他们先逃跑)
- 访问器以暴露 mixins
- 主人可以强制宠物坐下
- 如果宠物离主人太远,它们会被传送至更近的位置(除非正在坐下)
- 驯服后显示视觉项圈
- 通过右键点击食物来喂食和治疗你的宠物
- Jade/Waila/Whit 集成(当观察宠物时,显示其主人是谁)
- 装饰性名牌集成(主人可以将命名好的名牌右键点击到宠物身上,自动将其装备到饰品栏中,从而更改其显示名称)
- 玩家拴绳模组集成(这样我就不需要编写拴绳机制,因为我做不到)
- 添加调试消息和系统打印以辅助开发
- 在
/playerpets 下正确注册命令
-
/playerpets runaway:逃离当前的主人(清除你的 NBT 数据,让你可以去拥有其他玩家或成为别人的宠物)
-
/playerpets owner:查看你当前的主人(输出你当前的 NBT 数据)
- 在 NBT 中存储用户名而不是 UUID
- 使用 UUID 在用户名更改时更新用户名(无论如何)
- 重写 NBT 数据的读取和存储方式(多重影响)
- 重写处理程序文件,将函数拆分到作用域文件中,并放置适当流程图来处理右键事件
- 在与宠物交互时添加主人的挥动动画
- 修复传送功能导致控制台出现“玩家移动过快”日志的问题(不知道怎么修)
- 为传送功能添加额外检查(必须不处于游泳、载具或飞行状态)以更好地匹配原版行为
- 移除传送功能中冗余的坐下检查
- 防止宠物攻击其主人
问题列表
- Modrinth 页面信息不准确
- 命令无法访问 Mixin
- Handler 中的 Mixin 访问不当导致崩溃
- 命令注册不正确
- 玩家交互时双击(骨头会被使用两次)
- 即使玩家已被驯服,仍尝试驯服(会消耗骨头)
- 主人不能拥有多只宠物
- 主人和宠物的 NBT 数据重复
- 主人和宠物的 NBT 数据同步问题
- 与宠物交互时无动画效果
- 传送功能会在控制台中产生“玩家移动过快”的日志(不知如何修复)
- 传送过于激进,缺少一些检查
- 自定义坐姿检查现已冗余
许可证
本项目开源且无特定许可证,您可以随意使用。如果您愿意贡献代码,请随时参与!如果您希望移植到其他加载器或版本,那将非常棒!如果您想修改代码、发布自己的版本,或根据个人喜好进行调整,请自便!:3
(如果您制作自己的模组,更改命名空间可能有助于避免模组冲突,但这并非必需。)
您可以在此查看文件:
或者通过其原始链接:
或者直接阅读以下内容:
下方许可证:
本软件免费且不受限制,已释放至公共领域。
任何人都有权复制、修改、出版、使用、编译、销售或分发本软件,无论是源代码形式还是编译后的二进制文件,用于任何目的(商业或非商业),并以任何方式。
在承认版权法的司法管辖区,本软件的作者或将本软件中所有版权利益奉献给公共领域。我们出于公众利益而做出此奉献,并牺牲我们的继承人和后续受益人的利益。我们意图将此奉献视为一种明确的行为,永久放弃根据版权法对本软件享有的所有现在和未来的权利。
本软件按“原样”提供,不提供任何形式的明示或暗示担保,包括但不限于适销性、特定用途适用性和非侵权性的担保。在任何情况下,作者均不对因使用本软件或在本软件使用中产生的任何索赔、损害或其他责任负责,无论是在合同诉讼、侵权诉讼还是其他诉讼中。
如需更多信息,请参阅
PlayerPets
Vanilla style player pets and owners mod. Now you can finally own other players! Same mechanics as a vanilla wolf :3
Why make this? for me and my boyfriend :3
This is my first mod. dunno why i am publihsing this. it works, and maybe someone else wants it?
Current Features:
- tame any player by using a bone on them (vanilla based mechanics, particles, and tame chance)
- any player can be an owner or a pet, simply whoever tames who first with a bone. tamed players cannot tame others or be tamed by anyone else (unless they run away first)
- /playerpets runaway: run away from your current owner (wipes your nbt data, lets you own other players or become someone elses pet)
- /playerpets owner: veiw your current owner (dumps your current nbt data)
- if a pet is too far from their owner, and if space is clear (and if nobody is in vehicle, flying, swimming, etc) they get teleported closer (1s cooldown to prevent errors)
- pet cannot attack their owner
Server sided
this mod is entirely server sided as of v1.2
| PlayerPets |
Player doesn't have Player Pets |
Player has PlayerPets |
| Host doesn't have Player Pets |
Nothing will happen silly :p |
Player can join without issue, but PlayerPets does nothing |
| Host has Player Pets |
PlayerPets is 100% Functional |
PlayerPets is 100% Functional, redundant but harmless |
note that the Host can be anything from a dedicated server to an internal server (like from clicking LAN in a singleplayer world) Just as long as the Host has the mod, the mod will work
but why? why not planned? why ai?
this mod is developed exclusivly for 1.20.1 as this is what me and my boyfriend play on. While my mod seems to work for other 1.20.x version, i make no promise of function for them, and bug fixing for these version will be severly limited. srry.
other major or minor versions, other loaders, and making my own leash mechanics are all not planned. it was already hell to build this mod for the specific version and loader me and bae wanted to use it on, so im sorry but i cannt do other versions or loaders
leashing is technically impossible because players are not entities. i do NOT have the ability to make a workaround, i know they exist, other mods have done it, but i cant. those mod wont have issues with mine tho, they should conpliment each other very well (i might be able to add an optional integration with a player leash mod with my owner mechanic, but thats the extent of it)
i nornally hate using ai for coding, i usually hand code absolutly everything (check my website, its entirely hand coded) i had to fight ai ALOT on this project, i absolutly hated it, and i cant even say i made the end product. oh well
but i had to, i dont know java, all i know is html and css (not even much js). this is my first minecraft mod and i really wanted to make a simple pet mod for me and my boyfriend (and maybe larn some java along the way) i wasnt even sure about publuishing this publicly but, may as well? it does actually work, and maybe someoen else wants it?
and thats why the no license. well this isnt my code, its nearly 100% from ai which comes from who knows where. can you imagine claiming it as my own or demanding copyright respect? heck no. public domain it is.
ToDo List
- figure out what 1.20.x versions work
- figure out if mod is client or server sided (or both)
- tame any player by using a bone on them (vanilla based mechanics, particles, and tame chance)
- any player can be an owner or a pet, simply whoever tames who first with a bone. tamed players cannot tame others or be tamed by anyone else (unless they run away first)
- accessor to expose mixins
- owners can force their pet to sit
- if a pet is too far from their owner they get teleported closer (unless sitting)
- visual collar when tamed
- feed and heal your pet by right clicking them with food
- integration for jade/waila/whtit (when looking at a pet, show show owns them)
- integration for cosmetic nametags (owner can right click a named nametag onto their pet to auto equip the nametag into their trinket slot, changing their display name)
- integration for a player leash mod (so i dont have to code leash mechanics because i cannot)
- add debug messages and system prints to aid develpoment
- proper commands registered under /playerpets
- /playerpets runaway: run away from your current owner (wipes your nbt data, lets you own other players or become someone elses pet)
- /playerpets owner: veiw your current owner (dumps your current nbt data)
- Store username instead of UUID in NBT
- use UUID to update username in case username changes (somehow)
- rewrite how nbt data is read and stored (multiple effects)
- rewrite handler file, split functions into scoped files, and placed a proper flowchart to handle righ click events
- add owner swing animation when interacting with their pet
- fix teleport feature causing "player mvoed too quickly" logs in console (dunno how to fix)
- add extra checks to teleport feature (must not be swimming or in vehicle or flying) to match vanilla better
- remove redundant sit check for teleport feature
- prevent pet from attacking their owner
Bug List
- modrinth page not accurate
- commands cant access mixins
- improper mixin access from handler causes crash
- commands not registered properly
- double click on player interact (bone gets used twice also)
- can attempt to tame a player even if they are already tamed (consumes bones)
- owner cant have multiple pets
- duplicate nbt data on owner and pet
- sync issues between owner and pet nbt data
- no animation when interacting with pet
- teleport feature causes "player moved too quickly" logs in console (dunno how to fix)
- teleport too aggressive, missing some checks
- custom sit check now redudnant
License
this prohect is open and unlicensed, do whatever you want. and if you would like to contribute, please do! if you want to port to another loader or version, that wpuld be awesome! if you want to edit the code, publish your own version, or make changes for your own preferences, knock yourself out! :3
(if you make your own mod, changing the namespace could be useful to avoid mod conflict but not necessary)
you can see the file here:
or from its origin link:
or just read it below:
License Below:
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to
评论 0
登录后参与评分
还没有评论,来抢沙发吧