Начинающий
- Статус
- Оффлайн
- Регистрация
- 24 Сен 2021
- Сообщения
- 34
- Реакции
- 0
Java:
public Velocity() {
super("Velocity", ModuleCategory.Combat);
velocityMode = new ListSetting("Velocity Mode", "Packet", () -> true, "Packet");
Ignorelevitation = new BooleanSetting("Ignore levitation", false, () -> true);
addSettings(Ignorelevitation);
}
@EventTarget
public void onReceivePacket(EventReceivePacket event) {
String mode = velocityMode.getOptions();
if (Ignorelevitation.getCurrentValue() && mc.player.hurtTime > 0 && event.getPacket()
instanceof SPacketEntityVelocity && !mc.player.isPotionActive(MobEffects.FIRE_RESISTANCE) &&
(mc.player.isPotionActive(MobEffects.POISON) || mc.player.isPotionActive(MobEffects.WITHER) || mc.player.isBurning())) {
event.setCancelled(true);
}
if (mode.equalsIgnoreCase("Packet")) {
if ((event.getPacket() instanceof SPacketEntityVelocity || event.getPacket() instanceof SPacketExplosion) &&
((SPacketEntityVelocity)event.getPacket()).getEntityID() == mc.player.getEntityId()) {
event.setCancelled(true);
}
}
}