diff options
| author | shedaniel <daniel@shedaniel.me> | 2024-09-17 21:36:09 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2024-09-17 21:36:09 +0800 |
| commit | 644c3f591d42d91c8445b199202b37ba05b0bf93 (patch) | |
| tree | eccdfe403432ec6e9036349f232edd69f0d0a7f8 /api/src/main/java/me/shedaniel/rei/impl | |
| parent | b666943c4f14cfc6a8f1db7d3ac7fa2c7c0519da (diff) | |
| download | RoughlyEnoughItems-644c3f591d42d91c8445b199202b37ba05b0bf93.tar.gz RoughlyEnoughItems-644c3f591d42d91c8445b199202b37ba05b0bf93.tar.bz2 RoughlyEnoughItems-644c3f591d42d91c8445b199202b37ba05b0bf93.zip | |
Use InstanceHelper to get registryAccess11.x-1.19.4
Diffstat (limited to 'api/src/main/java/me/shedaniel/rei/impl')
| -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(); |
