Un-intrusive holders II

This commit is contained in:
IThundxr 2025-02-21 22:16:23 -05:00
parent 33b38bf6d7
commit 37c075c117
Failed to generate hash of commit

View file

@ -51,7 +51,7 @@ public class CreateBuiltInRegistries {
private static <T> Registry<T> withCallback(ResourceKey<Registry<T>> key, Consumer<T> callback) { private static <T> Registry<T> withCallback(ResourceKey<Registry<T>> key, Consumer<T> callback) {
Registry<T> registry = new RegistryBuilder<>(key) Registry<T> registry = new RegistryBuilder<>(key)
.onAdd((r, i, k, v) -> callback.accept(v)) .onBake(r -> r.forEach(callback))
.sync(true) .sync(true)
.create(); .create();
return register(registry); return register(registry);