use of org.bleachhack.event.events.EventClientMove in project BleachHack by BleachDrinker420.
the class MixinClientPlayerEntity method move.
@Inject(method = "move", at = @At("HEAD"), cancellable = true)
private void move(MovementType type, Vec3d movement, CallbackInfo info) {
EventClientMove event = new EventClientMove(type, movement);
BleachHack.eventBus.post(event);
if (event.isCancelled()) {
info.cancel();
} else if (!type.equals(event.getType()) || !movement.equals(event.getVec())) {
double double_1 = this.getX();
double double_2 = this.getZ();
super.move(event.getType(), event.getVec());
this.autoJump((float) (this.getX() - double_1), (float) (this.getZ() - double_2));
info.cancel();
}
}
Aggregations