Skip to content

Commit

Permalink
Remove DeferredRegister.id
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed May 26, 2024
1 parent dffc162 commit 715869c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ public interface DeferredRegister<T> {
<S extends T> RegistryValue<S> register(ResourceLocation location, Supplier<S> value);

default <S extends T> RegistryValue<S> register(String id, Supplier<S> value) {
return register(id(id), value);
}

static ResourceLocation id(String id) {
return ResourceLocations.bingo(id);
return register(ResourceLocations.bingo(id), value);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.gaming32.bingo.platform.registry;

import io.github.gaming32.bingo.platform.BingoPlatform;
import io.github.gaming32.bingo.util.ResourceLocations;
import net.minecraft.resources.ResourceLocation;

public class RegistryBuilder {
Expand All @@ -13,7 +14,7 @@ public RegistryBuilder(ResourceLocation id) {
}

public RegistryBuilder(String id) {
this(DeferredRegister.id(id));
this(ResourceLocations.bingo(id));
}

public RegistryBuilder synced() {
Expand All @@ -27,7 +28,7 @@ public RegistryBuilder defaultId(ResourceLocation id) {
}

public RegistryBuilder defaultId(String id) {
return defaultId(DeferredRegister.id(id));
return defaultId(ResourceLocations.bingo(id));
}

public <T> DeferredRegister<T> build() {
Expand Down

0 comments on commit 715869c

Please sign in to comment.