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 /runtime | |
| parent | b666943c4f14cfc6a8f1db7d3ac7fa2c7c0519da (diff) | |
| download | RoughlyEnoughItems-11.x-1.19.4.tar.gz RoughlyEnoughItems-11.x-1.19.4.tar.bz2 RoughlyEnoughItems-11.x-1.19.4.zip | |
Use InstanceHelper to get registryAccess11.x-1.19.4
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java index 3f99fa7cb..8f4738fe9 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java @@ -55,8 +55,10 @@ import me.shedaniel.rei.impl.common.plugins.ReloadManagerImpl; import me.shedaniel.rei.impl.common.registry.RecipeManagerContextImpl; import me.shedaniel.rei.impl.common.transfer.MenuInfoRegistryImpl; import me.shedaniel.rei.impl.common.transfer.SlotAccessorRegistryImpl; +import me.shedaniel.rei.impl.common.util.InstanceHelper; import me.shedaniel.rei.impl.init.PluginDetector; import me.shedaniel.rei.impl.init.PrimitivePlatformAdapter; +import net.minecraft.core.RegistryAccess; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.PackType; import net.minecraft.util.Unit; @@ -69,6 +71,7 @@ import java.util.Comparator; import java.util.ServiceLoader; import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.Supplier; import java.util.function.UnaryOperator; @ApiStatus.Internal @@ -126,6 +129,7 @@ public class RoughlyEnoughItemsCore { Internals.attachInstanceSupplier(LOGGER, "logger"); CategoryIdentifierImpl.attach(); Internals.attachInstance((Function<ResourceLocation, EntryType<?>>) DeferringEntryTypeProviderImpl.INSTANCE, "entryTypeDeferred"); + Internals.attachInstance((Supplier<RegistryAccess>) () -> InstanceHelper.getInstance().registryAccess(), "registryAccess"); Internals.attachInstance(EntryStackProviderImpl.INSTANCE, Internals.EntryStackProvider.class); Internals.attachInstance(NbtHasherProviderImpl.INSTANCE, Internals.NbtHasherProvider.class); Internals.attachInstance(EntryIngredientImpl.INSTANCE, Internals.EntryIngredientProvider.class); |
