diff options
Diffstat (limited to 'forge/src')
5 files changed, 20 insertions, 72 deletions
diff --git a/forge/src/main/java/me/shedaniel/rei/impl/client/forge/CommandSenderImpl.java b/forge/src/main/java/me/shedaniel/rei/impl/client/forge/CommandSenderImpl.java deleted file mode 100644 index 7916f8adc..000000000 --- a/forge/src/main/java/me/shedaniel/rei/impl/client/forge/CommandSenderImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is licensed under the MIT License, part of Roughly Enough Items. - * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.shedaniel.rei.impl.client.forge; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.player.LocalPlayer; -import net.minecraftforge.fml.util.ObfuscationReflectionHelper; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -public class CommandSenderImpl { - public static void sendCommand(String command) { - LocalPlayer player = Minecraft.getInstance().player; - if (player == null) return; - Method method = null; - try { - // 1.19 - method = ObfuscationReflectionHelper.findMethod(LocalPlayer.class, "m_234156_", String.class); - } catch (ObfuscationReflectionHelper.UnableToFindMethodException ignored) { - } - if (method == null) { - try { - // 1.19.1 - method = ObfuscationReflectionHelper.findMethod(LocalPlayer.class, "m_242614_", String.class); - } catch (ObfuscationReflectionHelper.UnableToFindMethodException ignored) { - } - } - if (method == null) { - throw new RuntimeException("Unable to find method"); - } - - try { - method.invoke(player, command); - } catch (IllegalAccessException | InvocationTargetException e) { - throw new RuntimeException(e); - } - } -} diff --git a/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplForge.java b/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplForge.java index ab013f179..832bd0b1d 100644 --- a/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplForge.java +++ b/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplForge.java @@ -31,6 +31,7 @@ import me.shedaniel.rei.api.common.util.CollectionUtils; import me.shedaniel.rei.impl.client.gui.ScreenOverlayImpl; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; +import net.minecraft.client.gui.screens.inventory.tooltip.DefaultTooltipPositioner; import net.minecraft.network.chat.Component; import net.minecraft.world.inventory.tooltip.TooltipComponent; import net.minecraft.world.item.ItemStack; @@ -61,7 +62,7 @@ public class ScreenOverlayImplForge extends ScreenOverlayImpl { } } screen.tooltipStack = itemStack; - screen.renderTooltipInternal(matrices, components, mouseX, mouseY); + screen.renderTooltipInternal(matrices, components, mouseX, mouseY, DefaultTooltipPositioner.INSTANCE); screen.tooltipStack = ItemStack.EMPTY; matrices.popPose(); } diff --git a/forge/src/main/java/me/shedaniel/rei/mixin/forge/MixinTagLoader.java b/forge/src/main/java/me/shedaniel/rei/mixin/forge/MixinTagLoader.java index 2f066b6ca..43a5b95c2 100644 --- a/forge/src/main/java/me/shedaniel/rei/mixin/forge/MixinTagLoader.java +++ b/forge/src/main/java/me/shedaniel/rei/mixin/forge/MixinTagLoader.java @@ -32,6 +32,7 @@ import me.shedaniel.rei.api.common.util.CollectionUtils; import me.shedaniel.rei.impl.common.InternalLogger; import me.shedaniel.rei.plugin.common.displays.tag.TagNodes; import net.minecraft.core.Registry; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagEntry; @@ -66,7 +67,7 @@ public class MixinTagLoader<T> { TagNodes.TAG_DATA_MAP.put(resourceKey, new HashMap<>()); Map<ResourceLocation, TagNodes.TagData> tagDataMap = TagNodes.TAG_DATA_MAP.get(resourceKey); if (tagDataMap == null) return; - Registry<T> registry = ((Registry<Registry<T>>) Registry.REGISTRY).get((ResourceKey<Registry<T>>) resourceKey); + Registry<T> registry = ((Registry<Registry<T>>) BuiltInRegistries.REGISTRY).get((ResourceKey<Registry<T>>) resourceKey); Stopwatch stopwatch = Stopwatch.createStarted(); Iterator<Map.Entry<TagNodes.CollectionWrapper<?>, TagNodes.RawTagData>> entryIterator = TagNodes.RAW_TAG_DATA_MAP.getOrDefault(directory, Reference2ObjectMaps.emptyMap()) diff --git a/forge/src/main/resources/META-INF/accesstransformer.cfg b/forge/src/main/resources/META-INF/accesstransformer.cfg index 5d520302f..cd8fd6891 100644 --- a/forge/src/main/resources/META-INF/accesstransformer.cfg +++ b/forge/src/main/resources/META-INF/accesstransformer.cfg @@ -20,10 +20,7 @@ public net.minecraft.world.item.alchemy.PotionBrewing f_43494_ public net.minecraft.world.item.alchemy.PotionBrewing$Mix f_43532_ public net.minecraft.world.item.alchemy.PotionBrewing$Mix f_43533_ public net.minecraft.world.item.alchemy.PotionBrewing$Mix f_43534_ -public net.minecraft.world.item.crafting.UpgradeRecipe f_44519_ -public net.minecraft.world.item.crafting.UpgradeRecipe f_44518_ -public net.minecraft.world.item.CreativeModeTab f_40763_ -public net.minecraft.client.gui.GuiComponent m_93112_(Lcom/mojang/math/Matrix4f;IIIIIFFFF)V +public net.minecraft.client.gui.GuiComponent m_93112_(Lorg/joml/Matrix4f;IIIIIFFFF)V public net.minecraft.client.gui.screens.Screen m_7787_(Lnet/minecraft/client/gui/components/events/GuiEventListener;)Lnet/minecraft/client/gui/components/events/GuiEventListener; public net.minecraft.client.gui.screens.Screen m_7856_()V public net.minecraft.client.gui.screens.Screen m_6697_(Ljava/lang/String;Z)V @@ -31,10 +28,19 @@ public net.minecraft.client.gui.screens.Screen m_96583_(Ljava/lang/String;CI)Z public-f net.minecraft.client.gui.screens.inventory.AbstractContainerScreen f_97711_ protected net.minecraft.client.gui.screens.Screen m_6575_(Lnet/minecraft/client/Minecraft;II)V public net.minecraft.client.gui.screens.Screen m_142416_(Lnet/minecraft/client/gui/components/events/GuiEventListener;)Lnet/minecraft/client/gui/components/events/GuiEventListener; -public net.minecraft.client.gui.screens.Screen m_169394_(Lnet/minecraft/client/gui/components/Widget;)Lnet/minecraft/client/gui/components/Widget; -public net.minecraft.client.gui.screens.Screen m_169383_(Lcom/mojang/blaze3d/vertex/PoseStack;Ljava/util/List;II)V +public net.minecraft.client.gui.screens.Screen m_169394_(Lnet/minecraft/client/gui/components/Renderable;)Lnet/minecraft/client/gui/components/Renderable; +public net.minecraft.client.gui.screens.Screen m_262809_(Lcom/mojang/blaze3d/vertex/PoseStack;Ljava/util/List;IILnet/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipPositioner;)V # renderTooltipInternal public net.minecraft.client.gui.screens.Screen tooltipStack public net.minecraft.client.renderer.RenderType m_173209_(Ljava/lang/String;Lcom/mojang/blaze3d/vertex/VertexFormat;Lcom/mojang/blaze3d/vertex/VertexFormat$Mode;ILnet/minecraft/client/renderer/RenderType$CompositeState;)Lnet/minecraft/client/renderer/RenderType$CompositeRenderType; public net.minecraft.client.renderer.RenderType$OutlineProperty public net.minecraft.client.renderer.RenderType$CompositeState -public net.minecraft.tags.TagEntry f_215914_ # tag
\ No newline at end of file +public net.minecraft.tags.TagEntry f_215914_ # tag +public net.minecraft.tags.TagEntry f_215913_ # id +public net.minecraft.world.item.crafting.LegacyUpgradeRecipe f_265911_ # base +public net.minecraft.world.item.crafting.LegacyUpgradeRecipe f_265910_ # addition +public net.minecraft.world.item.crafting.SmithingTransformRecipe f_265949_ # template +public net.minecraft.world.item.crafting.SmithingTransformRecipe f_265888_ # base +public net.minecraft.world.item.crafting.SmithingTransformRecipe f_265907_ # addition +public net.minecraft.world.item.crafting.SmithingTrimRecipe f_265958_ # template +public net.minecraft.world.item.crafting.SmithingTrimRecipe f_266040_ # base +public net.minecraft.world.item.crafting.SmithingTrimRecipe f_266053_ # addition
\ No newline at end of file diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index a21cc9c0b..e8b704a68 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -16,20 +16,20 @@ To allow players to view items and recipes. [[dependencies.roughlyenoughitems]] modId = "architectury" mandatory = true -versionRange = "[5.7,)" +versionRange = "[8,)" ordering = "NONE" side = "BOTH" [[dependencies.roughlyenoughitems]] modId = "cloth_config" mandatory = true -versionRange = "[7.0,)" +versionRange = "[10.0,)" ordering = "NONE" side = "BOTH" [[dependencies.roughlyenoughitems]] modId = "forge" mandatory = true -versionRange = "[41.0.64,)" +versionRange = "[45.0.0,)" ordering = "NONE" side = "BOTH" |
