Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Del

  • Автор темы Автор темы Relly2
  • Дата начала Дата начала
короче взял killaura с югейма как сделать что бы она била по криперам

Код:
Expand Collapse Copy
package im.paster.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.paster.events.EventInput;
import im.paster.events.EventMotion;
import im.paster.functions.api.Category;
import im.paster.functions.api.Function;
import im.paster.functions.api.FunctionRegister;
import im.paster.functions.settings.impl.ModeSetting;
import im.paster.functions.settings.impl.SliderSetting;
import im.paster.utils.math.StopWatch;
import im.paster.utils.player.MouseUtil;
import im.paster.utils.player.MoveUtils;
import net.minecraft.entity.Entity;
import net.minecraft.util.Hand;
@FunctionRegister(name = "CreeperFarm", type = Category.Combat)
public class CreeperFarm extends Function {
private final SliderSetting Range = new SliderSetting("Дистанция", 3f, 2.5f, 6f, 0.1f);
final ModeSetting correctionType = new ModeSetting("Тип коррекции", "Незаметная", "Незаметная", "Сфокусированный", "Без");
public CreeperFarm(){
addSettings(correctionType, Range);
}
private long lastMessageTime = 0;
private final StopWatch stopWatch = new StopWatch();
@Subscribe
    public void onInput(EventInput eventInput) {
if (correctionType.is("Незаметная")) {
MoveUtils.fixMovement(eventInput, mc.player.getRotationYawHead());
}
}
@Subscribe
    private void onMotion(EventMotion e) {
Entity targetEntity = null;
for (Entity entity : mc.world.getPlayers()) {
if (entity != mc.player && entity.getDistance(mc.player) <= Range.get()) {
if (isValidTarget(entity)) {
targetEntity = entity;
break;
}
}
}
if (targetEntity == null) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
if (targetEntity != null) {
double x = targetEntity.getPosX() - mc.player.getPosX();
double y = targetEntity.getPosY() - mc.player.getPosY();
double z = targetEntity.getPosZ() - mc.player.getPosZ();
double u = Math.sqrt(x * x + z * z);
float Yaw = (float) (Math.atan2(z, x) * 57.29577951308232 - 90.0);
float Pitch = (float) (-Math.atan2(y, u) * 57.29577951308232);
mc.player.rotationYawHead = Yaw;
mc.player.renderYawOffset = Yaw;
mc.player.rotationPitchHead = Pitch;
e.setYaw(Yaw);
e.setPitch(Pitch);
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Yaw;
}
if (MouseUtil.getMouseOver(targetEntity, Yaw, Pitch, Range.get()) != null && mc.player.fallDistance > 0) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastMessageTime >= 500) {
mc.playerController.attackEntity(mc.player, targetEntity);
mc.player.swingArm(Hand.MAIN_HAND);
lastMessageTime = currentTime;
}
}
}
}
private boolean isValidTarget(Entity entity) {
return entity instanceof Entity;
}
@Override
    public void onDisable() {
super.onDisable();
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
}
}
а что килка обычная не бьет по криперам?
 
короче взял killaura с югейма как сделать что бы она била по криперам

Код:
Expand Collapse Copy
package im.paster.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.paster.events.EventInput;
import im.paster.events.EventMotion;
import im.paster.functions.api.Category;
import im.paster.functions.api.Function;
import im.paster.functions.api.FunctionRegister;
import im.paster.functions.settings.impl.ModeSetting;
import im.paster.functions.settings.impl.SliderSetting;
import im.paster.utils.math.StopWatch;
import im.paster.utils.player.MouseUtil;
import im.paster.utils.player.MoveUtils;
import net.minecraft.entity.Entity;
import net.minecraft.util.Hand;
@FunctionRegister(name = "CreeperFarm", type = Category.Combat)
public class CreeperFarm extends Function {
private final SliderSetting Range = new SliderSetting("Дистанция", 3f, 2.5f, 6f, 0.1f);
final ModeSetting correctionType = new ModeSetting("Тип коррекции", "Незаметная", "Незаметная", "Сфокусированный", "Без");
public CreeperFarm(){
addSettings(correctionType, Range);
}
private long lastMessageTime = 0;
private final StopWatch stopWatch = new StopWatch();
@Subscribe
    public void onInput(EventInput eventInput) {
if (correctionType.is("Незаметная")) {
MoveUtils.fixMovement(eventInput, mc.player.getRotationYawHead());
}
}
@Subscribe
    private void onMotion(EventMotion e) {
Entity targetEntity = null;
for (Entity entity : mc.world.getPlayers()) {
if (entity != mc.player && entity.getDistance(mc.player) <= Range.get()) {
if (isValidTarget(entity)) {
targetEntity = entity;
break;
}
}
}
if (targetEntity == null) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
if (targetEntity != null) {
double x = targetEntity.getPosX() - mc.player.getPosX();
double y = targetEntity.getPosY() - mc.player.getPosY();
double z = targetEntity.getPosZ() - mc.player.getPosZ();
double u = Math.sqrt(x * x + z * z);
float Yaw = (float) (Math.atan2(z, x) * 57.29577951308232 - 90.0);
float Pitch = (float) (-Math.atan2(y, u) * 57.29577951308232);
mc.player.rotationYawHead = Yaw;
mc.player.renderYawOffset = Yaw;
mc.player.rotationPitchHead = Pitch;
e.setYaw(Yaw);
e.setPitch(Pitch);
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Yaw;
}
if (MouseUtil.getMouseOver(targetEntity, Yaw, Pitch, Range.get()) != null && mc.player.fallDistance > 0) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastMessageTime >= 500) {
mc.playerController.attackEntity(mc.player, targetEntity);
mc.player.swingArm(Hand.MAIN_HAND);
lastMessageTime = currentTime;
}
}
}
}
private boolean isValidTarget(Entity entity) {
return entity instanceof Entity;
}
@Override
    public void onDisable() {
super.onDisable();
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
}
}
Типа делаешь вместо проверки на энтити проверку на отдельного зеленого хуеглота
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
берешь удаляешь все лишнее что тебе не нужное с кода делаешь проверку на энтити а точнее на нашего крипера добавляешь логику чтобы ножки убегали и воуля, но скорее всего у тебя криперы будут тебя бах бах
 
короче взял killaura с югейма как сделать что бы она била по криперам

Код:
Expand Collapse Copy
package im.paster.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.paster.events.EventInput;
import im.paster.events.EventMotion;
import im.paster.functions.api.Category;
import im.paster.functions.api.Function;
import im.paster.functions.api.FunctionRegister;
import im.paster.functions.settings.impl.ModeSetting;
import im.paster.functions.settings.impl.SliderSetting;
import im.paster.utils.math.StopWatch;
import im.paster.utils.player.MouseUtil;
import im.paster.utils.player.MoveUtils;
import net.minecraft.entity.Entity;
import net.minecraft.util.Hand;
@FunctionRegister(name = "CreeperFarm", type = Category.Combat)
public class CreeperFarm extends Function {
private final SliderSetting Range = new SliderSetting("Дистанция", 3f, 2.5f, 6f, 0.1f);
final ModeSetting correctionType = new ModeSetting("Тип коррекции", "Незаметная", "Незаметная", "Сфокусированный", "Без");
public CreeperFarm(){
addSettings(correctionType, Range);
}
private long lastMessageTime = 0;
private final StopWatch stopWatch = new StopWatch();
@Subscribe
    public void onInput(EventInput eventInput) {
if (correctionType.is("Незаметная")) {
MoveUtils.fixMovement(eventInput, mc.player.getRotationYawHead());
}
}
@Subscribe
    private void onMotion(EventMotion e) {
Entity targetEntity = null;
for (Entity entity : mc.world.getPlayers()) {
if (entity != mc.player && entity.getDistance(mc.player) <= Range.get()) {
if (isValidTarget(entity)) {
targetEntity = entity;
break;
}
}
}
if (targetEntity == null) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
if (targetEntity != null) {
double x = targetEntity.getPosX() - mc.player.getPosX();
double y = targetEntity.getPosY() - mc.player.getPosY();
double z = targetEntity.getPosZ() - mc.player.getPosZ();
double u = Math.sqrt(x * x + z * z);
float Yaw = (float) (Math.atan2(z, x) * 57.29577951308232 - 90.0);
float Pitch = (float) (-Math.atan2(y, u) * 57.29577951308232);
mc.player.rotationYawHead = Yaw;
mc.player.renderYawOffset = Yaw;
mc.player.rotationPitchHead = Pitch;
e.setYaw(Yaw);
e.setPitch(Pitch);
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Yaw;
}
if (MouseUtil.getMouseOver(targetEntity, Yaw, Pitch, Range.get()) != null && mc.player.fallDistance > 0) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastMessageTime >= 500) {
mc.playerController.attackEntity(mc.player, targetEntity);
mc.player.swingArm(Hand.MAIN_HAND);
lastMessageTime = currentTime;
}
}
}
}
private boolean isValidTarget(Entity entity) {
return entity instanceof Entity;
}
@Override
    public void onDisable() {
super.onDisable();
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
}
}
зделай чтобы оно таргетило токо криперов и все типо CreeperEntity
 
короче взял killaura с югейма как сделать что бы она била по криперам

Код:
Expand Collapse Copy
package im.paster.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.paster.events.EventInput;
import im.paster.events.EventMotion;
import im.paster.functions.api.Category;
import im.paster.functions.api.Function;
import im.paster.functions.api.FunctionRegister;
import im.paster.functions.settings.impl.ModeSetting;
import im.paster.functions.settings.impl.SliderSetting;
import im.paster.utils.math.StopWatch;
import im.paster.utils.player.MouseUtil;
import im.paster.utils.player.MoveUtils;
import net.minecraft.entity.Entity;
import net.minecraft.util.Hand;
@FunctionRegister(name = "CreeperFarm", type = Category.Combat)
public class CreeperFarm extends Function {
private final SliderSetting Range = new SliderSetting("Дистанция", 3f, 2.5f, 6f, 0.1f);
final ModeSetting correctionType = new ModeSetting("Тип коррекции", "Незаметная", "Незаметная", "Сфокусированный", "Без");
public CreeperFarm(){
addSettings(correctionType, Range);
}
private long lastMessageTime = 0;
private final StopWatch stopWatch = new StopWatch();
@Subscribe
    public void onInput(EventInput eventInput) {
if (correctionType.is("Незаметная")) {
MoveUtils.fixMovement(eventInput, mc.player.getRotationYawHead());
}
}
@Subscribe
    private void onMotion(EventMotion e) {
Entity targetEntity = null;
for (Entity entity : mc.world.getPlayers()) {
if (entity != mc.player && entity.getDistance(mc.player) <= Range.get()) {
if (isValidTarget(entity)) {
targetEntity = entity;
break;
}
}
}
if (targetEntity == null) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
if (targetEntity != null) {
double x = targetEntity.getPosX() - mc.player.getPosX();
double y = targetEntity.getPosY() - mc.player.getPosY();
double z = targetEntity.getPosZ() - mc.player.getPosZ();
double u = Math.sqrt(x * x + z * z);
float Yaw = (float) (Math.atan2(z, x) * 57.29577951308232 - 90.0);
float Pitch = (float) (-Math.atan2(y, u) * 57.29577951308232);
mc.player.rotationYawHead = Yaw;
mc.player.renderYawOffset = Yaw;
mc.player.rotationPitchHead = Pitch;
e.setYaw(Yaw);
e.setPitch(Pitch);
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Yaw;
}
if (MouseUtil.getMouseOver(targetEntity, Yaw, Pitch, Range.get()) != null && mc.player.fallDistance > 0) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastMessageTime >= 500) {
mc.playerController.attackEntity(mc.player, targetEntity);
mc.player.swingArm(Hand.MAIN_HAND);
lastMessageTime = currentTime;
}
}
}
}
private boolean isValidTarget(Entity entity) {
return entity instanceof Entity;
}
@Override
    public void onDisable() {
super.onDisable();
if (!correctionType.is("Без")) {
mc.player.rotationYawOffset = Integer.MIN_VALUE;
}
}
}
Это все круто но этот селф код я делал несколько месецов назад (пруфы в профиле)
 
Назад
Сверху Снизу