aboutsummaryrefslogtreecommitdiff
path: root/api/src/main/java/me/shedaniel/rei/impl/Internals.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2024-09-17 22:15:52 +0800
committershedaniel <daniel@shedaniel.me>2024-09-17 22:15:52 +0800
commit3251f01cacfaf6dcdfd35ee3eaa5e5bee9d372b7 (patch)
tree3b4876ab4de85a4a702300d9bbbb812d94f888e4 /api/src/main/java/me/shedaniel/rei/impl/Internals.java
parentdcac5f4891046507047c5951c164fb1c1f08da74 (diff)
parent15a46dc3a91cf3f8fdb7a1ddf382ce05bfcf742e (diff)
downloadRoughlyEnoughItems-3251f01cacfaf6dcdfd35ee3eaa5e5bee9d372b7.tar.gz
RoughlyEnoughItems-3251f01cacfaf6dcdfd35ee3eaa5e5bee9d372b7.tar.bz2
RoughlyEnoughItems-3251f01cacfaf6dcdfd35ee3eaa5e5bee9d372b7.zip
Merge remote-tracking branch 'origin/15.x-1.20.5' into 16.x-1.21
# Conflicts: # runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.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.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();