diff --git a/gradle.properties b/gradle.properties index 49441512..3d6ef3df 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.19 - loader_version=0.14.6 + minecraft_version=1.19.2 + loader_version=0.14.9 # Mod Properties core_version = 0.3.0 @@ -12,8 +12,8 @@ org.gradle.jvmargs=-Xmx1G maven_group = net.sorenon # Dependencies - fabric_version=0.55.1+1.19 - pehkui_version=3.3.2 + fabric_version=0.60.0+1.19.2 + pehkui_version=3.4.1 joml_version=1.10.4 night_config_version=3.6.5 quilt_mappings=1 diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java index aa5a66eb..c2ae877e 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/MCXRPlayClient.java @@ -33,7 +33,7 @@ import org.joml.Vector3f; import org.lwjgl.openxr.XR; import org.lwjgl.system.Configuration; -import virtuoel.pehkui.util.ScaleUtils; +import virtuoel.pehkui.util.ScaleRenderUtils; import static net.minecraft.client.gui.GuiComponent.GUI_ICONS_LOCATION; @@ -205,7 +205,7 @@ public static float getCameraScale(float delta) { public static float modifyProjectionMatrixDepth(float depth, Entity entity, float tickDelta) { if (FabricLoader.getInstance().isModLoaded("pehkui")) { - return ScaleUtils.modifyProjectionMatrixDepth(MCXRPlayClient.getCameraScale(tickDelta), depth, entity, tickDelta); + return ScaleRenderUtils.modifyProjectionMatrixDepth(MCXRPlayClient.getCameraScale(tickDelta), depth, entity, tickDelta); } return depth; } diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java index b86a39ff..22646487 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/QuickChat.java @@ -1,6 +1,8 @@ package net.sorenon.mcxr.play.gui; +import net.minecraft.Util; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.chat.ClientChatPreview; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.screens.ChatScreen; import net.minecraft.network.chat.Component; @@ -77,10 +79,11 @@ protected void init() { this.addRenderableWidget( new Button(buttonX, buttonY, buttonWidth, buttonHeight, Component.translatable(word), (button -> { + Component component = Util.mapNullable(this.getChatPreview().pull(word), ClientChatPreview.Preview::response); if (word.startsWith("/")) { - Minecraft.getInstance().player.command(word.substring(1)); + Minecraft.getInstance().player.commandSigned(word.substring(1), component); } else { - Minecraft.getInstance().player.chat(word); + Minecraft.getInstance().player.chatSigned(word, component); } // Minecraft.getInstance().gui.getChat().clearMessages(true); })) diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/keyboard/XrChatKeyboard.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/keyboard/XrChatKeyboard.java index 6f06fe56..81b28d33 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/keyboard/XrChatKeyboard.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/gui/keyboard/XrChatKeyboard.java @@ -1,8 +1,11 @@ package net.sorenon.mcxr.play.gui.keyboard; +import net.minecraft.Util; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.chat.ClientChatPreview; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.EditBox; +import net.minecraft.network.chat.Component; import net.sorenon.mcxr.play.gui.XrChatScreen; public class XrChatKeyboard extends XrAbstract2DKeyboard { @@ -53,11 +56,12 @@ public void returnButton(Button instance) { if (_chatBox.getValue().equals("")) { _chatScreen.onClose(); } else { + Component component = Util.mapNullable(this._chatScreen.getChatPreview().pull(_chatBox.getValue()), ClientChatPreview.Preview::response); if(_chatBox.getValue().startsWith("/")) { - Minecraft.getInstance().player.command(_chatBox.getValue().substring(1)); + Minecraft.getInstance().player.commandSigned(_chatBox.getValue().substring(1),component); _chatScreen.onClose(); } else { - Minecraft.getInstance().player.chat(_chatBox.getValue()); + Minecraft.getInstance().player.chatSigned(_chatBox.getValue(),component); _chatScreen.onClose(); } } diff --git a/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/resources/ResourceManagerReloadListenerMixin.java b/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/resources/ResourceManagerReloadListenerMixin.java index 37eb6bdf..c4f122d4 100644 --- a/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/resources/ResourceManagerReloadListenerMixin.java +++ b/mcxr-play/src/main/java/net/sorenon/mcxr/play/mixin/resources/ResourceManagerReloadListenerMixin.java @@ -12,12 +12,12 @@ @Mixin(ResourceManagerReloadListener.class) public interface ResourceManagerReloadListenerMixin { - @Inject(method = "method_29490", at = @At("HEAD")) + @Inject(method = "m_wjnqjlju", at = @At("HEAD")) default void preReload(ProfilerFiller profilerFiller, ResourceManager resourceManager, CallbackInfo ci){ MCXRPlayClient.MCXR_GAME_RENDERER.reloadingDepth += 1; } - @Inject(method = "method_29490", at = @At("RETURN")) + @Inject(method = "m_wjnqjlju", at = @At("RETURN")) default void postReload(ProfilerFiller profilerFiller, ResourceManager resourceManager, CallbackInfo ci){ MCXRPlayClient.MCXR_GAME_RENDERER.reloadingDepth -= 1; }