欢迎来到 Fzzy Core!这是由 fzzyhmstrs(就是我啦!)制作的一些 Kotlin 模组所依赖的基础 API。除了提供许多不同类型模组都适用的基础实用功能外,Fzzy Core 还包含了 Modifier System(修饰符系统)的基本框架——这是一个灵活且强大的系统,用于修改……几乎任何东西!
Fzzy Core 的源代码中集成了 KDoc,方便查阅使用指南。我也正在努力创建一个维基!
Fzzy Core 目前仅支持 Fabric。暂无移植到 Forge 的计划。
Fzzy Core 是我将 Amethyst Core 拆分为更独立的功能组件这一计划的一部分。该模组是这些组件的基础,我目录中的其他 API 均在此基础上构建(例如用于魔法模组的 Amethyst Core)。
编码工具 (Coding Utils)
Fzzy Core 包含多种实用工具,让模组开发变得更加轻松!这些工具包括:
- 一个基础的附魔类,可以轻松集成配置系统以启用或禁用单个附魔。
- 对 Text 对象的封装,避免了多版本模组开发中因频繁处理 Text 变更而导致的合并冲突问题。
- 一个持久化效果系统,允许创建延迟、重复(或非重复)事件,且这些事件不绑定于特定实体的 Tick 或其他复杂的实现逻辑。
- 一个粒子创建系统,允许在玩家视角的特定位置放置客户端粒子。这使得物品可以拥有滴落粒子的效果,火把可以散发烟雾等。
同步配置系统
创建一个易于管理、支持版本控制并自动将服务器配置同步给加入客户端的配置系统!
- 利用 Kotlin 的独特功能,实现简洁清晰的代码结构
- 提供辅助方法,可自动将配置文件更新到新版本,并在替换前捕获旧版本的信息。
- 简单的自动同步功能实现。
自定义风味物品 (Custom Flavor Items)
添加带有“风味文本”(Flavortext,即背景故事或趣味描述文字)的基础物品或工具!
- 默认实现只需在语言文件中添加几行新文本即可
- 可选方法支持更复杂的文本排版
- 同时添加描述文本,用于解释风味文本的含义或说明物品功能
魔力物品 (Mana Items)
提供一个简单的框架,用于创建使用魔力而非通过常规方式损坏的物品。
修饰符框架 (Modifier Framework)
修饰符框架是一个灵活且可扩展的系统,旨在作为原版附魔系统的平行替代方案。修饰符旨在解决我发现的附魔系统的两个最大问题:附魔容易被移除,且其功能未内部化(除了几个伤害计算方法)。此外,附魔的表现形式也略显单调,仅用数字显示等级。修饰符旨在解决所有这些问题!
- 修饰符设计为永久性效果,更像是一种词缀。例如,砂轮无法移除它们。
- 修饰符设计为内部化其功能,可以作为整体调用,而非零散处理。
- 修饰符通过“家族树”机制运作,从而实现富有风味的等级体系。想象一下一把剑从“生锈”变为“闪亮”再到“熠熠生辉”等过程。
该库附带了内置的辅助方法,用于显示修饰符。 一个展示金色文本修饰符的工具提示示例
有关这些功能的更多详细信息,请参阅上方的维基链接。一旦实现,修饰符系统几乎可以完成任何任务。例如,Amethyst Core 内置了一个 AugmentModifier(增幅修饰符),它可以影响魔力消耗和冷却时间,改变法术伤害或范围,甚至在每次成功施法时触发高级效果,如使施法者周围 12 格半径内的所有怪物受到凋零效果。
修饰符可以简单到仅作为一个传递原版 AttributeModifiers(属性修饰符)的容器,也可以比上述的 AugmentModifier 复杂得多。如果愿意,甚至可以将它们纯粹用于装饰效果!
NBT 工具 (Nbt Util)
Fzzy Core 包含一个简单的工具,用于对 NBT 执行一些有用的操作:
- 使用单个辅助方法读取和写入 BlockPos,无需手动保存 X、Y、Z 坐标或进行 Long 类型转换
- 多个 NbtList 实用工具,用于从 NbtList 中读取、添加和删除数据
- 一个 ItemStackId 系统,可为某些物品堆栈附加唯一标识符。例如,这允许将物品堆栈与特定的方块实体关联……或者更多功能!
- 一个辅助方法,用于将一个堆栈的非附魔 NBT 数据传输到另一个堆栈。
射线投射工具 (Raycaster Util)
一组用于定位对象的简单辅助方法:
- 服务端射线投射,无需复杂的网络通信即可检测游戏对象
- 针对实体、方块的辅助方法,以及定位某点(如玩家)周围区域物体的功能
- 能够检查具有任意旋转立方体的实体。Minecraft 的默认检测系统均使用与 XYZ 网格对齐的盒子。这对于检查法术击中了哪些敌人非常有用,即使玩家是斜向上方观察也是如此。
事件注册表 (Event Registry)
用于添加和跟踪与特定对象(如实体)无关的基础 Tick 对象的注册表。
- 适用于创建仅在每 X 刻触发一次的周期性时钟,从而可以创建不会在每一刻都触发的刻方法。实际上,该注册表内置了间隔为 1 秒、1.5 秒和 2 秒的时钟。
- 添加了 TickUppable 接口和 Ticker 类,用于将对象注册到注册表中。
Item Model Registry
想要制作自定义三叉戟,但不知道如何让它像原版 Minecraft 那样在手持有正确的模型?这个注册表就是为你准备的!
- 为特定的渲染模式(手持、地面放置等)注册自定义物品模型
- 与标准的 Fabric BuiltinItemRendererRegistry.DynamicItemRenderer 集成
EffectQueue
讨厌添加被动状态效果时,GUI 中的状态效果会“打架”,快速来回切换吗?
- 这个简单的工具将所有传入的状态效果添加统一到一个可预测的顺序中
- 使用 addStatusEffect 中你期望的所有标准状态效果信息
Trinket Utils
Fzzy Core 可选地与 Trinkets 集成,添加了一些可用于它的实用函数
- getTrinketStacks 提供所有装备到指定活体实体的饰品列表
- AugmentTasks 接口允许创建与特殊附魔(称为 Augments)互动的饰品。这些增强功能允许饰具有可定制的被动和主动能力。
Welcome to Fzzy Core! This is the base API that powers some kotlin mods made by fzzyhmstrs (that's me!). Besides offering some basic utility functions that come in handy for many different types of mods, Fzzy Core includes the basic framework of the Modifier System, a flexible and powerful system for modifying... almost anything!
Fzzy Core has KDoc integrated into the source for guidance on use. I'm also working on creating a wiki!
Fzzy Core is currently for Fabric. No port to Forge is planned at this time.
Fzzy Core is part of my project to split Amethyst Core into more functional component parts. This mod is the base of those parts, other APIs in my catalog build upon this base (like Amethyst Core for magic mods)
Coding Utils
Fzzy core contains several utilities that make coding mods just a bit easier! These utilities include:
- A base Enchantment Class that can be easily integrated with a configuration system to disable/enable individual enchantments.
- A wrapper for Text that avoids headaches involved with multi-version mods and having to constantly battle merge conflicts on Text changes
- A persistent effect system that allows for creation of delayed, repeating (or non-repeating) events that aren't tied to a specific objects tick or other messy implementation.
- A particle creation system that allows for placing client-side particles at a certain spot in a players POV. This allows for items with particles dripping off them, a torch that emits smoke, etc.
Synced Configuration System
Create an easy-to-manage config system that allows for version control over time, and automatically syncs server configs to joining clients!
- Takes advantage of some of Kotlin's unique functionality for a simple and clean looking implementation
- Helper methods for automatic updating of config files to new versions, capturing the information from the old version before replacing it with the update.
- Simple implementation of auto-syncing functions.
Custom Flavor Items
Add basic or tool items with flavortext!
- Default implementation is simply some new lines in the lang file
- Optional methods for more complex text
- Also adds description text, for explaining what flavortext means, or for describing item functionality
Mana Items
Adds a simple framework for creating items that use mana instead of being damaged in the typical way.
Modifier Framework
The Modifier Framework is a flexible and extensible system designed as a parallel to the vanilla Enchanting system. Modifiers aim to solve two of the biggest problems I found with Enchanting: They are easily removable, and they do not internalize their functionality (besides a couple damage methods). Enchantments are also more boring than they could be, displaying their tier with a simple number. Modifiers aim to fix all of those issues!
- Modifiers are designed to be permanent, acting more like affixes. Grindstones can't remove them, for example.
- Modifiers are designed to internalize their functionality, and can be called as one unit rather than piecemeal.
- Modifiers act via a "family tree" that allow for flavorful tiers. Think of a sword going from "Rusty" to "Shiny" to "Gleaming" etc.
The library comes with builtin helper method for displaying modifiers An example tooltip demonstrating modifiers in gold text
See the wiki link above for more details on these features. Once implemented, a Modifier system can do just about anything. Amethyst Core, for example, has a built-in AugmentModifier that does things from affecting mana cost and cooldown, to changing spell damage or range, to triggering advanced effects like afflicting every mob in a 12 block radius around the caster with Wither upon any successful spell cast.
Modifers can be as simple as a container for passing vanilla AttributeModifiers, or much more complex than the AugmentModifier described above. They could even be used purely for flavor if desired!
Nbt Util
Fzzy Core includes a simple util for performing some useful actions on NBT
- read and write BlockPos with a single helper method, instead of manually saving X, Y, Z coords or doing Long conversion
- Several NbtList utilities for reading from, adding to, and removing from NbtLists
- An ItemStackId system for attaching a unique identifier to certain itemstacks. This allows, for example, an ItemStack keyed to a specific block entity... or much more!
- A helper method for transferring non-enchantment NBT from one stack to another.
Raycaster Util
A simple set of helper methods for locating objects
- Server-sided raycasting for detection of game objects without needing to do fancy networking
- Helper methods for entities, blocks, and locating things in areas around a point (like a player)
- Ability to check for entities with arbitrarily rotated cuboids. Minecraft's default detection systems all use boxes aligned to the XYZ grid. This is useful for something like checking what enemies a spell hits, even if the player is looking diagonally and up a hill.
Event Registry
Registry for adding and tracking basic ticking objects not related to specific objects like entities.
- Useful for creating periodic clocks that only fire every X ticks, allowing for creation of tick methods that don't fire every single tick. In fact, the registry comes with a 1 second, 1.5 second, and 2 second interval clock built in.
- Adds a TickUppable interface and Ticker class for registration of objects to the registry.
Item Model Registry
Want to make a custom trident but can't figure out how in heck to make the in-hand Trident appear like MC's does? This registry is for you!
- Register custom item models for specific render modes (in hand, on ground, etc)
- Integrates with the standard Fabric BuiltinItemRendererRegistry.DynamicItemRenderer
EffectQueue
Hate how adding passive status effects sometimes results in statuses "fighting" in the GUI, with statuses rapidly swapping back and forth?
- This simple utility unifies the additions of all status effects passed into it into a predictable order
- Uses all the standard status effect information you expect with addStatusEffect
Trinket Utils
Fzzy Core integrates optionally with Trinkets, adding some utility functions that can be used with them
- getTrinketStacks provides a list of all Tirnkets equipped to the passed living entity
- the AugmentTasks interface allows for creation of Trinkets that interact with special enchantments call Augments. These augments allow for trinkets with customizable passive and active abilities.
下载 Fzzy Core
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fzzy Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
新增内容
- 无
更改内容
- 无
修复内容
- 修复了在某些情况下
ModifierHelperType注册表在注册表冻结前未加载的问题。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组

评论 0
登录后参与评分
还没有评论,来抢沙发吧