Updated to 1.19.1

This commit is contained in:
mdo992 2022-07-27 18:22:09 -07:00
parent 9a5b59e9f3
commit 372f6fa4f7
3 changed files with 11 additions and 12 deletions

View file

@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.6
minecraft_version=1.19.1
yarn_mappings=1.19.1+build.1
loader_version=0.14.8
# Mod Properties
mod_version = 2.0.0
@ -14,4 +14,4 @@ org.gradle.jvmargs=-Xmx1G
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.55.2+1.19
fabric_version=0.58.4+1.19.1

View file

@ -3,8 +3,7 @@ package com.github.hhhzzzsss.songplayer.mixin;
import com.github.hhhzzzsss.songplayer.CommandProcessor;
import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import net.minecraft.client.gui.screen.CommandSuggestor;
import net.minecraft.client.gui.screen.CommandSuggestor.SuggestionWindow;
import net.minecraft.client.gui.screen.ChatInputSuggestor;
import net.minecraft.client.gui.widget.TextFieldWidget;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@ -14,8 +13,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.concurrent.CompletableFuture;
@Mixin(CommandSuggestor.class)
public class CommandSuggestorMixin {
@Mixin(ChatInputSuggestor.class)
public class ChatInputSuggestorMixin {
@Shadow
CompletableFuture<Suggestions> pendingSuggestions;
@ -25,12 +24,12 @@ public class CommandSuggestorMixin {
}
@Shadow
public void showSuggestions(boolean narrateFirstSuggestion) {}
public void show(boolean narrateFirstSuggestion) {}
@Shadow
final TextFieldWidget textField;
public CommandSuggestorMixin() {
public ChatInputSuggestorMixin() {
textField = null;
}
@ -47,7 +46,7 @@ public class CommandSuggestorMixin {
CompletableFuture<Suggestions> suggestions = CommandProcessor.handleSuggestions(preStr, new SuggestionsBuilder(preStr, wordStart));
if (suggestions != null) {
this.pendingSuggestions = suggestions;
this.showSuggestions(true);
this.show(true);
}
}
}

View file

@ -8,7 +8,7 @@
"client": [
"ClientPlayerEntityMixin",
"ClientPlayNetworkHandlerMixin",
"CommandSuggestorMixin",
"ChatInputSuggestorMixin",
"InGameHudMixin",
"MinecraftClientMixin"
],