Начинающий
-
Автор темы
- #1
JavaScript:
package dev.excellent.client.module.impl.movement;
import dev.excellent.api.event.impl.player.UpdateEvent;
import dev.excellent.api.interfaces.event.Listener;
import dev.excellent.client.module.api.Category;
import dev.excellent.client.module.api.Module;
import dev.excellent.client.module.api.ModuleInfo;
import dev.excellent.impl.util.time.TimerUtil;
import dev.excellent.impl.value.impl.ModeValue;
import dev.excellent.impl.value.mode.SubMode;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.util.math.AxisAlignedBB;
@ModuleInfo(name = "Speed", description = "Позволяет вам быстро бегать.", category = Category.MOVEMENT)
public class Speed extends Module {
public final ModeValue mode = new ModeValue("Режим", this)
.add(
new SubMode("Funtime")
).setDefault("Funtime");
@Override
protected void onEnable() {
super.onEnable();
}
@Override
protected void onDisable() {
super.onDisable();
mc.timer.resetSpeed();
}
{
};
private final Listener<UpdateEvent> onUpdate = event -> {
if (mode.is("Funtime")) {
handleGrim();
}
{
}
{
{
}
{
}
{
}
}
{
}};
private void handleGrim() {
AxisAlignedBB aabb = mc.player.getBoundingBox().grow(0.1);
int armorstans = mc.world.getEntitiesWithinAABB(ArmorStandEntity.class, aabb).size();
boolean canBoost = armorstans > 1
|| mc.world.getEntitiesWithinAABB(LivingEntity.class, aabb).size() > 1;
if (canBoost) {
if (!mc.player.isOnGround()) {
mc.player.jumpMovementFactor = armorstans > 1 ? 1F / armorstans : 0.16F;
}
}
}
private final TimerUtil timerUtil = TimerUtil.create();
private boolean boosting;
{}
@Override
public String getSuffix() {
return mode.getValue().getName();
}
{
}
}