Начинающий
- Статус
- Оффлайн
- Регистрация
- 1 Авг 2024
- Сообщения
- 451
- Реакции
- 0
- Выберите загрузчик игры
- Прочие моды
может быть оно вам надо..
вфпфвп:
@ModuleManager(name = "HighJump", category = Category.moving)
public class HighJump extends Function {
public HighJump() {
super();
}
@Override
public void onEvent(Event event) {
Minecraft mc = Minecraft.getInstance();
if (mc.player == null || mc.level == null) return;
for (Entity en : mc.level.entitiesForRendering()) {
if (en instanceof Boat) {
if (mc.player.distanceTo(en) <= 2) {
setMotion(1.2f);
mc.player.setDeltaMovement(mc.player.getDeltaMovement().x, 1, mc.player.getDeltaMovement().z);
break;
}
}
}
}
private void setMotion(float speed) {
Minecraft mc = Minecraft.getInstance();
double forward = mc.player.input.forwardImpulse;
double strafe = mc.player.input.leftImpulse;
float yaw = mc.player.getYRot();
if (forward == 0 && strafe == 0) {
mc.player.setDeltaMovement(0, mc.player.getDeltaMovement().y, 0);
return;
}
double motionX = forward * speed * Math.cos(Math.toRadians(yaw + 90))
+ strafe * speed * Math.sin(Math.toRadians(yaw + 90));
double motionZ = forward * speed * Math.sin(Math.toRadians(yaw + 90))
- strafe * speed * Math.cos(Math.toRadians(yaw + 90));
mc.player.setDeltaMovement(motionX, mc.player.getDeltaMovement().y, motionZ);
}
@Override
public void onDisable() {
super.onDisable();
Minecraft mc = Minecraft.getInstance();
if (mc.player != null) {
mc.player.getAbilities().flying = false;
}
}
}
Пожалуйста, авторизуйтесь для просмотра ссылки.