数据属性:导演剪辑(Data Attributes: Directors Cut)
数据属性:导演剪辑是一个 Minecraft 模组,从原始项目【数据属性】( 版本移植而来。它只提供两个功能:彻底改革 Minecraft 的实体属性系统,使其更加动态化,并允许属性暴露给数据包操作,以便包开发者自定义属性系统的所有内容。
• 数据属性:导演剪辑是什么?
数据属性:导演剪辑是一个 Minecraft 模组,它从原始项目[数据属性](
- 彻底改革 Minecraft 的实体属性系统,使其更加动态化。
- 允许属性暴露给数据包操作,以便包开发者自定义属性系统的所有内容。
• 使用方法
数据属性:导演剪辑拥有 [Curseforge](
gradle
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
modImplementation "maven.modrinth:data-attributes-directors-cut:
}
或者,如果您使用的是 Cursemaven:
gradle
repositories {
maven {
name = "Cursemaven"
url = "https://cursemaven.com"
}
}
dependencies {
modImplementation "curse.maven:data-attributes-directors-cut-955929:
}
请注意,数据属性:导演剪辑依赖于[Fabric API](
它也不支持 Attributefix,因为它们具有相同的功能。
• 常见问题解答
- 你会发布 Forge 版本吗?
- 我们不会发布 Forge 版本,因为原始模组作者没有这样做,但许可证允许您自行进行发布。
- 我认为我发现了一个 bug/崩溃,我应该在哪里报告?
- 请在[问题追踪器](
请注意,模组 AttributeFix 与数据属性是不兼容的 - 它们具有相同的功能!
• Wiki
如需更详细的文档,请参阅[Wiki](
2.0.4+1.21.1
- Data Attributes is now on 1.21.1 for fabric & neoforge!
- Add button for Entity Types (will downstream this to 1.20.1 momentarily).
## Changes 🌽
- Resolved source identifier on jars.
- `EventSources` are used in replacement of fabric api events to be more compatible with multi-loader. Event classes have been renamed.
- `AttributeEvents`
- `AttributeModifiedEvents`
2.0.4+1.21.1
- Data Attributes is now on 1.21.1 for fabric & neoforge!
- Add button for Entity Types (will downstream this to 1.20.1 momentarily).
## Changes 🌽
- Resolved source identifier on jars.
- `EventSources` are used in replacement of fabric api events to be more compatible with multi-loader. Event classes have been renamed.
- `AttributeEvents`
- `AttributeModifiedEvents`
2.0.4+1.21.1-beta.1
- DataAttributes is now on 1.21.1 for fabric & neoforge!
- Add button for Entity Types (will downstream this to 1.20.1 momentarily).
- I cannot guarantee its stability (specifically in the areas of attribute modification). If there are no issues, I'll stabilize it later.
## Changes 🌽
- `EventSources` are used in replacement of fabric api events to be more compatible with multi-loader. Event classes have been renamed.
- `AttributeEvents`
- `AttributeModifiedEvents`
This update affected a sector of mixins which I have redone, but I will keep it in beta until its stability is ensured along with PlayerEX.
2.0.4+1.21.1-beta.1
- DataAttributes is now on 1.21.1 for fabric & neoforge!
- Add button for Entity Types (will downstream this to 1.20.1 momentarily).
- I cannot guarantee its stability (specifically in the areas of attribute modification). If there are no issues, I'll stabilize it later.
## Changes 🌽
- `EventSources` are used in replacement of fabric api events to be more compatible with multi-loader. Event classes have been renamed.
- `AttributeEvents`
- `AttributeModifiedEvents`
This update affected a sector of mixins which I have redone, but I will keep it in beta until its stability is ensured along with PlayerEX.
2.0.3+1.20.1-fabric
- Remove null text in UI in favor of empty string to fix compatibility with other mods
2.0.3+1.20.1-beta.1-fabric
- Added saved state for collapsed entries (session based, saved until game relaunch)
## Changes 🍐
- Applied a different method to updating UI components.
- Most entries sync, but there is still some work to do, so it will stay as beta until the rest of the issues are figured out.
2.0.2+1.20.1-fabric
- Fixed attribute functions not being able to be edited (and that were default).
2.0.1+1.20.1-fabric
- Resolved an exception that happened with the `DefaultAttributeRegistry`.
## Fixes 🍋
- Resolved percentage formatting, should be more accurate now
2.0.0+1.20.1-fabric
**There are breaking changes in this release. Ensure you back up your config(s) if possible. Mods relying on the beta version will have to be updated.**
*Welcome to the release of the new Data Attributes. This has taken a considerable amount of time to complete.*
*I am glad to have this opportunity to work on this project and be supported with the first ever public project I will personally release.*
## Additions 🍎
- No more needing to leave the UI to your config json~ you can do everything you need to do in the UI!
- Allowed easier control of the config menu, and added some new features.
- A `Reset` option to reset your targeted attribute, refreshing all its entries to start anew.
- A `Remove` option to remove the targeted entry of your choice.
- A `Edit` option to edit the identifier to target a different entry.
- A `Add` option to include new entries.
- You can also add into default entries.
- Added autocomplete that will appear while editing fields. This will show you currently registered entities and attributes when editing the respective id you want.
- Press [ENTER] to quickly grab the first entry on the autocomplete.
- Attribute components in configuration now will re-render in certain scenarios, allowing for a better experience with working with multiple attributes.
- Improved logic with entering fields, commit changes by pressing [Done], and [Reload] to refresh to the latest config.
- You can now actually use the search bar to look up the specific entries you wish to find.
- Translations should be compatible in the language you choose as well as the attribute id.
- e.g., looking up `playerex:luck`, or `Luck` should work.
- You can now enable/disable Attribute Functions.
## Changes 🌽
- **[BREAKING]** Changed mockup of config JSON.
- Config keys such as `"functions"/"overrides"/"entity_types": { ... }` have been replaced with `"entries": { ... }`.
- This retains parity with the data-pack format.
- **[BREAKING]** Changed `Map<Identifier, Double>` to `Map<Identifier, EntityTypeEntry>` for `EntityTypeData`.
- This also includes a `fallback` value that gets the default registered base value for the specific attribute under that entity.
- **[BREAKING]** Changed overall structure of config related class definitions. This will affect your config file considerably.
- **[BREAKING]** Removed `DefaultAttributeFactory`.
- **[BREAKING]** Changed `Map<Identifier, List<AttributeFunction>>` to `Map<Identifier, Map<Identifier, AttributeFunction>>`
- This existed to avoid an odd situation that does not exist anymore.
- Made some changes to certain logic internally and micro-optimizations.
- Fixed CTD issues with editing function values.
- Separated config entries from defaults using color coding & tooltips.
- **[BREAKING]** Integrated diminishing returns as intended.
- You must keep and/or target attribute min/max ranges between -1 & 1.
- It is how it usually worked in the original DataAttributes, as unfortunately, a solution to implement diminishing returns on all attributes was not possible (at this time).
2.0.0+1.20.1-beta.13-fabric
- Adjusted formatting of `Whole` formats to not go past two decimals.
2.0.0+1.20.1-beta.12-fabric
- Added a condensed way to format attribute values into the API through `getFormattedValue`.
2.0.0+1.20.1-beta.11-fabric
- Resolved an issue with entity-types/functions not applying properly if a mod/data-pack got to the entity-type id first.
2.0.0+1.20.1-beta.10-fabric
- Implemented a feature that reads data-packs and applies attribute modifications to the world based on order.
- More documentation on this feature will come as the mod stabilizes.
- For now, if you want to be aware of how to format your data-pack(s), look towards the source code of the next builds of PlayerEX/WizardEX.
## Changes 🌽
- Changed how configs and modded entries are applied.
- Your config will appear sparse on startup, but when you go to a world (in an integrated server), it will show the extra modifications provided by loaded packs and mods.
- You can overwrite these, and they will appear in your actual config. Your config will **overwrite** any data-pack or modded pack.
- The UI will be overhauled to better assist in knowing what is supplied by datapacks/mods, but that will be in the later future.
- Deprecated the `DefaultAttributeRegistry` to keep previous versions functional, but it will be removed before release.
- Being able to override specific mods and being able to customize your data-packs will come in the future. For now, if you want to override something, use your config as it is the main source of truth.
2.0.0+1.20.1-beta.9-fabric
- We use Interface Injection for all API interfaces now. Rejoice.
## Changes 🌽
- Dropped `WrapMethod` in favor of an `Inject` that just will perform nearly the same way. Connector folks rejoice. You can play PlayerEX with this latest build now (somehow).
- Edited some other mixins.
- 1.21 will take some time to catch up, for I wish to go over DataAttributes again (primarily the `DefaultAttributeFactory`, I have big plans for it!)
2.0.0+1.21-alpha.1-fabric
- Certain translation keys are not functional in this update.
- The mod is relatively stable, but due to the lack of a certain feature with items, it will be in the alpha channel for now.
- Take caution if you plan on using the mod (as usual with alpha builds).
## Changes 🌽
- Updated dependencies to `1.21` equivalent versions.
- Changed internal networking to abide by version.
- `ItemFields` have changed to fit `1.21` definitions.
- 💖 The API now takes in `RegistryEntry` along with the targeted attribute.
- This also goes for **all events**.
- `IEntityAttribute` has also been extended to get its `RegistryEntry`.
2.0.0-beta.8+1.20.1-fabric
- Now using `WrapMethod` on computation of modifier(s) to avoid unneeded recalculation.
2.0.0-beta.7+1.20.1-fabric
Implemented diminishing formula.
2.0.0-beta.6+1.20.1-fabric
### API
- Added `getManager` which decides the proper AttributeConfigManager via a world instance.
- Added `clientManager` & `serverManager` respectively, which are self-explanatory.
## Changes ⚙️
- Cleaned up codebase, adjusting certain logic.
- Updated Endec to match with wispforest's uploaded versions, and resolved issues with reading/writing Endec's that could cause a fatal exception.
- Updated `EntityAttributeSupplier` (again).
## Removals
- Removed `ConfigDefaults`.
- Removed the ability to access config through functions in the API.
- Removed an attribute modified event that changed health. This should be optionally handled in a workspace that implements the API instead.
2.0.0-beta.5+1.20.1-fabric
### API
- Added `getManager` which decides the proper AttributeConfigManager via a world instance.
- Added `clientManager` & `serverManager` respectively, which are self-explanatory.
## Changes ⚙️
- Cleaned up codebase, adjusting certain logic.
- Updated Endec to match with wispforest's uploaded versions, and resolved issues with reading/writing Endec's that could cause a fatal exception.
- Updated `EntityAttributeSupplier` (again).
## Removals
- Removed `ConfigDefaults`.
- Removed the ability to access config through functions in the API.
- Removed an attribute modified event that changed health. This should be optionally handled in a workspace that implements the API instead.
2.0.0-beta.4+1.20.1-fabric
- Added in the API a way to fetch functions, entity-types, and overrides from an `EntityAttribute`.
## Changes ⚙️
- Resolved synchronization issues with the config manager, which caused issues when running DataAttributes on a server instance and connecting from a client.
2.0.0-beta.3+1.20.1-fabric
- Addressed issue with the `DefaultAttributeFactory` continuing to attach extra config entries, causing unneeded duplications.
2.0.0-beta.2+1.20.1-fabric
- Addressed issue with attribute initialization on `LivingEntity` instances.
2.0.0-beta.1+1.20.1-fabric
- Adjusting the mod to a beta release cycle, updates will be less frequent.
- It is getting to the point where it is functional enough to use without corruption.
- Fixed possible `NaN` calculation when smoothness was `0`. This is resolved by clamping the smoothness during calculation.
- The only thing that may be incorrect is the diminishing scale, which will be addressed. Otherwise, documentation and cleanup will begin, and this mod will release with **PlayerEX** come time.
2.0.0-alpha.10+1.20.1-fabric
- Applied small fix to `DefaultAttributeFactory`.
2.0.0-alpha.9+1.20.1-fabric
- Applied small fix to `DefaultAttributeFactory`.
2.0.0-alpha.8+1.20.1-fabric
- Added the `DefaultAttributeFactory`, which can be used in mods to add extra defaults to the config.
- Currently, it is limited to hard-code,
- Added `EntityAttributeSupplier` to the mod again.
- Its purpose is just to be a wrapper on lazily evaluated `EntityAttribute` values.
2.0.0-alpha.7+1.20.1-fabric
- Diminishing setting should be implemented. It works somewhat differently compared to the wiki, so it will require documentation which will be supplimented in the future.
- To use Diminishing behavior, click on the **Flat** button to toggle between Diminishing behavior for an attribute.
- Adjust the smoothness (previously increment value) to your liking.
2.0.0-alpha.6+1.20.1-fabric
- Modified api to be properly accessible on Java.
2.0.0-alpha.5+1.20.1-fabric
- Resolved issues with the implementation of the mod in terms of utilizing it in mods.
2.0.0-alpha.4+1.20.1-fabric
- Added more code docs
- Updated dependencies
2.0.0-alpha.3+1.20.1-fabric
- First instance of an API created.
- Dropped `EntityAttributeSupplier`, and instead offering support in the API for suppliers & attributes.
- Upon launch, any provided config is now applied by default.
- All the provided entries of the config will be applied upon launch of the world.
- You can disable this behavior through the config.
- Some cleanup of the internals was done.
- A default template is now provided (with default/disabled config) to present each section purpose better.
2.0.0-alpha.2+1.20.1-fabric
## Alpha Notes
**SMOOTHNESS DOES NOT WORK YET!**
**If you want to add in a new entry in general, you will need to manually edit the config.**
**Diminishing factor may be inaccurate.**
**Multiplication & Addition of attribute functions are guaranteed to work.**
*alpha, so we aren't formalizing this entirely yet. once beta releases this changelog will be organized better.*
## Additions 💫
- Added `owo-lib`, which includes the following with included purpose:
- A UI screen that is accessible with the `/owo-config data_attributes` command (it looks pretty nice).
- A config that syncs its data upon being saved, and then reloaded through the `/reload` command.
- Implemented new ways to apply your attribute changes to your world.
- There is safety when setting up your configs. If you make a mistake, or if you put in an entry of an attribute that does not exist, you are able to visually see what the issue(s) are. Currently, these are:
- Non-existing entities/attributes
- Invalid number values (todo).
- The addition of **smoothness** value (todo)
- The addition of **Fallback Minimum/Maximum** values, which are **extracted** from the attribute of choice and automatically loaded into your config and UI once you add an entry and reload/open the config.
- *This will give you better insight on what values you should set for the specific attribute, or if you wish to go out of bounds from it.*
- Button to disable each override.
- When an override is **disabled**, everything about the override falls back to vanilla/other-modded behavior upon reload.
- Tooltip(s) for discovered attributes.
- When an attribute is discovered and sub-sequentially hovered (hah! that rhymes), a tooltip will appear showing the currently set **minimum & maximum** values for the attribute, to assist in setting up functions or entity-type values.
## Removals 🚫
- Erasure of the existence of a mock attribute that gets created if there is none statically registered.
- This means that any attribute that you override **MUST** already be in the attribute registry (this may be subject to change in the future, with a much safer solution).
- Entire removal of the data-pack system in favor of a set of configuration files. If you are looking for your changes to replicate to the world and others, use the `/reload` command after you save your config.
- Removal of odd behavior of decreasing entity health based on the previous value if maximum health was changed. Instead, it is **clamped** to the maximum health.
- If you wish for this behavior again, you can still implement it using the `EntityAttributeModifiedEvents#MODIFIED` event.
## Changes
- Implemented `fabric-language-kotlin`, a required dependency, as DataAttributes is now built with Kotlin.
- Changed networking behavior
- Changed entire mixin internals and mod compatibility
- `SimpleRegistryMixin` is no more! We have broken our chains from fundamentally re-registering the `ATTRIBUTE` registry (there is no need to as we do not create our own attributes dynamically anymore).
- Changed a huge amount of internals with the mod itself, allowing it to be more compatible with other mods.
- Falls back to vanilla behavior on most, if not all mixins depending on circumstances, such as an override being disabled, or modifiers depending on the case.
2.0.0-alpha.1+1.20.1-fabric
## Alpha Notes
**SMOOTHNESS DOES NOT WORK YET!**
**If you want to add in a new entry in general, you will need to manually edit the config.**
**Diminishing factor may be inaccurate.**
**Multiplication & Addition of attribute functions are guaranteed to work.**
*alpha, so we aren't formalizing this entirely yet. once beta releases this changelog will be organized better.*
## Additions 💫
- Added `owo-lib`, which includes the following with included purpose:
- A UI screen that is accessible with the `/owo-config data_attributes` command (it looks pretty nice).
- A config that syncs its data upon being saved, and then reloaded through the `/reload` command.
- Implemented new ways to apply your attribute changes to your world.
- There is safety when setting up your configs. If you make a mistake, or if you put in an entry of an attribute that does not exist, you are able to visually see what the issue(s) are. Currently, these are:
- Non-existing entities/attributes
- Invalid number values (todo).
- The addition of **smoothness** value (todo)
- The addition of **Fallback Minimum/Maximum** values, which are **extracted** from the attribute of choice and automatically loaded into your config and UI once you add an entry and reload/open the config.
- *This will give you better insight on what values you should set for the specific attribute, or if you wish to go out of bounds from it.*
- Button to disable each override.
- When an override is **disabled**, everything about the override falls back to vanilla/other-modded behavior upon reload.
- Tooltip(s) for discovered attributes.
- When an attribute is discovered and sub-sequentially hovered (hah! that rhymes), a tooltip will appear showing the currently set **minimum & maximum** values for the attribute, to assist in setting up functions or entity-type values.
## Removals 🚫
- Erasure of the existence of a mock attribute that gets created if there is none statically registered.
- This means that any attribute that you override **MUST** already be in the attribute registry (this may be subject to change in the future, with a much safer solution).
- Entire removal of the data-pack system in favor of a set of configuration files. If you are looking for your changes to replicate to the world and others, use the `/reload` command after you save your config.
- Removal of odd behavior of decreasing entity health based on the previous value if maximum health was changed. Instead, it is **clamped** to the maximum health.
- If you wish for this behavior again, you can still implement it using the `EntityAttributeModifiedEvents#MODIFIED` event.
## Changes
- Implemented `fabric-language-kotlin`, a required dependency, as DataAttributes is now built with Kotlin.
- Changed networking behavior
- Changed entire mixin internals and mod compatibility
- `SimpleRegistryMixin` is no more! We have broken our chains from fundamentally re-registering the `ATTRIBUTE` registry (there is no need to as we do not create our own attributes dynamically anymore).
- Changed a huge amount of internals with the mod itself, allowing it to be more compatible with other mods.
- Falls back to vanilla behavior on most, if not all mixins depending on circumstances, such as an override being disabled, or modifiers depending on the case.
1.6.0+1.20.1
收录