feat: Add /dh command
This commit is contained in:
@@ -51,7 +51,7 @@ public class FirmKeybindsInVanillaControlsPatch {
|
||||
var config = FirmamentKeyBindings.INSTANCE.getKeyBindings().get(binding);
|
||||
if (config == null) return;
|
||||
resetButton.active = false;
|
||||
editButton.setMessage(Text.translatable("firmament.keybinding.external", config.value.format()));
|
||||
editButton.setMessage(Text.translatable("firmament.keybinding.external", config.getValue().format()));
|
||||
ci.cancel();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package moe.nea.firmament.mixins;
|
||||
|
||||
import moe.nea.firmament.features.chat.QuickCommands;
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.network.packet.s2c.play.CommandTreeS2CPacket;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientPlayNetworkHandler.class)
|
||||
public class SaveOriginalCommandTreePacket {
|
||||
@Inject(method = "onCommandTree", at = @At(value = "RETURN"))
|
||||
private void saveUnmodifiedCommandTree(CommandTreeS2CPacket packet, CallbackInfo ci) {
|
||||
QuickCommands.INSTANCE.setLastReceivedTreePacket(packet);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user