Update 1.19.4 (#233)

This commit is contained in:
Soda5601
2023-03-19 00:29:06 +08:00
committed by GitHub
parent e33ecf441e
commit 29509947c6
50 changed files with 271 additions and 238 deletions

View File

@@ -0,0 +1,17 @@
package anticope.rejects.mixin;
import anticope.rejects.events.OffGroundSpeedEvent;
import meteordevelopment.meteorclient.MeteorClient;
import net.minecraft.entity.player.PlayerEntity;
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.CallbackInfoReturnable;
@Mixin(PlayerEntity.class)
public class PlayerEntityMixin {
@Inject(method = "getOffGroundSpeed", at = @At("RETURN"), cancellable = true)
private void onGetOffGroundSpeed(CallbackInfoReturnable<Float> cir) {
cir.setReturnValue(MeteorClient.EVENT_BUS.post(OffGroundSpeedEvent.get(cir.getReturnValueF())).speed);
}
}