PR: https://github.com/PaperMC/Paper/pull/8920
Gist: https://gist.github.com/Machine-Maker/2901c790219862ef1ad6070b8872a889
This API is for changing tricky-to-modify parts of objects in registries like explosion resistance for blocks, armor toughness for different item types, default loot tables for blocks, game event radii, etc. These properties, traditionally, are immutable and annoying to change without doing some hacky reflection to change final fields or replace registry entries. This API provides a way for bootstraps to change or even add registry entries before they are even in the registry eliminating all hacky registry unfreezes or final field modification. Read a full write up on it here and then look at an example of it being used below.
Example
This modifies a GameEvent to have a larger radius, and adds a new GameEvent.
static final TypedKey<GameEvent> NEW_EVENT = GameEventKeys.create(Key.key("machine_maker", "best_event"));
@Override
public void bootstrap(@NotNull BootstrapContext context) {
final LifecycleEventManager<BootstrapContext> lifecycles = context.getLifecycleManager();
// registers a new handler for the prefreeze event for the game event registry
lifecycles.registerEventHandler(RegistryEvents.GAME_EVENT.preFreeze().newHandler(event -> {
// the RegistryView provided here is writable so you can register new objects
event.registry().register(NEW_EVENT, builder -> {
builder.range(2);
});
}));
// registers a handler for the addition event
lifecycles.registerEventHandler(RegistryEvents.GAME_EVENT.newAdditionHandler(event -> {
// checks if the object being registered is the block open game event
if (event.key().equals(GameEventKeys.BLOCK_OPEN)) {
event.builder().range(event.builder().range() * 2);
}
}));
}


idk but yeah as you said, it still kinda needs the synchronized registry part, until then it's just modification after creation on any individual item
