Compatibility
Minecraft: Java Edition
1.21.x
1.20.4–1.20.6
1.20.1
Platforms
Supported environments
Creators
Details
Changelog
Scheduled API removal in 0.6.0: ValidatedEntityAttribute. Reimplement usages of this class as needed.
Additions
- New
isDevmethod inPlatformApifor checking if the instance is running in a development environment. - Implemented a barebones
Registrarsystem for platform-agnostic registration of objects. This API is experimental, with scheduled stability by 0.6.0.- Registers objects into
RegistrySupplierinstances, much like the (Neo)Forge deferred registry system.
- Registers objects into
- Added
onRegisteredClientandonRegisteredServerto theEventApifor listening to config registrations and only acting after the config has been successfully registered. - New version of
ValidatedField.validateAndSet,validateAndSetFlaggedthat acceptsEntryFlag.Flag(and inspects the field own flags) and changes set behavior based on flags present.EntryFlag.Flag.QUIET: flagged field won't call listeners on changeEntryFlag.Flag.STRONG: fieldvalidateAndSet/validateAndSetFlaggedwill use strong validation. Weak validation is standard.EntryFlag.Flag.UPDATE: field will update its current sync state when the value is set.
- Added overload to
ValidationResult.reportthat takes a string consumer directly for immediate reporting of issues. - New
Codecshelper class in PortingUtils for handling version-agnostic Packet Codecs. Thanks Mojang.
Changes
ConfigApi.isConfigLoaded(scope)has been deprecated in favor ofConfigApi.isConfigLoaded(scope, type). This new overload can check for client configs; the now-deprecated method only checked synced ones.- Also consider the new register event instead of trying to check for config load yourself.
- Scheduled
ValidatedEntityAttributefor removal in 0.6.0. It is completely unused as far as I can tell with a github-wide search, and quite an unstable concept in general. If needed, a similar validation can be built for your own usage.
Fixes
- Fixed inaccurate docs in
ValidatedEntityAttribute.BuilderandEntityAttributeInstanceHolder
Files
Metadata
Release channel
ReleaseVersion number
0.5.9+1.21.3Loaders
Game versions
1.21.2–1.21.3Downloads
7110Publication date
December 7, 2024 at 1:41 AMPublisher
fzzyhmstrs
Member



