blob: 59742772fb11aa78a6c09291ab28a6bee5c16680 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package moe.nea.firmament.mixins;
import moe.nea.firmament.features.chat.QuickCommands;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.network.protocol.game.ClientboundCommandsPacket;
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(ClientPacketListener.class)
public class SaveOriginalCommandTreePacket {
@Inject(method = "handleCommands", at = @At(value = "RETURN"))
private void saveUnmodifiedCommandTree(ClientboundCommandsPacket packet, CallbackInfo ci) {
QuickCommands.INSTANCE.setLastReceivedTreePacket(packet);
}
}
|