diff options
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.java | 6 |
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 112b030ce..bcbfcc7fb 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.nbt.Tag; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Unit; @@ -55,6 +56,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!"); @@ -117,6 +119,10 @@ public final class Internals { return logger.get(); } + public static RegistryAccess getRegistryAccess() { + return registryAccess.get(); + } + public interface EntryStackProvider { EntryStack<Unit> empty(); |
