diff options
| author | shedaniel <daniel@shedaniel.me> | 2024-09-17 21:52:18 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2024-09-17 21:52:18 +0800 |
| commit | 581543cb56b8a85d32d7237e0d37fb5ad24da9b5 (patch) | |
| tree | f3b8a2c81bef17fe6cb4672bbb1b77607e657b50 /api/src/main/java/me/shedaniel/rei/impl/Internals.java | |
| parent | 048eccb27ce9907b1028b7acc4f0f98321864750 (diff) | |
| parent | ed0f9e051623b0a37b438a3df11c3e50a7d85ab5 (diff) | |
| download | RoughlyEnoughItems-581543cb56b8a85d32d7237e0d37fb5ad24da9b5.tar.gz RoughlyEnoughItems-581543cb56b8a85d32d7237e0d37fb5ad24da9b5.tar.bz2 RoughlyEnoughItems-581543cb56b8a85d32d7237e0d37fb5ad24da9b5.zip | |
Merge remote-tracking branch 'origin/14.x-1.20.4' into 15.x-1.20.5
# Conflicts:
# api/src/main/java/me/shedaniel/rei/api/common/display/basic/BasicDisplay.java
# api/src/main/java/me/shedaniel/rei/impl/Internals.java
# default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultSmithingDisplay.java
# fabric/src/main/resources/roughlyenoughitems.accessWidener
# runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java
# runtime/src/main/java/me/shedaniel/rei/impl/client/gui/performance/PerformanceScreen.java
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 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(); |
