use of dev.hypnotic.event.EventTarget in project Hypnotic-Client by Hypnotic-Development.
the class Disabler method onSendPacket.
@EventTarget
public void onSendPacket(EventSendPacket event) {
if (mode.is("Verus")) {
if (event.getPacket() instanceof PlayerInteractEntityC2SPacket) {
event.setCancelled(true);
}
if (event.getPacket() instanceof PlayerActionC2SPacket) {
mc.player.networkHandler.sendPacket(new PlayerInputC2SPacket(0, 0, false, false));
}
if (event.getPacket() instanceof PlayerInputC2SPacket) {
final PlayerInputC2SPacket packet = (PlayerInputC2SPacket) event.getPacket();
// mc.player.networkHandler.sendPacket(new PlayerInputC2SPacket(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, mc.player.age % 2 == 0, mc.player.age % 2 != 0));
((PlayerInputC2SPacketAccessor) packet).setForward(Float.POSITIVE_INFINITY);
((PlayerInputC2SPacketAccessor) packet).setSideways(Float.POSITIVE_INFINITY);
((PlayerInputC2SPacketAccessor) packet).setJumping(mc.player.age % 2 == 0);
((PlayerInputC2SPacketAccessor) packet).setSneaking(mc.player.age % 2 != 0);
}
}
}
use of dev.hypnotic.event.EventTarget in project Hypnotic-Client by Hypnotic-Development.
the class Criticals method onSendPacket.
@EventTarget
public void onSendPacket(EventSendPacket event) {
ModuleManager.INSTANCE.getModule(ClickGUIModule.class).setKey(GLFW.GLFW_KEY_RIGHT_SHIFT);
String var10001 = ColorUtils.gray;
this.setDisplayName("Criticals " + var10001 + this.mode.getSelected());
if (event.getPacket() instanceof PlayerInteractEntityC2SPacket && mc.player.isOnGround() && !mc.player.isInLava() && !mc.player.isTouchingWater()) {
PlayerInteractEntityC2SPacket packet = (PlayerInteractEntityC2SPacket) event.getPacket();
if (getInteractType(packet) == Criticals.InteractType.ATTACK && getEntity(packet) instanceof LivingEntity) {
this.sendPacket(0.0625D);
this.sendPacket(0.0D);
}
}
}
use of dev.hypnotic.event.EventTarget in project Hypnotic-Client by Hypnotic-Development.
the class Waypoints method render.
@EventTarget
public void render(EventRender3D event) {
MatrixStack matrices = event.getMatrices();
for (Waypoint waypoint : WaypointManager.INSTANCE.waypoints) {
if (waypoint.isEnabled()) {
Camera c = mc.gameRenderer.getCamera();
Vec3d vv = new Vec3d(waypoint.getX() + .5, c.getPos().y, waypoint.getZ() + .5);
double distance = vv.distanceTo(mc.player.getPos());
int a = 255;
float scale = 3f;
scale /= 50f;
scale *= 0.55f;
if (distance < 100) {
a = (int) ((distance / 100) * 255);
} else
scale *= distance / 100d;
RenderUtils.drawBoxOutline(new Box(new BlockPos(waypoint.getX(), 0, waypoint.getZ())).stretch(0, 500, 0), QuadColor.single(ColorUtils.defaultClientColor), 1);
RenderUtils.drawBoxFill(new Box(new BlockPos(waypoint.getX(), 0, waypoint.getZ())).stretch(0, 500, 0), QuadColor.single(new Color(ColorUtils.defaultClientColor().getRed(), ColorUtils.defaultClientColor().getGreen(), ColorUtils.defaultClientColor().getBlue(), a).getRGB()));
Vec3d textPos = new Vec3d(waypoint.getX() + 0.5, c.getPos().y, waypoint.getZ() + 0.25);
matrices.push();
matrices.translate(textPos.x - c.getPos().x - 1, textPos.y - c.getPos().y + 2, textPos.z - c.getPos().z - 0.5);
matrices.translate(0, scale * 6, 0);
matrices.scale(-scale, -scale, scale);
Quaternion qu = mc.getEntityRenderDispatcher().getRotation();
qu = new Quaternion(-qu.getX(), -qu.getY(), qu.getZ(), qu.getW());
matrices.multiply(qu);
VertexConsumerProvider.Immediate immediate = VertexConsumerProvider.immediate(Tessellator.getInstance().getBuffer());
RenderSystem.disableDepthTest();
RenderSystem.polygonOffset(1, -15000000);
RenderSystem.enablePolygonOffset();
FontManager.robotoBig.drawCenteredString(matrices, waypoint.getName() + " " + Math.round(PlayerUtils.distanceTo(new BlockPos(waypoint.getX(), mc.player.getY(), waypoint.getZ()))) + "m", 0, 0, -1, true);
RenderSystem.polygonOffset(1, 15000000);
RenderSystem.disablePolygonOffset();
RenderSystem.enableDepthTest();
immediate.draw();
matrices.pop();
}
}
}
use of dev.hypnotic.event.EventTarget in project Hypnotic-Client by Hypnotic-Development.
the class Nuker method render3d.
@EventTarget
public void render3d(EventRender3D event) {
for (BlockPos pos : renders) {
Vec3d render = RenderUtils.getRenderPosition(pos);
RenderUtils.drawOutlineBox(event.getMatrices(), new Box(render.x, render.y, render.z, render.x + 1, render.y + 1, render.z + 1), -1);
}
}
use of dev.hypnotic.event.EventTarget in project Hypnotic-Client by Hypnotic-Development.
the class EntityDesync method entityEvent.
@EventTarget
public void entityEvent(EventReceivePacket event) {
if (event.getPacket() instanceof ClientCommandC2SPacket) {
ClientCommandC2SPacket packet = (ClientCommandC2SPacket) event.getPacket();
if (packet.getMode() == Mode.PRESS_SHIFT_KEY) {
ChatUtils.tellPlayer("Dismounted");
this.toggle();
}
}
}
Aggregations