Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry API (Sync) V2 #186

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

thecatcore
Copy link
Member

@thecatcore thecatcore commented Feb 27, 2025

New registry api, more extensible.
Individual registries for content are moved to their own module.
Saves and apis backward compatible with registry-sync-v1.

Modules

  • Item
    • Register vanilla Item registry into Registry sync v2 system.
    • Set item translation key from identifier when registering it.
    • [NEW] Fix item models not being associated with the right item after registry was remapped.
    • [NEW] For 1.7.10, provide a transitive access widener for the method getFromId, allowing devs to set texture location more easily.
  • Block
    • Register vanilla Block registry into Registry sync v2 system.
    • Set block translation key from identifier when registering it.
    • For 1.8+, link BlockItem to its Block.
    • For 1.8+, register blockstates when block is registered.
    • For 1.8+, remap blockstates ids after blocks are remapped.
    • [NEW] Set whether a modded block should use neighbouring block's light or not
    • [NEW] For 1.7.10, fix Block to Item and Item to Block conversion, previously preventing picking up modded in creative mode. This should also fix recipes not working correctly and other related issues.
  • Block Entity
    • Register vanilla Block Entity registry into Registry sync v2 system.
    • Ensure compatibility with saves created using previous versions of LFAPI.
  • StatusEffect and Potion
    • StatusEffect
      • Register vanilla Status Effect registry into Registry sync v2 system.
      • Set status effect translation key from identifier when registering it.
      • [NEW] Make some useful method on StatusEffect class public.
    • [NEW] Potion
      • [NEW] For 1.9+, register vanilla Potion registry into Registry sync v2 system.
      • [NEW] For 1.9+, add helper functions to register Potion types and recipes.
      • [NEW] For pre-1.9, add helper functions to register Potion levels and amplifying factors.
      • [NEW] For pre-1.9, ensure potion item's effects id are remapped at the same time status effects are.
      • [NEW] For pre-1.9, ensure potion levels, amplifying factors and colors are remapped at the same time status effects are.
  • Entity
  • Enchantment
  • Biome

* Initial work on registry-sync-v2

* More progress on registry api v2
- differentiate "synced" Index-Key-Value registries from simple Key-Value registries
- start preparing registry remapping

* Start working on new registry remapper

* Rename some classes

* Port remapping system to v2 and port to every supported version

* Ensure backward compatibility with registry-sync-api-v1

* Fix a few possible crashes when using registries

* Add more useful methods to RegistryHelper

* Make vanilla registries first assignable id 1 instead of 0

* Some improvements and bug fixes.

* Create a default implementation of IdsHolder and SyncedRegistrableRegistry.

* Start working on wrapper for non-standard registry forms

* Clean up and fix style

* Fix missing events in MapRegistryWrapper

* Avoid using sysout

* Allow Synchronized Registry to declare themselves not to be synchronized

* Allow setting the min id possible of a registry

* Fix entry count in IdsHolder

* SyncedArrayMapRegistryWrapper

* Make Map+Array-based registry min id be 1 instead of 0

* SyncedArrayRegistryWrapper

* RegistryWrapper Improvements

* Fix defaulted registries default value not being interpreted as entry missing when it should.

* Fix defaulted registries default value not being interpreted as entry missing when it should. (again)

* Allow registering multiple entries together with a defined offset between their numerical ids.

* Fix missing ids being taken over by new entries when entering an existing world

* Fix style

* Fix style and compiling errors

* Disable complex registering for now

* Clean up registry-sync-v1

* apache commons lang3 isn't available in 1.7.10

* Fix some parameter names

* Add javadoc to deprecated classes and members

* Rename some api classes/interfaces

* Fix style

* Small mixins clean-up

* Document registry-sync-v2 apis + Add missing utility methods
* Block module rebase fixes

* Fix whether to use neighbour light for Modded blocks

* Clean up and fix style

* Update test mods

* Fix compiling errors

* Spotless

* Fix compiling errors

* PR Feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant