aboutsummaryrefslogtreecommitdiff
path: root/api/src/main/java/me/shedaniel/rei/impl/Internals.java
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/main/java/me/shedaniel/rei/impl/Internals.java')
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/Internals.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/impl/Internals.java b/api/src/main/java/me/shedaniel/rei/impl/Internals.java
index 9666c4b5f..d083a3183 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/Internals.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/Internals.java
@@ -35,6 +35,7 @@ import me.shedaniel.rei.api.common.plugins.REIPlugin;
import me.shedaniel.rei.api.common.plugins.REIServerPlugin;
import me.shedaniel.rei.api.common.transfer.info.MenuInfoRegistry;
import me.shedaniel.rei.impl.common.InternalLogger;
+import net.minecraft.core.RegistryAccess;
import net.minecraft.core.component.DataComponentMap;
import net.minecraft.core.component.DataComponentType;
import net.minecraft.resources.ResourceLocation;
@@ -56,6 +57,7 @@ public final class Internals {
private static Function<String, CategoryIdentifier<?>> categoryIdentifier = (object) -> throwNotSetup();
private static Supplier<MenuInfoRegistry> stubMenuInfoRegistry = Internals::throwNotSetup;
private static Supplier<InternalLogger> logger = Internals::throwNotSetup;
+ private static Supplier<RegistryAccess> registryAccess = Internals::throwNotSetup;
private static <T> T throwNotSetup() {
throw new AssertionError("REI Internals have not been initialized!");
@@ -118,6 +120,10 @@ public final class Internals {
return logger.get();
}
+ public static RegistryAccess getRegistryAccess() {
+ return registryAccess.get();
+ }
+
public interface EntryStackProvider {
EntryStack<Unit> empty();