mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Un-intrusive holders II
This commit is contained in:
parent
33b38bf6d7
commit
37c075c117
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue