-
Автор темы
- #1
всем ку кому нужна crystalaura код:
CrystalAura:
package not.cristal.modules.impl.combat;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EnderCrystalEntity;
import net.minecraft.util.Hand;
import not.cristal.events.Event;
import not.cristal.events.impl.player.EventUpdate;
import not.cristal.modules.Function;
import not.cristal.modules.FunctionAnnotation;
import not.cristal.modules.Type;
import not.cristal.modules.settings.imp.BooleanOption;
import not.cristal.util.math.RayTraceUtil;
import not.cristal.util.misc.TimerUtil;
import java.util.Iterator;
@FunctionAnnotation(
name = "CrystalAura",
type = Type.Combat
)
public class CrystalAura extends Function {
private final TimerUtil timerUtil = new TimerUtil();
private BooleanOption noPlayer = new BooleanOption("Не взрывать себя", true);
public CrystalAura() {
addSettings(noPlayer);
}
public void onEvent(Event event) {
if (event instanceof EventUpdate) {
Iterator var2 = mc.world.getAllEntities().iterator();
while(var2.hasNext()) {
Entity entity = (Entity)var2.next();
if (entity instanceof EnderCrystalEntity && (double)mc.player.getDistance(entity) <= 4.0 && RayTraceUtil.getMouseOver(entity, mc.player.rotationYaw, mc.player.rotationPitch, 6.0) == entity) {
float xPosCrystal = (float)entity.getPosY();
float xPosPlayer = (float)mc.player.getPosY() + 0.5F;
if (this.noPlayer.get() && xPosCrystal < xPosPlayer) {
return;
}
mc.playerController.attackEntity(mc.player, entity);
mc.player.swingArm(Hand.MAIN_HAND);
}
}
}
}
}}
Вложения
-
792 байт Просмотры: 44