use of net.ccbluex.liquidbounce.event.EventTarget in project LiquidBouncePlus by WYSI-Foundation.
the class ForceUnicodeChat method onPacket.
@EventTarget
public void onPacket(final PacketEvent event) {
if (event.getPacket() instanceof C01PacketChatMessage) {
final C01PacketChatMessage chatMessage = (C01PacketChatMessage) event.getPacket();
final String message = chatMessage.getMessage();
final StringBuilder stringBuilder = new StringBuilder();
// prevent from wtf did i just done xD
if (message.startsWith("/") || message.startsWith(LiquidBounce.commandManager.getPrefix() + ""))
return;
for (char c : message.toCharArray()) if (c >= 33 && c <= 128 && (!randomAssignValue.get() || RandomUtils.nextBoolean()))
stringBuilder.append(Character.toChars(c + 65248));
else
stringBuilder.append(c);
chatMessage.message = stringBuilder.toString();
}
}
use of net.ccbluex.liquidbounce.event.EventTarget in project LiquidBouncePlus by WYSI-Foundation.
the class Plugins method onPacket.
@EventTarget
public void onPacket(PacketEvent event) {
if (event.getPacket() instanceof S3APacketTabComplete) {
final S3APacketTabComplete s3APacketTabComplete = (S3APacketTabComplete) event.getPacket();
final List<String> plugins = new ArrayList<>();
final String[] commands = s3APacketTabComplete.func_149630_c();
for (final String command1 : commands) {
final String[] command = command1.split(":");
if (command.length > 1) {
final String pluginName = command[0].replace("/", "");
if (!plugins.contains(pluginName))
plugins.add(pluginName);
}
}
Collections.sort(plugins);
if (!plugins.isEmpty())
ClientUtils.displayChatMessage("§aPlugins §7(§8" + plugins.size() + "§7): §c" + Strings.join(plugins.toArray(new String[0]), "§7, §c"));
else
ClientUtils.displayChatMessage("§cNo plugins found.");
setState(false);
tickTimer.reset();
}
}
use of net.ccbluex.liquidbounce.event.EventTarget in project LiquidBouncePlus by WYSI-Foundation.
the class ItemTeleport method onUpdate.
@EventTarget
public void onUpdate(final UpdateEvent event) {
if (mc.currentScreen == null && Mouse.isButtonDown(Arrays.asList(buttonValue.getValues()).indexOf(buttonValue.get())) && delay <= 0) {
endPos = objectPosition.getBlockPos();
if (BlockUtils.getBlock(endPos).getMaterial() == Material.air) {
endPos = null;
return;
}
ClientUtils.displayChatMessage("§7[§8§lItemTeleport§7] §3Position was set to §8" + endPos.getX() + "§3, §8" + endPos.getY() + "§3, §8" + endPos.getZ());
delay = 6;
}
if (delay > 0)
--delay;
if (endPos != null && mc.thePlayer.isSneaking()) {
if (!mc.thePlayer.onGround) {
final double endX = (double) endPos.getX() + 0.5D;
final double endY = (double) endPos.getY() + 1D;
final double endZ = (double) endPos.getZ() + 0.5D;
switch(modeValue.get().toLowerCase()) {
case "old":
for (final Vector3f vector3f : vanillaTeleportPositions(endX, endY, endZ, 4D)) mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(vector3f.getX(), vector3f.getY(), vector3f.getZ(), false));
break;
case "new":
for (final Vector3f vector3f : vanillaTeleportPositions(endX, endY, endZ, 5D)) {
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(vector3f.x, vector3f.y, vector3f.z, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 4.0, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(vector3f.x, vector3f.y, vector3f.z, true));
MovementUtils.forward(0.04);
}
break;
}
if (resetAfterTp.get())
endPos = null;
ClientUtils.displayChatMessage("§7[§8§lItemTeleport§7] §3Tried to collect items");
} else
mc.thePlayer.jump();
}
}
use of net.ccbluex.liquidbounce.event.EventTarget in project LiquidBouncePlus by WYSI-Foundation.
the class AutoHypixel method onRender2D.
@EventTarget
public void onRender2D(Render2DEvent event) {
if (checkValue.get() && !gameMode.toLowerCase().contains("skywars"))
return;
ScaledResolution sc = new ScaledResolution(mc);
float middleX = sc.getScaledWidth() / 2F;
String detail = "Next game in " + dFormat.format((float) timer.hasTimeLeft(delayValue.get()) / 1000F) + "s...";
float middleWidth = Fonts.font40.getStringWidth(detail) / 2F;
float strength = MathHelper.clamp_float((float) timer.hasTimeLeft(delayValue.get()) / delayValue.get(), 0F, 1F);
float wid = strength * (5F + middleWidth) * 2F;
posY = AnimationUtils.animate(shouldChangeGame ? 10F : -20F, posY, 0.25F * 0.05F * RenderUtils.deltaTime);
if (!renderValue.get() || posY < -15)
return;
Stencil.write(true);
RenderUtils.drawRoundedRect(middleX - 5F - middleWidth, posY, middleX + 5F + middleWidth, posY + 15F, 3F, 0xA0000000);
Stencil.erase(true);
RenderUtils.drawRect(middleX - 5F - middleWidth, posY, middleX - 5F - middleWidth + wid, posY + 15F, new Color(0.4F, 0.8F, 0.4F, 0.35F).getRGB());
Stencil.dispose();
GlStateManager.resetColor();
Fonts.fontSFUI40.drawString(detail, middleX - middleWidth - 1F, posY + 4F, -1);
}
use of net.ccbluex.liquidbounce.event.EventTarget in project LiquidBouncePlus by WYSI-Foundation.
the class AutoHypixel method onMotion.
@EventTarget
public void onMotion(MotionEvent event) {
if ((!checkValue.get() || gameMode.toLowerCase().contains("skywars")) && shouldChangeGame && timer.hasTimePassed(delayValue.get())) {
if (antiAtlasValue.get()) {
for (EntityPlayer entity : (List<EntityPlayer>) mc.theWorld.playerEntities) {
if (entity == null && (mc.thePlayer.ticksExisted % 10 == 0 || entity == mc.thePlayer))
continue;
if (!LiquidBounce.moduleManager.getModule(AntiBot.class).getState() || !AntiBot.isBot(entity)) {
mc.thePlayer.sendChatMessage("/wdr " + entity.getName() + (useOtherWord ? " ka,speed,velocity" : " aimbot,safewalk"));
useOtherWord = !useOtherWord;
}
}
}
mc.thePlayer.sendChatMessage("/play " + modeValue.get().toLowerCase() + (modeValue.get().equalsIgnoreCase("ranked") ? "_normal" : modeValue.get().equalsIgnoreCase("mega") ? "_" + megaValue.get().toLowerCase() : "_" + soloTeamsValue.get().toLowerCase()));
shouldChangeGame = false;
}
if (!shouldChangeGame)
timer.reset();
}
Aggregations