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

AutoLoot HW ОТМЫЧЕК

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
15 Мар 2021
Сообщения
39
Реакции
0
package im.expensive.functions.impl.misc;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.vector.Vector3d;

public class AutoLoot {
private final Minecraft mc;
private final Entity trader;
public AutoLoot(Minecraft mc, Entity trader) {
this.mc = mc;
this.trader = trader;
}
public void aimAndClick() {
if (trader != null) {
ClientPlayerEntity player = mc.player;
Vector3d playerPos = player.getPositionVec();
Vector3d traderPos = trader.getPositionVec().add(0, trader.getEyeHeight() / 2.0F, 0);
Vector3d direction = traderPos.subtract(playerPos);
double distance = Math.sqrt(direction.x * direction.x + direction.z * direction.z);
float yaw = (float) (Math.atan2(direction.z, direction.x) * (180 / Math.PI)) - 90.0F;
float pitch = (float) -(Math.atan2(direction.y, distance) * (180 / Math.PI));
mc.player.connection.sendPacket(new CPlayerPacket.PositionRotationPacket(player.getPosX(), player.getPosY(), player.getPosZ(), yaw, pitch, player.isOnGround));
mc.player.connection.sendPacket(new CUseEntityPacket(trader.getEntityId(), CUseEntityPacket.Action.INTERACT, Hand.MAIN_HAND));
}
}
}
 
под пиво пойдет
 
package im.expensive.functions.impl.misc;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.vector.Vector3d;

public class AutoLoot {
private final Minecraft mc;
private final Entity trader;
public AutoLoot(Minecraft mc, Entity trader) {
this.mc = mc;
this.trader = trader;
}
public void aimAndClick() {
if (trader != null) {
ClientPlayerEntity player = mc.player;
Vector3d playerPos = player.getPositionVec();
Vector3d traderPos = trader.getPositionVec().add(0, trader.getEyeHeight() / 2.0F, 0);
Vector3d direction = traderPos.subtract(playerPos);
double distance = Math.sqrt(direction.x * direction.x + direction.z * direction.z);
float yaw = (float) (Math.atan2(direction.z, direction.x) * (180 / Math.PI)) - 90.0F;
float pitch = (float) -(Math.atan2(direction.y, distance) * (180 / Math.PI));
mc.player.connection.sendPacket(new CPlayerPacket.PositionRotationPacket(player.getPosX(), player.getPosY(), player.getPosZ(), yaw, pitch, player.isOnGround));
mc.player.connection.sendPacket(new CUseEntityPacket(trader.getEntityId(), CUseEntityPacket.Action.INTERACT, Hand.MAIN_HAND));
}
}
}
AXAXAXAX,che za xueta
 
и нахуя типо это
 
чё оно делать
 
отвечаю всем что это и для чего это. на сервере holyworld есть ивент таинственный корабль, на котором есть житель у которого периодически в руках появляются драгоценные отмычки, которые можно забрать нажав по жителю пкм
 
отвечаю всем что это и для чего это. на сервере holyworld есть ивент таинственный корабль, на котором есть житель у которого периодически в руках появляются драгоценные отмычки, которые можно забрать нажав по жителю пкм

спасибо
 
отвечаю всем что это и для чего это. на сервере holyworld есть ивент таинственный корабль, на котором есть житель у которого периодически в руках появляются драгоценные отмычки, которые можно забрать нажав по жителю пкм
Спасибо
 
JavaScript:
Expand Collapse Copy
package im.expensive.functions.impl.misc;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.vector.Vector3d;

public class AutoLoot {
private final Minecraft mc;
private final Entity trader;
public AutoLoot(Minecraft mc, Entity trader) {
this.mc = mc;
this.trader = trader;
}
public void aimAndClick() {
if (trader != null) {
ClientPlayerEntity player = mc.player;
Vector3d playerPos = player.getPositionVec();
Vector3d traderPos = trader.getPositionVec().add(0, trader.getEyeHeight() / 2.0F, 0);
Vector3d direction = traderPos.subtract(playerPos);
double distance = Math.sqrt(direction.x * direction.x + direction.z * direction.z);
float yaw = (float) (Math.atan2(direction.z, direction.x) * (180 / Math.PI)) - 90.0F;
float pitch = (float) -(Math.atan2(direction.y, distance) * (180 / Math.PI));
mc.player.connection.sendPacket(new CPlayerPacket.PositionRotationPacket(player.getPosX(), player.getPosY(), player.getPosZ(), yaw, pitch, player.isOnGround));
mc.player.connection.sendPacket(new CUseEntityPacket(trader.getEntityId(), CUseEntityPacket.Action.INTERACT, Hand.MAIN_HAND));
}
}
}
|

вот так лучше я думаю будет
 
Ждем в Eclipse ChatGPT client:roflanEbalo:
 
JavaScript:
Expand Collapse Copy
package im.expensive.functions.impl.misc;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.vector.Vector3d;

public class AutoLoot {
private final Minecraft mc;
private final Entity trader;
public AutoLoot(Minecraft mc, Entity trader) {
this.mc = mc;
this.trader = trader;
}
public void aimAndClick() {
if (trader != null) {
ClientPlayerEntity player = mc.player;
Vector3d playerPos = player.getPositionVec();
Vector3d traderPos = trader.getPositionVec().add(0, trader.getEyeHeight() / 2.0F, 0);
Vector3d direction = traderPos.subtract(playerPos);
double distance = Math.sqrt(direction.x * direction.x + direction.z * direction.z);
float yaw = (float) (Math.atan2(direction.z, direction.x) * (180 / Math.PI)) - 90.0F;
float pitch = (float) -(Math.atan2(direction.y, distance) * (180 / Math.PI));
mc.player.connection.sendPacket(new CPlayerPacket.PositionRotationPacket(player.getPosX(), player.getPosY(), player.getPosZ(), yaw, pitch, player.isOnGround));
mc.player.connection.sendPacket(new CUseEntityPacket(trader.getEntityId(), CUseEntityPacket.Action.INTERACT, Hand.MAIN_HAND));
}
}
}
|

вот так лучше я думаю будет
1724925009208.png

и лучше не стало)
 
пиздец автор писал этот код под какойто хуйней это не код это пиздец
 
package im.expensive.functions.impl.misc;

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.Entity;
import net.minecraft.network.play.client.CPlayerPacket;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.vector.Vector3d;

public class AutoLoot {
private final Minecraft mc;
private final Entity trader;
public AutoLoot(Minecraft mc, Entity trader) {
this.mc = mc;
this.trader = trader;
}
public void aimAndClick() {
if (trader != null) {
ClientPlayerEntity player = mc.player;
Vector3d playerPos = player.getPositionVec();
Vector3d traderPos = trader.getPositionVec().add(0, trader.getEyeHeight() / 2.0F, 0);
Vector3d direction = traderPos.subtract(playerPos);
double distance = Math.sqrt(direction.x * direction.x + direction.z * direction.z);
float yaw = (float) (Math.atan2(direction.z, direction.x) * (180 / Math.PI)) - 90.0F;
float pitch = (float) -(Math.atan2(direction.y, distance) * (180 / Math.PI));
mc.player.connection.sendPacket(new CPlayerPacket.PositionRotationPacket(player.getPosX(), player.getPosY(), player.getPosZ(), yaw, pitch, player.isOnGround));
mc.player.connection.sendPacket(new CUseEntityPacket(trader.getEntityId(), CUseEntityPacket.Action.INTERACT, Hand.MAIN_HAND));
}
}
}
:FailFish:
 
Назад
Сверху Снизу