fix 1.18.2 (fixes #109)
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import anticope.rejects.utils.RejectsUtils;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* Injects the CPS counter.
|
||||
*/
|
||||
@Mixin(MinecraftClient.class)
|
||||
public class MinecraftClientMixin
|
||||
{
|
||||
@Inject(method = "handleInputEvents", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;doAttack()V"))
|
||||
private void onAttack(CallbackInfo ci)
|
||||
{
|
||||
RejectsUtils.CPS++;
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class CommandsMixin {
|
||||
|
||||
@Shadow(remap = false)
|
||||
@Final
|
||||
private CommandDispatcher<CommandSource> DISPATCHER = new CommandDispatcher<>();
|
||||
private CommandDispatcher<CommandSource> DISPATCHER;
|
||||
|
||||
@Inject(method = "add", at=@At("HEAD"), remap = false, cancellable = true)
|
||||
private void onAdd(Command cmd, CallbackInfo ci) {
|
||||
|
||||
Reference in New Issue
Block a user