Fixes
- Fixed an incompatibility between
cardinal-components-block
and Immersive Portals, which would cause desynchronization issues for block entities seen through a portal (thanks daimond113 !)
Fixes
- Fixed issue in the
cardinal-components-chunk
module causing save failures when no mod actually used said module-
Unfortunately, any chunk in which the damage happened will be reset. If you have a backup of your world, you should try loading that. Otherwise, I guess this is a reminder that regular backups are critical, especially when adding new mods or updating across Minecraft versions. In any case, my apologies for the damage and the delay in fixing the bug.
~ PyrofabPS: if you never got spammed by red popups saying "failed to save chunk", you are most likely unaffected by the issue.
-
Updated to 1.21.3
Fixes
- Fixed clientside chunk Load/Unload triggering respectively
onServerLoad
andonServerUnload
instead ofonClientLoad
/onClientUnload
Fixes
- Fixed
C2SSelfMessagingComponent#sendC2SMessage
mistakenly adding the component ID to the custom data buffer- Check out the new documentation for this API here: https://ladysnake.org/wiki/cardinal-components-api/modules/entity#client-to-server-networking
- Removed dependency on
com.demonwav.mcdev:annotations
- this should remove some errors in dev environments
Updated to 1.21
Updated to 1.20.5/1.20.6
This update introduces multiple breaking changes - a migration guide is available on the Ladysnake website.
Additions
- Added
C2SSelfMessagingComponent
, a new experimental utility interface to simplify client-to-server messaging on player components - Added
WorldComponentRegistry#registerFor
methods, allowing for dimension-specific world components - Scoreboard and team components now support client ticking
Changes
- Migrated all packages from
dev.onyxstudios
toorg.ladysnake
- Updated documentation and licenses to reflect package change
RespawnCopyStrategy
now also applies on mob conversion- The
cardinal-components-level
module is now deprecated, as it is redundant with thecardinal-components-scoreboard
module- Mods are encouraged to move to scoreboard components, which serve the same purpose of global data storage and have an API more consistent with other modules
- Component registration now happens during mod init. This should fix some classloading-related issues, and make loading errors easier to diagnose.
- The internal ASM generation systems have been partially rewritten (thanks lukebemish !)
- All the serialization methods now take an additional registry lookup argument
- Warning: due to the above change, level components may not be deserialized correctly if a mod calls
LevelProperties.readProperties
instead ofLevelStorage.parseSaveProperties
Fixes
- Missing components (usually caused by removed mods) will no longer trigger a wall of warnings
- The number of warnings logged for each missing component type is configurable
Removals
- Removed item components. The
cardinal-components-item
module now contains anItemComponentMigrationRegistry
, which is used to help you migrate to vanilla components. - Removed
PlayerCopyCallback
- if you were using it, you can switch toServerPlayerEvents.COPY_FROM
from Fabric API - The deprecated
util
package incardinal-components-block
has been removed
Updated to 1.20.3
Updated to 1.20.2
Additions
- Added load- and unload-aware components as an experimental feature
- This can be used to implement advanced initialization and cleanup 🧽
Changes
- Deprecated the
utils
package incardinal-components-block
as it is now virtually unusable
Fixed chunk components being lost during deserialization (thanks to Stuff-Stuffs !)
Fixed compatibility with full 1.20 release
Updated to MC 1.20 (Thanks to IMS !)
Updated to MC 1.19.3
- Fix world components not synchronizing on load
Fixes
- Fixed components ticking only on subclasses of the block entities they were declared for (e.g. if a ticking component got attached to ChestBlockEntity, it would only tick on TrappedChestBlockEntity)
Updated to MC 1.19
Additions
- Component providers now expose the
ComponentAccess
interface through Loom's interface injectionComponentAccess
addsgetComponent
as an alternative toComponentKey#get
, andsyncComponent
as an alternative toComponentKey#sync
- It is now recommended to use e.g.
entity.getComponent(KEY)
instead ofKEY.get(entity)
, as this enforces type checking
Additions
- Players can now set the
log-deserialization-warnings
option to toggle warnings when a component fails to be resolved (typically due to mods being removed)
Mod Compatibility
- Fixed incompatibility with Immersive Portals
Updated to 1.18.2
Additions
- Added mod icons
Fixes
- Fixed chunk components serialization
Fixes
- Fixed crash when trying to access WorldProperties components
Fixes Fixed modded ComponentProvider subclasses (as in, custom entities) on newer loom versions
Now available on modrinth!
Changes
- Changed the maven group from
io.github.onyxstudios.Cardinal-Components-API
todev.onyxstudios.cardinal-components-api
Fixes
- Fixed curseforge upload
Fixes
- Fixed cardinal-components-chunk crashing at launch
- Fixed components not being saved when bucketing entities
Updated to 1.18
Removed
- Removed serializable item components
- Item components must now save all their data in the stack NBT
- Consider switching to API Lookup API where possible
- Removed the
cardinal-components-util
module- According to Github no one ever used it, but if you did, and you see no currently available alternative, please open an issue
Fixes
- Fixed explicit component ordering being ignored during registration
Changes
- Deprecated the
cardinal-components-util
module for future removal
Additions
- Added an experimental way to order entity and BE components through
Registration#after(ComponentKey)
- This allows mods to ensure components are deserialized/synchronized/ticked in the right order if needed
- Components that are not ordered through this mechanism will keep their registration ordering
Fixes
- Fixed scoreboard (and team) components not always being saved
The breaking changes are here !
Additions
- Ticking components now work on any
BlockEntity
, not just those that already tick in vanilla
Changes
- Most experimental classes and methods have been promoted to stable
- Every class remaining in the
nerdhub.component.*
packages has been moved to adev.onyxstudios.cca.*
package - Replaced specific factory interfaces with a generic variant (e.g.
ComponentFactory
) - Added
RespawnCopyStrategy#get(ComponentKey)
to retrieve the strategy for a given component RespawnCopyStrategy
now considers whether the player is switching to another character- this can be used by mods which allow switching to another body or taking over the body of another player (e.g. Requiem)
- Mods that previously used
RespawnCopyStrategy.ALWAYS
may be interested in usingRespawnCopyStrategy.CHARACTER
instead.
- Initialization errors should now be way less cryptic
- Updated Mod Menu metadata
Removed
- Every class and method deprecated in 2.7.0 has been completely removed
- Every class and method deprecated in 2.8.0 has been completely removed
- Users should migrate their BE-less block components to Fabric API's API Lookup API
Fixes
- Fixed a crash with mods using the deprecated API on Fabric API versions older than 0.34.0
Fixes
- Fixed a crash at launch with Fabric API 0.34.0 and up (1.17 versions are unaffected)
Additions
- Added helper methods in
BlockComponents
to expose block components through Fabric API API-API API
Changes
- Methods and classes in
cardinal-components-block
which purpose was to access components on regular blocks have been scheduled for removal as they are now superseded by API²
Fixes
- Fixed a crash when registering scoreboard components
- Fixed a serialization issue when an item stack got initialized with an empty component container
Fixes
- Fixed a potential issue with
ItemComponent
's tag invalidation
Additions
- Added the missing helper method
ItemComponent#putUuid
Fixes
- Fixed dynamic entity component registration
- Fixed a crash with the scoreboard plugin when a save file has scoreboard teams
Additions
- Added
ItemComponent
, an experimental component implementation that stores all its data in the stack's tag - Added
ScoreboardComponentFactoryV2
, giving access to the server holding the scoreboard (if any) - Added
TeamComponentFactoryV2
, giving access to the scoreboard holding the team and its server (if any)
Changes
- Promoted
ComponentPacketWriter
andPlayerSyncPredicate
to stable API - Further optimized ItemStack components
- A copy of the MIT license is now bundled with every CCA jar
- Mcdev annotations are no longer a transitive dependency
Changes
- Promoted
ComponentKey#sync(provider, writer)
,ComponentKey#sync(provider, writer, predicate)
,ComponentKey#isProvidedBy
, andComponentKey#getNullable
to stable API
Fixes
- Fixed backward compatibility with SyncedComponent
Fixes
- Fixed NBT deserialization not respecting component registration order
Changes
- Optimized ItemStack component initialization
- Promoted
ComponentKey#syncWith
to (experimental) public API - Promoted
ClientTickingComponent
,ServerTickingComponent
andCommonTickingComponent
to stable API
Additions
- Added the universal
cardinal-components
entrypoint key- This new key can be used for any CCA registration initializer (replaces eg.
cardinal-components-entity
)
- This new key can be used for any CCA registration initializer (replaces eg.
Additions
- Added a
TransientComponent
utility interface, for components that do not store any data - Added a registration overload to
ItemComponentFactoryRegistry#registerFor
that takes an item directly
Fixes
- Fixed potential concurrency issues with
ComponentContainer.Factory.Builder
- Updated to 1.16.4
Changes
cardinal-components-item
will now verify that components attached toItemStack
s redefineequals
- This behaviour can be disabled by adding
-Dcca.debug.noverifyequals=true
to your VM options
- This behaviour can be disabled by adding
Fixes
- Fixed cardinal-components-block crashing on dedicated servers
- Fixed components attached to a block entity not stacking with the superclass' components
- Remove the
ScheduledForRemoval
annotation from the legacyComponent
interface- Should fix unstable API warnings in IDEA
- Fixed the new
AutoSyncedComponent
interface for level components
Deprecated most classes from the nerdhub.component.* packages. Those classes will be removed during the MC 1.17 update.
Additions
- Implemented the new synchronization in
cardinal-components-level
- Added
LevelComponents#sync
, replacingComponentKey#sync
for components attached toWorldProperties
- Added
- Implemented the new (serverside) ticking API in
cardinal-components-level
andcardinal-components-scoreboard
- Added a
CommonTickingComponent
interface, implementing both Client and Server variants
Changes
- Item components now use lazily initialization
- The
ComponentContainer
andComponentProvider
interfaces are no longer experimental - Refactored the sync API again, making it more flexible
- Deprecated the old AutoSyncedComponent interface
- Moved ticking interfaces to a separate package
- Deprecated the old ticking component interfaces
Fixes
- Fixed invalid metadata in the fabric.mod.json
- Fixed some hypothetical bugs with dropped items not merging
- Added the Ticking Components experimental feature
- Made cardinal-components-block possibly more compatible with future versions of Immersive Portals
- Documented more methods with annotations
- ComponentContainer iteration order is now the same as the factory registration order
- This means mods have some (limited) control over the order in which components are de-serialized/synchronized
- Removed the experimental tag from more methods
ComponentContainer.Factory#createContainer
now acceptsnull
arguments (but will NPE if a component factory does not expect it)
- Fixed a crash in cardinal-components-chunk when
cardinal-components-world
was not installed
- Added a
syncOp
parameter toAutoSyncedComponent
methods, making the interface more flexible- The new parameter can be ignored, or it can be used to implement multiple types of sync without custom packets
- Basic V3 interfaces are no longer experimental
- This is a good time to start using them!
- Overhauled component synchronization for V3 API
- There is no longer specialized synchronized component interfaces for each type of provider
- This is a breaking change for Team and Block V3 (experimental) APIs
- Added dedicated static registration methods for player components in
cardinal-components-entity
- V3
ComponentContainer
s are no longer generic - Added a dedicated
ComponentContainer
factory interface replacing use ofFunction
, and moved the existing builder to it
This release breaks compatibility between modules of different versions.
- Updated to 1.16.2
Additions
- Added a new API for block components (see PR #42)
- Added a new API for scoreboard components (see PR #36)
- Added reworked
ComponentProvider
andComponentContainer
interfaces to the V3 API- Refactored a lot of internal code to use the new types
- Added
ComponentV3
andComponentRegistryV3
interfaces for early V3 adopters - Added a factory builder to the
ComponentContainer
interface for third-partyComponentProvider
implementations - Added alternatives to
registerFor
methods taking a predicate, for fine-tuned registration
Changes
- The NBT serialized form of
ComponentContainer
is now more space-efficient.- Instances serialized before this update should get converted as they load.
- Removed experimental deprecated method
EntityComponentFactoryRegistry#register
(useregisterFor
)
Fixes
- Fixed item components not being copied by the smithing table
- Removed the
Internal
annotation from new API packages
- Fixed regression in
cardinal-components-item
causing crash with Optifine installed - Marked the
cardinal-components-level
module as incompatible with 1.16.2 and above
- Fixed crash when more than 16 components were registered
- Fixed crash when dots were used in static component identifiers
Backwards-compatibility note: while this release is compatible with older applications,
some classes have been moved to a new module called cardinal-components-util
.
If you are missing some types, or if you use the cardinal-components-block
module,
you need to add a dependency on that module.
Compatibility between modules of different versions has been broken in 2.4.0-nightly.1.16-pre4. In case of crashes due to those incompatibilities, Modpack makers and players can add the latest version of the full library to their mods folder to update every module at once.
- Updated all modules to MC 1.16
Additions
- Cardinal Components now has a wiki!
- Added statically declared components (experimental feature !)
- Added a new module -
cardinal-components-util
- Most classes that were not essential to CCA working got moved from
cardinal-components-base
to that module - Added
LazyComponentType
, allowing mods to retrieve aComponentType
handle before it is registered
- Most classes that were not essential to CCA working got moved from
- Added
ItemComponentCallbackV2
andItemComponentFactoryV2
as alternatives respectively toItemComponentCallback
andItemComponentFactory
, passing the stack's true item as context. - Added
Dynamic
conversion methods toNbtSerializable
(defaulted to delegate to nbt serialization) - Added
PlayerComponent
, an experimental interface replacingRespawnCopyStrategy
Changes
- TypeAwareComponent now has a default implementation in most subinterfaces
- It is no longer possible for a
ComponentCallback
to override an existing component - Networking errors should now be logged before they get swallowed by Netty
cardinal-component-item
no longer changes the vanilla networking protocol forItemStack
s- Internal classes and new interfaces are now in the
dev.onyxstudios.cca
package - Chunk and level components now get initialized at the end of their respective classes' constructor
- Internals and new APIs are now in the
dev.onyxstudios.cca
package instead ofnerdhub.cardinal.components
Fixes
- Fixed
PlayerSyncCallback
not firing when a player is teleported to another dimensions through commands - Fixed Cardinal-Components-Item preventing vanilla clients from connecting to modded servers and vice-versa
- Fixed Cardinal-Components-Item crashing with Optifine (thanks to ZekerZhayard)
- Fixed a random crash when an entity spawned for the first time simultaneously on client and server (#26)
- Fixed thrown items with different components being able to merge
Ok but this time it's true, item components are really fixed for real
- Item components are now properly copied in every vanilla situation where an item stack is copied
- Component deserialization is slightly faster
- Fixed item component initialization for real this time
- Fixed component initialization in empty item stacks (eg. during inventory insertion)
- Fixed crash with item components when picking up items
- Marked cardinal-components-world as incompatible with 1.16
This update may be incompatible with mods using previous versions of cardinal-components-item
or cardinal-components-chunk
- You can now make component types without an interface. Do not abuse this if you want to make mod compatibility easier.
- Replaced component cloning with a data copying mechanism between existing component instances (see PR #15).
- Deprecated
CloneableComponent
andNativeCloneableComponent
in favour ofCopyableComponent
- Deprecated
- Fixed concurrency issues with component synchronization.
- Updated to 1.15
- Added
ComponentRegisteredCallback
to let mods react to component registration - Fixed crash when using ComponentType#attach with recent versions of Fabric API
- Added
ComponentType#attach
, a convenience method to subscribe to component initialization events - Deprecated
SyncedComponent#markDirty
in favor ofSyncedComponent#sync
, improving semantics
- Fixed NPE crash when a player's component is synced too early
- Fixed entity components not getting synced with the holder by default
- Fixed generics issues in RespawnCopyStrategy
Added facilities to handle player respawning
Fixes:
- Fixed networking initialization causing server crashes
- Fixed item component synchronization failing
- Fixed regression in entity component synchronization
- Rewrote the API
- Split the functionality into modules
- add utility methods for getting block/item components
- refactor component interfaces
- fix itemstack component client desync
- fix itemstack deserialization
- mixin update
- updated component system -> merged item and block components
- added Identifier to component registry
- Initial Release