diff options
| author | shedaniel <daniel@shedaniel.me> | 2024-09-17 21:38:27 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2024-09-17 21:41:20 +0800 |
| commit | 93c67936af006bbaad287a9e902a8b67a0d7fc7d (patch) | |
| tree | 8b8ed668795871e92b58317a81403ad1d3b5cad3 /runtime/src/main/java | |
| parent | 3febdc4e1d6927f19d0de6fc8430765336d34d7e (diff) | |
| parent | 9856139ad309ab833defb92ccfedaf48b9bde64e (diff) | |
| download | RoughlyEnoughItems-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 'runtime/src/main/java')
3 files changed, 8 insertions, 4 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); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ScreenWithMenu.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ScreenWithMenu.java index c117f70e4..bfd3379e9 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ScreenWithMenu.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ScreenWithMenu.java @@ -74,10 +74,10 @@ public class ScreenWithMenu extends Screen { } @Override - public boolean mouseScrolled(double mouseX, double mouseY, double amount) { - if (this.menu != null && this.menu.mouseScrolled(mouseX, mouseY, amount)) + public boolean mouseScrolled(double mouseX, double mouseY, double amountX, double amountY) { + if (this.menu != null && this.menu.mouseScrolled(mouseX, mouseY, amountX, amountY)) return true; - return super.mouseScrolled(mouseX, mouseY, amount); + return super.mouseScrolled(mouseX, mouseY, amountX, amountY); } @Override diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java index 6da05cbfb..313817395 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/display/DisplayRegistryImpl.java @@ -215,7 +215,7 @@ public class DisplayRegistryImpl extends RecipeManagerContextImpl<REIClientPlugi try { addWithReason(recipe, DisplayAdditionReason.RECIPE_MANAGER); } catch (Throwable e) { - InternalLogger.getInstance().error("Failed to fill display for recipe: %s [%s]", recipe, recipe.getId(), e); + InternalLogger.getInstance().error("Failed to fill display for recipe: %s [%s]", recipe.value(), recipe.id(), e); } } } |
