aboutsummaryrefslogtreecommitdiff
path: root/api/src/main/java/me/shedaniel/rei/impl
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2024-09-17 21:38:27 +0800
committershedaniel <daniel@shedaniel.me>2024-09-17 21:41:20 +0800
commit93c67936af006bbaad287a9e902a8b67a0d7fc7d (patch)
tree8b8ed668795871e92b58317a81403ad1d3b5cad3 /api/src/main/java/me/shedaniel/rei/impl
parent3febdc4e1d6927f19d0de6fc8430765336d34d7e (diff)
parent9856139ad309ab833defb92ccfedaf48b9bde64e (diff)
downloadRoughlyEnoughItems-93c67936af006bbaad287a9e902a8b67a0d7fc7d.tar.gz
RoughlyEnoughItems-93c67936af006bbaad287a9e902a8b67a0d7fc7d.tar.bz2
RoughlyEnoughItems-93c67936af006bbaad287a9e902a8b67a0d7fc7d.zip
Merge remote-tracking branch 'origin/12.x-1.20' into 13.x-1.20.2
Diffstat (limited to 'api/src/main/java/me/shedaniel/rei/impl')
-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 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();