mirror of https://github.com/kami-blue/client
[cleanup] Reformat code to current style
Signed-off-by: Dominika <sokolov.dominika@gmail.com>
This commit is contained in:
parent
ad034fb9fb
commit
9c0c237650
|
@ -85,7 +85,7 @@ object KamiClickGui : AbstractKamiGui<ModuleSettingWindow, Module>() {
|
|||
val string = typedString.replace(" ", "")
|
||||
setModuleVisibility { moduleButton ->
|
||||
moduleButton.module.name.contains(string, true)
|
||||
|| moduleButton.module.alias.any { it.contains(string, true) }
|
||||
|| moduleButton.module.alias.any { it.contains(string, true) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ object ModuleList : HudElement(
|
|||
override val hudHeight: Float
|
||||
get() = max(toggleMap.values.sumByFloat { it.displayHeight }, 20.0f)
|
||||
|
||||
private var sortedModuleList : Collection<Module> = ModuleManager.modules
|
||||
private var sortedModuleList: Collection<Module> = ModuleManager.modules
|
||||
private val textLineMap = HashMap<Module, TextComponent.TextLine>()
|
||||
private val toggleMap = ModuleManager.modules
|
||||
.associateWith { TimedFlag(false) }
|
||||
|
|
|
@ -15,7 +15,7 @@ object WaterMark : LabelHud(
|
|||
) {
|
||||
|
||||
override val hudWidth: Float get() = (displayText.getWidth() + 2.0f) / scale
|
||||
override val hudHeight: Float get() = displayText.getHeight(2) / scale
|
||||
override val hudHeight: Float get() = displayText.getHeight(2) / scale
|
||||
|
||||
override val closeable: Boolean get() = Capes.isPremium
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@ import me.zeroeightsix.kami.KamiMod
|
|||
import me.zeroeightsix.kami.util.WebUtils
|
||||
import me.zeroeightsix.kami.util.color.ColorConverter
|
||||
import me.zeroeightsix.kami.util.threads.mainScope
|
||||
import net.minecraft.client.gui.*
|
||||
import net.minecraft.client.gui.GuiButton
|
||||
import net.minecraft.client.gui.GuiMainMenu
|
||||
import net.minecraft.client.gui.GuiScreen
|
||||
import net.minecraft.util.text.TextFormatting
|
||||
import org.kamiblue.commons.utils.ConnectionUtils
|
||||
import java.io.IOException
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.event.KamiEventBus;
|
||||
import me.zeroeightsix.kami.event.events.GuiEvent;
|
||||
import me.zeroeightsix.kami.event.events.RenderEvent;
|
||||
import me.zeroeightsix.kami.event.events.ShutdownEvent;
|
||||
import me.zeroeightsix.kami.gui.mc.KamiGuiUpdateNotification;
|
||||
import me.zeroeightsix.kami.module.modules.combat.CrystalAura;
|
||||
import me.zeroeightsix.kami.util.ConfigUtils;
|
||||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package me.zeroeightsix.kami.mixin.client.gui;
|
||||
|
||||
import me.zeroeightsix.kami.module.modules.player.Freecam;
|
||||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.client.GuiIngameForge;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
|
|
@ -4,17 +4,13 @@ import me.zeroeightsix.kami.module.modules.render.CleanGUI;
|
|||
import me.zeroeightsix.kami.module.modules.render.MapPreview;
|
||||
import me.zeroeightsix.kami.module.modules.render.ShulkerPreview;
|
||||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.item.ItemMap;
|
||||
import net.minecraft.item.ItemShulkerBox;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.storage.MapData;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
|
|
@ -47,7 +47,9 @@ public abstract class MixinEntityPlayerSP extends EntityPlayer {
|
|||
@Shadow private boolean serverSneakState;
|
||||
@Shadow private boolean prevOnGround;
|
||||
@Shadow private boolean autoJumpEnabled;
|
||||
@Shadow protected abstract boolean isCurrentViewEntity();
|
||||
|
||||
@Shadow
|
||||
protected abstract boolean isCurrentViewEntity();
|
||||
|
||||
public MixinEntityPlayerSP(World worldIn, GameProfile gameProfileIn) {
|
||||
super(worldIn, gameProfileIn);
|
||||
|
|
|
@ -12,7 +12,6 @@ import me.zeroeightsix.kami.module.modules.render.AntiFog;
|
|||
import me.zeroeightsix.kami.module.modules.render.AntiOverlay;
|
||||
import me.zeroeightsix.kami.module.modules.render.CameraClip;
|
||||
import me.zeroeightsix.kami.module.modules.render.NoHurtCam;
|
||||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
import me.zeroeightsix.kami.util.math.Vec2f;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
|
|
|
@ -29,7 +29,8 @@ public abstract class MixinFontRenderer {
|
|||
@Shadow public float green;
|
||||
@Shadow public float blue;
|
||||
|
||||
@Shadow protected abstract void renderStringAtPos(String text, boolean shadow);
|
||||
@Shadow
|
||||
protected abstract void renderStringAtPos(String text, boolean shadow);
|
||||
|
||||
/**
|
||||
* @author Tiger
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.EnumHandSide;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
|
|
|
@ -6,9 +6,6 @@ import net.minecraft.client.renderer.GLAllocation;
|
|||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerArmorBase;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityArmorStand;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
package me.zeroeightsix.kami.mixin.client.render;
|
||||
|
||||
import me.zeroeightsix.kami.module.modules.render.NoRender;
|
||||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
import net.minecraft.client.gui.MapItemRenderer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.storage.MapData;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.GL_QUADS;
|
||||
|
||||
@Mixin(MapItemRenderer.class)
|
||||
public class MixinMapItemRenderer {
|
||||
@Inject(method = "renderMap", at = @At(value = "HEAD"), cancellable = true)
|
||||
|
|
|
@ -24,8 +24,13 @@ public abstract class MixinModelBiped extends ModelBase {
|
|||
@Shadow public ModelRenderer bipedLeftLeg;
|
||||
@Shadow public ModelBiped.ArmPose leftArmPose;
|
||||
@Shadow public ModelBiped.ArmPose rightArmPose;
|
||||
@Shadow protected abstract EnumHandSide getMainHand(Entity entityIn);
|
||||
@Shadow protected abstract ModelRenderer getArmForSide(EnumHandSide side);
|
||||
|
||||
@Shadow
|
||||
protected abstract EnumHandSide getMainHand(Entity entityIn);
|
||||
|
||||
@Shadow
|
||||
protected abstract ModelRenderer getArmForSide(EnumHandSide side);
|
||||
|
||||
@Shadow public ModelRenderer bipedHeadwear;
|
||||
|
||||
@Inject(method = "setRotationAngles", at = @At("HEAD"), cancellable = true)
|
||||
|
|
|
@ -46,5 +46,5 @@ object ModuleManager : AsyncLoader<List<Class<out Module>>> {
|
|||
}
|
||||
}
|
||||
|
||||
fun getModuleOrNull(moduleName: String?) = moduleName?.let{ moduleSet[it] }
|
||||
fun getModuleOrNull(moduleName: String?) = moduleName?.let { moduleSet[it] }
|
||||
}
|
|
@ -118,8 +118,8 @@ object AntiSpam : Module(
|
|||
|
||||
private fun isSpam(message: String): String? {
|
||||
return if (!filterOwn.value && isOwn(message)
|
||||
|| !filterDMs.value && MessageDetection.Direct.ANY detect message
|
||||
|| !filterServer.value && MessageDetection.Server.ANY detect message) {
|
||||
|| !filterDMs.value && MessageDetection.Direct.ANY detect message
|
||||
|| !filterServer.value && MessageDetection.Server.ANY detect message) {
|
||||
null
|
||||
} else {
|
||||
detectSpam(removeUsername(message))
|
||||
|
|
|
@ -91,9 +91,9 @@ object DiscordNotifs : Module(
|
|||
}
|
||||
|
||||
private fun timeout(message: String) = !timeout.value
|
||||
|| restart.value && MessageDetection.Server.RESTART detect message
|
||||
|| direct.value && MessageDetection.Direct.ANY detect message
|
||||
|| timer.tick(timeoutTime.value.toLong())
|
||||
|| restart.value && MessageDetection.Server.RESTART detect message
|
||||
|| direct.value && MessageDetection.Direct.ANY detect message
|
||||
|| timer.tick(timeoutTime.value.toLong())
|
||||
|
||||
/* Text formatting and misc methods */
|
||||
private fun getPingID(message: String) = if (message == "KamiBlueMessageType1"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package me.zeroeightsix.kami.module.modules.chat
|
||||
|
||||
import me.zeroeightsix.kami.module.Module
|
||||
import me.zeroeightsix.kami.module.modules.chat.ExtraChatHistory.maxMessages
|
||||
import me.zeroeightsix.kami.setting.ModuleConfig.setting
|
||||
|
||||
object ExtraChatHistory : Module(
|
||||
|
|
|
@ -24,14 +24,14 @@ object FancyChat : Module(
|
|||
private val spammer = setting("Spammer", false)
|
||||
|
||||
private val modifier = newMessageModifier(
|
||||
filter = {
|
||||
(commands.value || MessageDetection.Command.ANY detectNot it.packet.message)
|
||||
&& (spammer.value || it.source !is Spammer)
|
||||
},
|
||||
modifier = {
|
||||
val message = getText(it.packet.message)
|
||||
message.substring(0, min(256, message.length))
|
||||
}
|
||||
filter = {
|
||||
(commands.value || MessageDetection.Command.ANY detectNot it.packet.message)
|
||||
&& (spammer.value || it.source !is Spammer)
|
||||
},
|
||||
modifier = {
|
||||
val message = getText(it.packet.message)
|
||||
message.substring(0, min(256, message.length))
|
||||
}
|
||||
)
|
||||
|
||||
init {
|
||||
|
|
|
@ -10,7 +10,6 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats
|
|||
import net.minecraft.util.ResourceLocation
|
||||
import org.kamiblue.commons.extension.ceilToInt
|
||||
import org.lwjgl.opengl.GL11
|
||||
import java.util.*
|
||||
|
||||
object KamiMoji : Module(
|
||||
name = "KamiMoji",
|
||||
|
@ -32,7 +31,7 @@ object KamiMoji : Module(
|
|||
drawEmoji(getEmoji(possible), (posX + x).toDouble(), posY.toDouble(), fontHeight.toFloat(), alpha)
|
||||
}
|
||||
|
||||
text = text.replaceFirst(emojiText.toRegex(), getReplacement(fontHeight))
|
||||
text = text.replaceFirst(emojiText, getReplacement(fontHeight))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ object AimBot : Module(
|
|||
|
||||
init {
|
||||
safeListener<TickEvent.ClientTickEvent> {
|
||||
if (bowOnly.value && player.heldItemMainhand.getItem() != Items.BOW) {
|
||||
if (bowOnly.value && player.heldItemMainhand.item != Items.BOW) {
|
||||
if (autoSwap.value) InventoryUtils.swapSlotToItem(261)
|
||||
return@safeListener
|
||||
}
|
||||
|
|
|
@ -54,13 +54,13 @@ object AntiBot : Module(
|
|||
fun isBot(entity: Entity) = isEnabled && entity is EntityPlayer && botSet.contains(entity)
|
||||
|
||||
private fun SafeClientEvent.isBot(entity: EntityPlayer) = entity.name == player.name
|
||||
|| entity.name == FakePlayer.playerName
|
||||
|| tabList.value && connection.getPlayerInfo(entity.name) == null
|
||||
|| ping.value && connection.getPlayerInfo(entity.name)?.responseTime ?: -1 <= 0
|
||||
|| hp.value && entity.health !in 0f..20f
|
||||
|| sleeping.value && entity.isPlayerSleeping && !entity.onGround
|
||||
|| hoverOnTop.value && hoverCheck(entity)
|
||||
|| entity.ticksExisted < ticksExists.value
|
||||
|| entity.name == FakePlayer.playerName
|
||||
|| tabList.value && connection.getPlayerInfo(entity.name) == null
|
||||
|| ping.value && connection.getPlayerInfo(entity.name)?.responseTime ?: -1 <= 0
|
||||
|| hp.value && entity.health !in 0f..20f
|
||||
|| sleeping.value && entity.isPlayerSleeping && !entity.onGround
|
||||
|| hoverOnTop.value && hoverCheck(entity)
|
||||
|| entity.ticksExisted < ticksExists.value
|
||||
|
||||
private fun SafeClientEvent.hoverCheck(entity: EntityPlayer): Boolean {
|
||||
val distXZ = Vec2d(entity.posX, entity.posZ).minus(player.posX, player.posZ).lengthSquared()
|
||||
|
|
|
@ -77,13 +77,13 @@ object AutoArmor : Module(
|
|||
if (pair.first == -1) continue // Skip if we didn't find a better armor
|
||||
lastTask = if (player.inventoryContainer.inventory[8 - index].isEmpty) {
|
||||
addInventoryTask(
|
||||
PlayerInventoryManager.ClickInfo(0, pair.first, type = ClickType.QUICK_MOVE) // Move the new one into armor slot
|
||||
PlayerInventoryManager.ClickInfo(0, pair.first, type = ClickType.QUICK_MOVE) // Move the new one into armor slot
|
||||
)
|
||||
} else {
|
||||
addInventoryTask(
|
||||
PlayerInventoryManager.ClickInfo(0, 8 - index, type = ClickType.PICKUP), // Pick up the old armor from armor slot
|
||||
PlayerInventoryManager.ClickInfo(0, pair.first, type = ClickType.QUICK_MOVE), // Move the new one into armor slot
|
||||
PlayerInventoryManager.ClickInfo(0, pair.first, type = ClickType.PICKUP) // Put the old one into the empty slot
|
||||
PlayerInventoryManager.ClickInfo(0, 8 - index, type = ClickType.PICKUP), // Pick up the old armor from armor slot
|
||||
PlayerInventoryManager.ClickInfo(0, pair.first, type = ClickType.QUICK_MOVE), // Move the new one into armor slot
|
||||
PlayerInventoryManager.ClickInfo(0, pair.first, type = ClickType.PICKUP) // Put the old one into the empty slot
|
||||
)
|
||||
}
|
||||
break // Don't move more than one at once
|
||||
|
|
|
@ -37,51 +37,51 @@ object AutoEZ : Module(
|
|||
}
|
||||
|
||||
private val hypixelCensorMessages = arrayOf(
|
||||
"Hey Helper, how play game?",
|
||||
"Hello everyone! I am an innocent player who loves everything Hypixel.",
|
||||
"Please go easy on me, this is my first game!",
|
||||
"I like long walks on the beach and playing Hypixel",
|
||||
"Anyone else really like Rick Astley?",
|
||||
"Wait... This isn't what I typed!",
|
||||
"Plz give me doggo memes!",
|
||||
"You’re a great person! Do you want to play some Hypixel games with me?",
|
||||
"Welcome to the hypixel zoo!",
|
||||
"If the Minecraft world is infinite, how is the sun spinning around it?",
|
||||
"Your clicks per second are godly. ",
|
||||
"Maybe we can have a rematch?",
|
||||
"Pineapple doesn't go on pizza!",
|
||||
"ILY <3",
|
||||
"I heard you like Minecraft, so I built a computer in Minecraft in your Minecraft so you can Minecraft while you Minecraft",
|
||||
"Why can't the Ender Dragon read a book? Because he always starts at the End.",
|
||||
"I sometimes try to say bad things then this happens ",
|
||||
"Your personality shines brighter than the sun.",
|
||||
"You are very good at the game friend.",
|
||||
"I like pasta, do you prefer nachos?",
|
||||
"In my free time I like to watch cat videos on youtube",
|
||||
"I heard you like minecraft, so I built a computer so you can minecraft, while minecrafting in your minecraft.",
|
||||
"I like pineapple on my pizza",
|
||||
"You're a great person! Do you want to play some Hypixel games with me?",
|
||||
"I had something to say, then I forgot it.",
|
||||
"Hello everyone! I’m an innocent player who loves everything Hypixel.",
|
||||
"I like Minecraft pvp but you are truly better than me!",
|
||||
"Behold, the great and powerful, my magnificent and almighty nemesis!",
|
||||
"When nothing is right, go left.",
|
||||
"Let’s be friends instead of fighting okay?",
|
||||
"Your Clicks per second are godly.",
|
||||
"If the world in Minecraft is infinite how can the sun revolve around it?",
|
||||
"Blue is greenier than purple for sure",
|
||||
"I sometimes try to say bad things and then this happens :(",
|
||||
"I have really enjoyed playing with you! <3",
|
||||
"What can’t the Ender Dragon read a book? Because he always starts at the End.",
|
||||
"You are very good at this game friend.",
|
||||
"I like to eat pasta, do you prefer nachos?",
|
||||
"Sometimes I sing soppy, love songs in the car.",
|
||||
"I love the way your hair glistens in the light",
|
||||
"When I saw the guy with a potion I knew there was trouble brewing.",
|
||||
"I enjoy long walks on the beach and playing Hypixel",
|
||||
"I need help, teach me how to play!",
|
||||
"What happens if I add chocolate milk to macaroni and cheese?",
|
||||
"Can you paint with all the colors of the wind"
|
||||
"Hey Helper, how play game?",
|
||||
"Hello everyone! I am an innocent player who loves everything Hypixel.",
|
||||
"Please go easy on me, this is my first game!",
|
||||
"I like long walks on the beach and playing Hypixel",
|
||||
"Anyone else really like Rick Astley?",
|
||||
"Wait... This isn't what I typed!",
|
||||
"Plz give me doggo memes!",
|
||||
"You’re a great person! Do you want to play some Hypixel games with me?",
|
||||
"Welcome to the hypixel zoo!",
|
||||
"If the Minecraft world is infinite, how is the sun spinning around it?",
|
||||
"Your clicks per second are godly. ",
|
||||
"Maybe we can have a rematch?",
|
||||
"Pineapple doesn't go on pizza!",
|
||||
"ILY <3",
|
||||
"I heard you like Minecraft, so I built a computer in Minecraft in your Minecraft so you can Minecraft while you Minecraft",
|
||||
"Why can't the Ender Dragon read a book? Because he always starts at the End.",
|
||||
"I sometimes try to say bad things then this happens ",
|
||||
"Your personality shines brighter than the sun.",
|
||||
"You are very good at the game friend.",
|
||||
"I like pasta, do you prefer nachos?",
|
||||
"In my free time I like to watch cat videos on youtube",
|
||||
"I heard you like minecraft, so I built a computer so you can minecraft, while minecrafting in your minecraft.",
|
||||
"I like pineapple on my pizza",
|
||||
"You're a great person! Do you want to play some Hypixel games with me?",
|
||||
"I had something to say, then I forgot it.",
|
||||
"Hello everyone! I’m an innocent player who loves everything Hypixel.",
|
||||
"I like Minecraft pvp but you are truly better than me!",
|
||||
"Behold, the great and powerful, my magnificent and almighty nemesis!",
|
||||
"When nothing is right, go left.",
|
||||
"Let’s be friends instead of fighting okay?",
|
||||
"Your Clicks per second are godly.",
|
||||
"If the world in Minecraft is infinite how can the sun revolve around it?",
|
||||
"Blue is greenier than purple for sure",
|
||||
"I sometimes try to say bad things and then this happens :(",
|
||||
"I have really enjoyed playing with you! <3",
|
||||
"What can’t the Ender Dragon read a book? Because he always starts at the End.",
|
||||
"You are very good at this game friend.",
|
||||
"I like to eat pasta, do you prefer nachos?",
|
||||
"Sometimes I sing soppy, love songs in the car.",
|
||||
"I love the way your hair glistens in the light",
|
||||
"When I saw the guy with a potion I knew there was trouble brewing.",
|
||||
"I enjoy long walks on the beach and playing Hypixel",
|
||||
"I need help, teach me how to play!",
|
||||
"What happens if I add chocolate milk to macaroni and cheese?",
|
||||
"Can you paint with all the colors of the wind"
|
||||
) // Got these from the forums, kinda based -humboldt123
|
||||
|
||||
private val timer = TickTimer(TimeUnit.SECONDS)
|
||||
|
@ -91,7 +91,7 @@ object AutoEZ : Module(
|
|||
init {
|
||||
listener<ClientChatReceivedEvent> {
|
||||
if (detectMode.value != DetectMode.BROADCAST || mc.player == null
|
||||
|| mc.player.isDead || mc.player.health <= 0.0f) return@listener
|
||||
|| mc.player.isDead || mc.player.health <= 0.0f) return@listener
|
||||
|
||||
val message = it.message.unformattedText
|
||||
if (!message.contains(mc.player.name, true)) return@listener
|
||||
|
@ -142,14 +142,14 @@ object AutoEZ : Module(
|
|||
private fun sendHelpMessage() {
|
||||
if (messageMode.value == MessageMode.CUSTOM && customText.value == "unchanged" && timer.tick(5L)) { // 5 seconds delay
|
||||
MessageSendHelper.sendChatMessage("$chatName In order to use the custom $name, " +
|
||||
"please change the CustomText setting in ClickGUI, " +
|
||||
"with '&7\$NAME&f' being the username of the killed player")
|
||||
"please change the CustomText setting in ClickGUI, " +
|
||||
"with '&7\$NAME&f' being the username of the killed player")
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendEzMessage(player: EntityPlayer) {
|
||||
val text = (if (messageMode.value == MessageMode.CUSTOM) customText.value else messageMode.value.text)
|
||||
.replace("\$NAME", player.name).replace("\$HYPIXEL_MESSAGE", hypixelCensorMessages.random())
|
||||
.replace("\$NAME", player.name).replace("\$HYPIXEL_MESSAGE", hypixelCensorMessages.random())
|
||||
sendServerMessage(text)
|
||||
attackedPlayers.remove(player)
|
||||
}
|
||||
|
|
|
@ -53,8 +53,10 @@ object AutoLog : Module(
|
|||
player.health < health.value -> log(HEALTH)
|
||||
totem.value && totemAmount.value > InventoryUtils.countItemAll(449) -> log(TOTEM)
|
||||
crystals.value && checkCrystals() -> log(END_CRYSTAL)
|
||||
creeper.value && checkCreeper() -> { /* checkCreeper() does log() */ }
|
||||
players.value && checkPlayers() -> { /* checkPlayer() does log() */ }
|
||||
creeper.value && checkCreeper() -> { /* checkCreeper() does log() */
|
||||
}
|
||||
players.value && checkPlayers() -> { /* checkPlayer() does log() */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,26 +102,26 @@ object AutoTrap : Module(
|
|||
@Suppress("UNUSED")
|
||||
private enum class TrapMode(val offset: Array<BlockPos>) {
|
||||
FULL_TRAP(arrayOf(
|
||||
BlockPos(1, 0, 0),
|
||||
BlockPos(-1, 0, 0),
|
||||
BlockPos(0, 0, 1),
|
||||
BlockPos(0, 0, -1),
|
||||
BlockPos(1, 1, 0),
|
||||
BlockPos(-1, 1, 0),
|
||||
BlockPos(0, 1, 1),
|
||||
BlockPos(0, 1, -1),
|
||||
BlockPos(0, 2, 0)
|
||||
BlockPos(1, 0, 0),
|
||||
BlockPos(-1, 0, 0),
|
||||
BlockPos(0, 0, 1),
|
||||
BlockPos(0, 0, -1),
|
||||
BlockPos(1, 1, 0),
|
||||
BlockPos(-1, 1, 0),
|
||||
BlockPos(0, 1, 1),
|
||||
BlockPos(0, 1, -1),
|
||||
BlockPos(0, 2, 0)
|
||||
)),
|
||||
CRYSTAL_TRAP(arrayOf(
|
||||
BlockPos(1, 1, 1),
|
||||
BlockPos(1, 1, 0),
|
||||
BlockPos(1, 1, -1),
|
||||
BlockPos(0, 1, -1),
|
||||
BlockPos(-1, 1, -1),
|
||||
BlockPos(-1, 1, 0),
|
||||
BlockPos(-1, 1, 1),
|
||||
BlockPos(0, 1, 1),
|
||||
BlockPos(0, 2, 0)
|
||||
BlockPos(1, 1, 1),
|
||||
BlockPos(1, 1, 0),
|
||||
BlockPos(1, 1, -1),
|
||||
BlockPos(0, 1, -1),
|
||||
BlockPos(-1, 1, -1),
|
||||
BlockPos(-1, 1, 0),
|
||||
BlockPos(-1, 1, 1),
|
||||
BlockPos(0, 1, 1),
|
||||
BlockPos(0, 2, 0)
|
||||
))
|
||||
}
|
||||
}
|
|
@ -110,7 +110,7 @@ object BedAura : Module(
|
|||
|
||||
private fun canRefill(): Boolean {
|
||||
return InventoryUtils.getSlotsHotbar(0) != null
|
||||
&& InventoryUtils.getSlotsNoHotbar(355) != null
|
||||
&& InventoryUtils.getSlotsNoHotbar(355) != null
|
||||
}
|
||||
|
||||
private fun SafeClientEvent.updatePlaceMap() {
|
||||
|
@ -140,10 +140,10 @@ object BedAura : Module(
|
|||
val bedPos1 = pos.up()
|
||||
val bedPos2 = getSecondBedPos(bedPos1)
|
||||
return (!ignoreSecondBaseBlock.value || world.getBlockState(bedPos2.down()).isSideSolid(world, bedPos2.down(), EnumFacing.UP))
|
||||
&& !isFire(bedPos1)
|
||||
&& !isFire(bedPos2)
|
||||
&& world.getBlockState(bedPos1).material.isReplaceable
|
||||
&& (!ignoreSecondBaseBlock.value || world.getBlockState(bedPos2).material.isReplaceable)
|
||||
&& !isFire(bedPos1)
|
||||
&& !isFire(bedPos2)
|
||||
&& world.getBlockState(bedPos1).material.isReplaceable
|
||||
&& (!ignoreSecondBaseBlock.value || world.getBlockState(bedPos2).material.isReplaceable)
|
||||
}
|
||||
|
||||
private fun SafeClientEvent.isFire(pos: BlockPos): Boolean {
|
||||
|
|
|
@ -178,5 +178,5 @@ object CrystalBasePlace : Module(
|
|||
}
|
||||
|
||||
private fun checkDamage(damage: Float, selfDamage: Float, maxCurrentDamage: Float) =
|
||||
selfDamage < CrystalAura.maxSelfDamage && damage > CrystalAura.minDamage && (maxCurrentDamage < CrystalAura.minDamage || damage - maxCurrentDamage >= minDamageInc.value)
|
||||
selfDamage < CrystalAura.maxSelfDamage && damage > CrystalAura.minDamage && (maxCurrentDamage < CrystalAura.minDamage || damage - maxCurrentDamage >= minDamageInc.value)
|
||||
}
|
|
@ -80,9 +80,9 @@ object CrystalESP : Module(
|
|||
}
|
||||
|
||||
private fun checkHeldItem(packet: CPacketPlayerTryUseItemOnBlock) = packet.hand == EnumHand.MAIN_HAND
|
||||
&& mc.player.inventory.getStackInSlot(PlayerPacketManager.serverSideHotbar).getItem() == Items.END_CRYSTAL
|
||||
|| packet.hand == EnumHand.OFF_HAND
|
||||
&& mc.player.heldItemOffhand.getItem() == Items.END_CRYSTAL
|
||||
&& mc.player.inventory.getStackInSlot(PlayerPacketManager.serverSideHotbar).item == Items.END_CRYSTAL
|
||||
|| packet.hand == EnumHand.OFF_HAND
|
||||
&& mc.player.heldItemOffhand.item == Items.END_CRYSTAL
|
||||
|
||||
init {
|
||||
safeListener<TickEvent.ClientTickEvent> { event ->
|
||||
|
@ -117,7 +117,7 @@ object CrystalESP : Module(
|
|||
}
|
||||
|
||||
for (pos in pendingPlacing.keys) {
|
||||
val damage = placeMap[pos]?: continue
|
||||
val damage = placeMap[pos] ?: continue
|
||||
cacheMap[pos] = Quad(damage.first, damage.second, 0.0f, 0.0f)
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,8 @@ object AutoFish : Module(
|
|||
}
|
||||
|
||||
private fun SafeClientEvent.isSplash(packet: SPacketSoundEffect): Boolean {
|
||||
if (mode.value == Mode.SPLASH && (player.fishEntity?.getDistance(packet.x, packet.y, packet.z) ?: 69420.0) > 2) return false
|
||||
if (mode.value == Mode.SPLASH && (player.fishEntity?.getDistance(packet.x, packet.y, packet.z)
|
||||
?: 69420.0) > 2) return false
|
||||
val soundName = packet.sound.soundName.toString().toLowerCase()
|
||||
return (mode.value != Mode.SPLASH && isAnySplash(soundName)) || soundName.contains("entity.bobber.splash")
|
||||
}
|
||||
|
@ -111,7 +112,7 @@ object AutoFish : Module(
|
|||
|
||||
private fun SafeClientEvent.isBouncing(): Boolean {
|
||||
if (player.fishEntity == null || !isOnWater()) return false
|
||||
return (player.fishEntity?.motionY ?: 911.0)!in -0.05..0.05
|
||||
return (player.fishEntity?.motionY ?: 911.0) !in -0.05..0.05
|
||||
}
|
||||
|
||||
private fun catch() {
|
||||
|
|
|
@ -179,7 +179,7 @@ object AutoObsidian : Module(
|
|||
reset()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun SafeClientEvent.updateState() {
|
||||
|
|
|
@ -28,12 +28,12 @@ object CoordsLog : Module(
|
|||
init {
|
||||
safeListener<TickEvent.ClientTickEvent> {
|
||||
if (autoLog.value && timer.tick(delay.value.toLong())) {
|
||||
val currentCoord = player.positionVector.toBlockPos().asString()
|
||||
val currentCoord = player.positionVector.toBlockPos().asString()
|
||||
|
||||
if (currentCoord != previousCoord) {
|
||||
WaypointManager.add("autoLogger")
|
||||
previousCoord = currentCoord
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (saveOnDeath.value) {
|
||||
|
|
|
@ -38,9 +38,9 @@ object AutoRemount : Module(
|
|||
}
|
||||
if (remountTimer.tick(remountDelay.value.toLong())) {
|
||||
world.loadedEntityList.stream()
|
||||
.filter { entity: Entity -> isValidEntity(entity) }
|
||||
.min(compareBy { player.getDistance(it) })
|
||||
.ifPresent { playerController.interactWithEntity(player, it, EnumHand.MAIN_HAND) }
|
||||
.filter { entity: Entity -> isValidEntity(entity) }
|
||||
.min(compareBy { player.getDistance(it) })
|
||||
.ifPresent { playerController.interactWithEntity(player, it, EnumHand.MAIN_HAND) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,12 +48,12 @@ object AutoRemount : Module(
|
|||
private fun SafeClientEvent.isValidEntity(entity: Entity): Boolean {
|
||||
if (entity.getDistance(player) > range.value) return false
|
||||
return entity is EntityBoat && boat.value
|
||||
|| entity is EntityAnimal && !entity.isChild // FBI moment
|
||||
&& (entity is EntityHorse && horse.value
|
||||
|| entity is EntitySkeletonHorse && skeletonHorse.value
|
||||
|| entity is EntityDonkey && donkey.value
|
||||
|| entity is EntityMule && mule.value
|
||||
|| entity is EntityPig && entity.saddled && pig.value
|
||||
|| entity is EntityLlama && llama.value)
|
||||
|| entity is EntityAnimal && !entity.isChild // FBI moment
|
||||
&& (entity is EntityHorse && horse.value
|
||||
|| entity is EntitySkeletonHorse && skeletonHorse.value
|
||||
|| entity is EntityDonkey && donkey.value
|
||||
|| entity is EntityMule && mule.value
|
||||
|| entity is EntityPig && entity.saddled && pig.value
|
||||
|| entity is EntityLlama && llama.value)
|
||||
}
|
||||
}
|
|
@ -102,7 +102,7 @@ object AutoWalk : Module(
|
|||
private fun checkBaritoneElytra() = mc.player?.let {
|
||||
if (it.isElytraFlying && messageTimer.tick(10L)) {
|
||||
MessageSendHelper.sendErrorMessage("$chatName Baritone mode isn't currently compatible with Elytra flying!" +
|
||||
" Choose a different mode if you want to use AutoWalk while Elytra flying")
|
||||
" Choose a different mode if you want to use AutoWalk while Elytra flying")
|
||||
}
|
||||
it.isElytraFlying
|
||||
} ?: true
|
||||
|
|
|
@ -105,7 +105,7 @@ object ElytraFlight : Module(
|
|||
private var elytraDurability = 0
|
||||
private var outOfDurability = false
|
||||
private var wasInLiquid = false
|
||||
var isFlying = false
|
||||
private var isFlying = false
|
||||
private var isPacketFlying = false
|
||||
private var isStandingStillH = false
|
||||
private var isStandingStill = false
|
||||
|
@ -281,20 +281,24 @@ object ElytraFlight : Module(
|
|||
val timerSpeed = if (highPingOptimize) 400.0f else 200.0f
|
||||
val height = if (highPingOptimize) 0.0f else minTakeoffHeight
|
||||
val closeToGround = player.posY <= getGroundPos().y + height && !wasInLiquid && !mc.isSingleplayer
|
||||
|
||||
if (!easyTakeOff || (LagNotifier.paused && LagNotifier.pauseTakeoff) || player.onGround) {
|
||||
if (LagNotifier.paused && LagNotifier.pauseTakeoff && player.posY - getGroundPos().y > 4.0f) holdPlayer(event) /* Holds player in the air if server is lagging and the distance is enough for taking fall damage */
|
||||
reset(player.onGround)
|
||||
return
|
||||
}
|
||||
|
||||
if (player.motionY < 0 && !highPingOptimize || player.motionY < -0.02) {
|
||||
if (closeToGround) {
|
||||
mc.timer.tickLength = 25.0f
|
||||
return
|
||||
}
|
||||
|
||||
if (!highPingOptimize && !wasInLiquid && !mc.isSingleplayer) { /* Cringe moment when you use elytra flight in single player world */
|
||||
event.cancel()
|
||||
player.setVelocity(0.0, -0.02, 0.0)
|
||||
}
|
||||
|
||||
if (timerControl && !mc.isSingleplayer) mc.timer.tickLength = timerSpeed * 2.0f
|
||||
connection.sendPacket(CPacketEntityAction(player, CPacketEntityAction.Action.START_FALL_FLYING))
|
||||
hoverTarget = player.posY + 0.2
|
||||
|
|
|
@ -107,9 +107,9 @@ object ElytraReplace : Module(
|
|||
return
|
||||
} else { // swap chestplate from inventory with whatever you were wearing, if you're already wearing non-armor in chest slot
|
||||
mc.playerController.windowClick(0, 6, 0,
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
mc.playerController.windowClick(0, slot, 0,
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ object ElytraReplace : Module(
|
|||
true
|
||||
} else { // switch non-broken elytra with whatever was previously in the chest slot
|
||||
mc.playerController.windowClick(0, 6, 0,
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
mc.playerController.windowClick(0, slot, 0,
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
ClickType.QUICK_MOVE, mc.player)
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,12 +27,12 @@ object FastFall : Module(
|
|||
init {
|
||||
safeListener<TickEvent.ClientTickEvent> {
|
||||
if (player.onGround
|
||||
|| player.isElytraFlying
|
||||
|| player.isInLava
|
||||
|| player.isInWater
|
||||
|| player.isInWeb
|
||||
|| player.fallDistance < fallDistance.value
|
||||
|| player.capabilities.isFlying) {
|
||||
|| player.isElytraFlying
|
||||
|| player.isInLava
|
||||
|| player.isInWater
|
||||
|| player.isInWeb
|
||||
|| player.fallDistance < fallDistance.value
|
||||
|| player.capabilities.isFlying) {
|
||||
reset()
|
||||
return@safeListener
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ object Step : Module(
|
|||
private fun SafeClientEvent.setStepHeight() {
|
||||
player.stepHeight = if (upStep.value && player.onGround && player.collidedHorizontally) height else defaultHeight
|
||||
player.ridingEntity?.let {
|
||||
it.stepHeight = if (entityStep && it.collidedHorizontally) height else 1.0f
|
||||
it.stepHeight = if (entityStep && it.collidedHorizontally) height else 1.0f
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,10 +57,10 @@ object Strafe : Module(
|
|||
}
|
||||
|
||||
private fun SafeClientEvent.shouldStrafe() = !BaritoneUtils.isPathing
|
||||
&& !player.capabilities.isFlying
|
||||
&& !player.isElytraFlying
|
||||
&& (mc.gameSettings.keyBindSprint.isKeyDown || !onHolding)
|
||||
&& (player.moveForward != 0f || player.moveStrafing != 0f)
|
||||
&& !player.capabilities.isFlying
|
||||
&& !player.isElytraFlying
|
||||
&& (mc.gameSettings.keyBindSprint.isKeyDown || !onHolding)
|
||||
&& (player.moveForward != 0f || player.moveStrafing != 0f)
|
||||
|
||||
private fun reset() {
|
||||
mc.player?.jumpMovementFactor = 0.02F
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
package me.zeroeightsix.kami.module.modules.player
|
||||
|
||||
import me.zeroeightsix.kami.gui.mc.KamiGuiStealButton
|
||||
import me.zeroeightsix.kami.mixin.client.gui.MixinGuiContainer
|
||||
import me.zeroeightsix.kami.module.Module
|
||||
import me.zeroeightsix.kami.module.modules.player.ChestStealer.canSteal
|
||||
import me.zeroeightsix.kami.module.modules.player.ChestStealer.stealing
|
||||
import me.zeroeightsix.kami.setting.ModuleConfig.setting
|
||||
import me.zeroeightsix.kami.util.InventoryUtils
|
||||
import me.zeroeightsix.kami.util.InventoryUtils.getEmptySlotContainer
|
||||
|
@ -55,17 +51,17 @@ object ChestStealer : Module(
|
|||
|
||||
fun isContainerOpen(): Boolean {
|
||||
return mc.player.openContainer != null
|
||||
&& isValidGui()
|
||||
&& isValidGui()
|
||||
}
|
||||
|
||||
fun isValidGui(): Boolean {
|
||||
return mc.currentScreen !is GuiEnchantment
|
||||
&& mc.currentScreen !is GuiMerchant
|
||||
&& mc.currentScreen !is GuiRepair
|
||||
&& mc.currentScreen !is GuiBeacon
|
||||
&& mc.currentScreen !is GuiCrafting
|
||||
&& mc.currentScreen !is GuiContainerCreative
|
||||
&& mc.currentScreen !is GuiInventory
|
||||
&& mc.currentScreen !is GuiMerchant
|
||||
&& mc.currentScreen !is GuiRepair
|
||||
&& mc.currentScreen !is GuiBeacon
|
||||
&& mc.currentScreen !is GuiCrafting
|
||||
&& mc.currentScreen !is GuiContainerCreative
|
||||
&& mc.currentScreen !is GuiInventory
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
|
|
@ -79,10 +79,10 @@ object FastUse : Module(
|
|||
|
||||
private fun passItemCheck(item: Item): Boolean {
|
||||
return item !is ItemAir
|
||||
&& (allItems.value && item !is ItemBlock
|
||||
|| blocks.value && item is ItemBlock
|
||||
|| expBottles.value && item is ItemExpBottle
|
||||
|| endCrystals.value && item is ItemEndCrystal
|
||||
|| fireworks.value && item is ItemFirework)
|
||||
&& (allItems.value && item !is ItemBlock
|
||||
|| blocks.value && item is ItemBlock
|
||||
|| expBottles.value && item is ItemExpBottle
|
||||
|| endCrystals.value && item is ItemEndCrystal
|
||||
|| fireworks.value && item is ItemFirework)
|
||||
}
|
||||
}
|
|
@ -86,7 +86,7 @@ object PacketLogger : Module(
|
|||
}
|
||||
|
||||
init {
|
||||
clear.consumers.add{ _, input ->
|
||||
clear.consumers.add { _, input ->
|
||||
if (input) {
|
||||
lines.clear()
|
||||
write()
|
||||
|
|
|
@ -85,6 +85,7 @@ object Scaffold : Module(
|
|||
private val SafeClientEvent.shouldTower: Boolean
|
||||
get() = !player.onGround
|
||||
&& player.posY - floor(player.posY) <= 0.1
|
||||
|
||||
init {
|
||||
safeListener<OnUpdateWalkingPlayerEvent> { event ->
|
||||
if (event.phase != Phase.PRE) return@safeListener
|
||||
|
|
|
@ -22,9 +22,9 @@ object Timer : Module(
|
|||
}
|
||||
|
||||
safeListener<TickEvent.ClientTickEvent> {
|
||||
mc.timer.tickLength = 50.0f /
|
||||
if (!slow) tickNormal
|
||||
else (tickSlow / 10.0f)
|
||||
mc.timer.tickLength = 50.0f /
|
||||
if (!slow) tickNormal
|
||||
else (tickSlow / 10.0f)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -61,8 +61,8 @@ object ViewLock : Module(
|
|||
changeDirection(yawChange, pitchChange)
|
||||
|
||||
return Vec2f(
|
||||
if (yaw.value && disableMouseYaw.value) 0.0f else deltaX,
|
||||
if (pitch.value && disableMousePitch.value) 0.0f else deltaY
|
||||
if (yaw.value && disableMouseYaw.value) 0.0f else deltaX,
|
||||
if (pitch.value && disableMousePitch.value) 0.0f else deltaY
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ object ViewLock : Module(
|
|||
if (isEnabled && autoPitch.value) snapToNext()
|
||||
}
|
||||
|
||||
with( {_: Boolean ,it: Boolean -> if (isEnabled && it) snapToNext()}) {
|
||||
with({ _: Boolean, it: Boolean -> if (isEnabled && it) snapToNext() }) {
|
||||
autoPitch.valueListeners.add(this)
|
||||
autoYaw.valueListeners.add(this)
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.render
|
|||
|
||||
import me.zeroeightsix.kami.module.Module
|
||||
import me.zeroeightsix.kami.setting.ModuleConfig.setting
|
||||
import me.zeroeightsix.kami.util.Wrapper.player
|
||||
|
||||
/**
|
||||
* Created by 086 on 9/04/2018.
|
||||
|
|
|
@ -24,7 +24,7 @@ object ArmorHide : Module(
|
|||
|
||||
@JvmStatic
|
||||
fun shouldHide(slotIn: EntityEquipmentSlot, entity: EntityLivingBase): Boolean {
|
||||
return when(entity) {
|
||||
return when (entity) {
|
||||
is EntityPlayer -> player && shouldHidePiece(slotIn)
|
||||
is EntityArmorStand -> armorStands && shouldHidePiece(slotIn)
|
||||
is EntityMob -> mobs && shouldHidePiece(slotIn)
|
||||
|
@ -34,8 +34,8 @@ object ArmorHide : Module(
|
|||
|
||||
private fun shouldHidePiece(slotIn: EntityEquipmentSlot): Boolean {
|
||||
return helmet && slotIn == EntityEquipmentSlot.HEAD
|
||||
|| chestplate && slotIn == EntityEquipmentSlot.CHEST
|
||||
|| leggings && slotIn == EntityEquipmentSlot.LEGS
|
||||
|| boots && slotIn == EntityEquipmentSlot.FEET
|
||||
|| chestplate && slotIn == EntityEquipmentSlot.CHEST
|
||||
|| leggings && slotIn == EntityEquipmentSlot.LEGS
|
||||
|| boots && slotIn == EntityEquipmentSlot.FEET
|
||||
}
|
||||
}
|
|
@ -86,23 +86,23 @@ object BossStack : Module(
|
|||
}
|
||||
|
||||
private fun getClosestBoss(name: String?) =
|
||||
mc.world?.loadedEntityList?.let {
|
||||
var closest = Float.MAX_VALUE
|
||||
var closestBoss: EntityLivingBase? = null
|
||||
mc.world?.loadedEntityList?.let {
|
||||
var closest = Float.MAX_VALUE
|
||||
var closestBoss: EntityLivingBase? = null
|
||||
|
||||
for (entity in it) {
|
||||
if (entity !is EntityLivingBase) continue
|
||||
if (entity.isNonBoss) continue
|
||||
if (name != null && entity.displayName.formattedText != name) continue
|
||||
for (entity in it) {
|
||||
if (entity !is EntityLivingBase) continue
|
||||
if (entity.isNonBoss) continue
|
||||
if (name != null && entity.displayName.formattedText != name) continue
|
||||
|
||||
val dist = entity.getDistance(mc.player)
|
||||
if (dist >= closest) continue
|
||||
val dist = entity.getDistance(mc.player)
|
||||
if (dist >= closest) continue
|
||||
|
||||
closest = dist
|
||||
closestBoss = entity
|
||||
}
|
||||
closestBoss
|
||||
closest = dist
|
||||
closestBoss = entity
|
||||
}
|
||||
closestBoss
|
||||
}
|
||||
|
||||
private fun drawHealthBar() {
|
||||
mc.profiler.startSection("bossHealth")
|
||||
|
|
|
@ -100,7 +100,7 @@ object BreakingESP : Module(
|
|||
breakingBlockList.putIfAbsent(it.breakId, Triple(it.position, it.progress, Pair(false, render)))
|
||||
breakingBlockList.computeIfPresent(it.breakId) { _, triple -> Triple(it.position, it.progress, triple.third) }
|
||||
if (warning.value && (mc.player != breaker || warnSelf.value) && it.progress >= warningProgress.value && !breakingBlockList[it.breakId]!!.third.first
|
||||
&& ((obsidianOnly.value && mc.world.getBlockState(it.position).block == Blocks.OBSIDIAN) || !obsidianOnly.value)) {
|
||||
&& ((obsidianOnly.value && mc.world.getBlockState(it.position).block == Blocks.OBSIDIAN) || !obsidianOnly.value)) {
|
||||
if (soundWarn.value) mc.soundHandler.playSound(PositionedSoundRecord.getRecord(SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0f, 1.0f))
|
||||
warningText = "${breaker.name} is breaking near you!"
|
||||
if (chatWarn.value) sendChatMessage(warningText)
|
||||
|
|
|
@ -101,12 +101,12 @@ object Chams : Module(
|
|||
|
||||
private fun checkEntityType(entity: Entity): Boolean {
|
||||
return (self.value || entity != mc.player) && (all.value
|
||||
|| experience.value && entity is EntityXPOrb
|
||||
|| arrows.value && entity is EntityArrow
|
||||
|| throwable.value && entity is EntityThrowable
|
||||
|| items.value && entity is EntityItem
|
||||
|| crystals.value && entity is EntityEnderCrystal
|
||||
|| players.value && entity is EntityPlayer && EntityUtils.playerTypeCheck(entity, friends.value, sleeping.value)
|
||||
|| mobTypeSettings(entity, mobs.value, passive.value, neutral.value, hostile.value))
|
||||
|| experience.value && entity is EntityXPOrb
|
||||
|| arrows.value && entity is EntityArrow
|
||||
|| throwable.value && entity is EntityThrowable
|
||||
|| items.value && entity is EntityItem
|
||||
|| crystals.value && entity is EntityEnderCrystal
|
||||
|| players.value && entity is EntityPlayer && EntityUtils.playerTypeCheck(entity, friends.value, sleeping.value)
|
||||
|| mobTypeSettings(entity, mobs.value, passive.value, neutral.value, hostile.value))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,9 +194,9 @@ object ESP : Module(
|
|||
if (entity == player) continue
|
||||
if (player.getDistance(entity) > range) continue
|
||||
if (entity is EntityXPOrb && experience
|
||||
|| entity is EntityArrow && arrows
|
||||
|| entity is EntityThrowable && throwable
|
||||
|| entity is EntityItem && items) {
|
||||
|| entity is EntityArrow && arrows
|
||||
|| entity is EntityThrowable && throwable
|
||||
|| entity is EntityItem && items) {
|
||||
entityList.add(entity)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package me.zeroeightsix.kami.module.modules.render
|
||||
|
||||
import me.zeroeightsix.kami.module.Module
|
||||
import me.zeroeightsix.kami.module.modules.render.ExtraTab.tabSize
|
||||
import me.zeroeightsix.kami.setting.ModuleConfig.setting
|
||||
|
||||
object ExtraTab : Module(
|
||||
|
|
|
@ -87,7 +87,7 @@ object EyeFinder : Module(
|
|||
|
||||
private fun getRaytraceResult(entity: Entity): RayTraceResult? {
|
||||
var result = entity.rayTrace(5.0, Minecraft.getMinecraft().renderPartialTicks)
|
||||
?: return null /* Raytrace for block */
|
||||
?: return null /* Raytrace for block */
|
||||
if (result.typeOfHit == RayTraceResult.Type.MISS) { /* Raytrace for entity */
|
||||
val eyePos = entity.getPositionEyes(mc.renderPartialTicks)
|
||||
val entityLookVec = entity.getLook(mc.renderPartialTicks).scale(5.0)
|
||||
|
|
|
@ -43,7 +43,7 @@ object FullBright : Module(
|
|||
}
|
||||
|
||||
isDisabled && gammaSetting != oldValue
|
||||
&& !disableTimer.tick((transitionLength * 1000.0f).toLong(), false) -> {
|
||||
&& !disableTimer.tick((transitionLength * 1000.0f).toLong(), false) -> {
|
||||
transition(oldValue)
|
||||
}
|
||||
|
||||
|
|
|
@ -113,17 +113,17 @@ object Nametags : Module(
|
|||
}
|
||||
|
||||
private val pingColorGradient = ColorGradient(
|
||||
0f to ColorHolder(101, 101, 101),
|
||||
0.1f to ColorHolder(20, 232, 20),
|
||||
20f to ColorHolder(20, 232, 20),
|
||||
150f to ColorHolder(20, 232, 20),
|
||||
300f to ColorHolder(150, 0, 0)
|
||||
0f to ColorHolder(101, 101, 101),
|
||||
0.1f to ColorHolder(20, 232, 20),
|
||||
20f to ColorHolder(20, 232, 20),
|
||||
150f to ColorHolder(20, 232, 20),
|
||||
300f to ColorHolder(150, 0, 0)
|
||||
)
|
||||
|
||||
private val healthColorGradient = ColorGradient(
|
||||
0f to ColorHolder(180, 20, 20),
|
||||
50f to ColorHolder(240, 220, 20),
|
||||
100f to ColorHolder(20, 232, 20)
|
||||
0f to ColorHolder(180, 20, 20),
|
||||
50f to ColorHolder(240, 220, 20),
|
||||
100f to ColorHolder(20, 232, 20)
|
||||
)
|
||||
|
||||
private val line1Settings = arrayOf(line1left, line1center, line1right)
|
||||
|
@ -271,9 +271,9 @@ object Nametags : Module(
|
|||
}
|
||||
|
||||
private fun getEnumHand(enumHandSide: EnumHandSide) =
|
||||
if (mc.gameSettings.mainHand == enumHandSide && mainHand.value) EnumHand.MAIN_HAND
|
||||
else if (mc.gameSettings.mainHand != enumHandSide && offhand.value) EnumHand.OFF_HAND
|
||||
else null
|
||||
if (mc.gameSettings.mainHand == enumHandSide && mainHand.value) EnumHand.MAIN_HAND
|
||||
else if (mc.gameSettings.mainHand != enumHandSide && offhand.value) EnumHand.OFF_HAND
|
||||
else null
|
||||
|
||||
private fun drawFrame(vertexHelper: VertexHelper, posBegin: Vec2d, posEnd: Vec2d) {
|
||||
if (cornerRadius.value == 0f) {
|
||||
|
@ -421,18 +421,18 @@ object Nametags : Module(
|
|||
private fun getTextColor() = ColorHolder(rText.value, gText.value, bText.value, aText.value)
|
||||
|
||||
private fun getEntityType(entity: Entity) = entity.javaClass.simpleName.replace("Entity", "")
|
||||
.replace("Other", "")
|
||||
.replace("MP", "")
|
||||
.replace("SP", "")
|
||||
.replace(" ", "")
|
||||
.replace("Other", "")
|
||||
.replace("MP", "")
|
||||
.replace("SP", "")
|
||||
.replace(" ", "")
|
||||
|
||||
private fun getHpColor(entity: EntityLivingBase) = healthColorGradient.get((entity.health / entity.maxHealth) * 100f).apply { a = aText.value }
|
||||
|
||||
fun checkEntityType(entity: Entity) = (self.value || entity != mc.renderViewEntity)
|
||||
&& (!entity.isInvisible || invisible.value)
|
||||
&& (entity is EntityXPOrb && experience.value
|
||||
|| entity is EntityPlayer && players.value && EntityUtils.playerTypeCheck(entity, friend = true, sleeping = true)
|
||||
|| EntityUtils.mobTypeSettings(entity, mobs.value, passive.value, neutral.value, hostile.value))
|
||||
&& (!entity.isInvisible || invisible.value)
|
||||
&& (entity is EntityXPOrb && experience.value
|
||||
|| entity is EntityPlayer && players.value && EntityUtils.playerTypeCheck(entity, friend = true, sleeping = true)
|
||||
|| EntityUtils.mobTypeSettings(entity, mobs.value, passive.value, neutral.value, hostile.value))
|
||||
|
||||
private class ItemGroup {
|
||||
private val itemSet = HashSet<EntityItem>()
|
||||
|
|
|
@ -47,7 +47,7 @@ object NewChunks : Module(
|
|||
private val green = setting("Green", 255, 0..255, 1, { customColor.value && isWorldMode })
|
||||
private val blue = setting("Blue", 255, 0..255, 1, { customColor.value && isWorldMode })
|
||||
private val range = setting("RenderRange", 256, 64..1024, 64)
|
||||
val radarScale = setting("RadarScale", 2.0,1.0..10.0, 0.1, { isRadarMode })
|
||||
val radarScale = setting("RadarScale", 2.0, 1.0..10.0, 0.1, { isRadarMode })
|
||||
private val removeMode = setting("RemoveMode", RemoveMode.MAX_NUM)
|
||||
private val maxNum = setting("MaxNum", 10000, 1000..100000, 1000, { removeMode.value == RemoveMode.MAX_NUM })
|
||||
|
||||
|
@ -199,7 +199,7 @@ object NewChunks : Module(
|
|||
}
|
||||
file = File(file, "newChunkLogs")
|
||||
val date = SimpleDateFormat("yyyy-MM-dd_HH-mm-ss").format(Date())
|
||||
file = File(file, mc.getSession().username + "_" + date + ".csv") // maybe dont safe the name actually. But I also dont want to make another option...
|
||||
file = File(file, mc.session.username + "_" + date + ".csv") // maybe dont safe the name actually. But I also dont want to make another option...
|
||||
val rV = file.toPath()
|
||||
try {
|
||||
if (!Files.exists(rV)) { // ovsly always...
|
||||
|
@ -308,10 +308,10 @@ object NewChunks : Module(
|
|||
fun testChange(): Boolean {
|
||||
// these somehow include the test whether its null
|
||||
return saveOption.value != lastSaveOption
|
||||
|| saveInRegionFolder.value != lastInRegion
|
||||
|| alsoSaveNormalCoords.value != lastSaveNormal
|
||||
|| dimension != mc.player.dimension
|
||||
|| mc.currentServerData?.serverIP != ip
|
||||
|| saveInRegionFolder.value != lastInRegion
|
||||
|| alsoSaveNormalCoords.value != lastSaveNormal
|
||||
|| dimension != mc.player.dimension
|
||||
|| mc.currentServerData?.serverIP != ip
|
||||
}
|
||||
|
||||
private fun update() {
|
||||
|
|
|
@ -45,14 +45,16 @@ object SelectionHighlight : Module(
|
|||
val lookVec = viewEntity.lookVec
|
||||
val sightEnd = eyePos.add(lookVec.scale(6.0))
|
||||
val hitSide = hitObject.entityHit?.entityBoundingBox?.calculateIntercept(eyePos, sightEnd)?.sideHit
|
||||
val side = (if (hitSideOnly.value) GeometryMasks.FACEMAP[hitSide] else GeometryMasks.Quad.ALL)?: return@listener
|
||||
val side = (if (hitSideOnly.value) GeometryMasks.FACEMAP[hitSide] else GeometryMasks.Quad.ALL)
|
||||
?: return@listener
|
||||
renderer.add(hitObject.entityHit, color, side)
|
||||
}
|
||||
|
||||
if (block.value && hitObject.typeOfHit == Type.BLOCK) {
|
||||
val blockState = mc.world.getBlockState(hitObject.blockPos)
|
||||
val box = blockState.getSelectedBoundingBox(mc.world, hitObject.blockPos) ?: return@listener
|
||||
val side = (if (hitSideOnly.value) GeometryMasks.FACEMAP[hitObject.sideHit] else GeometryMasks.Quad.ALL)?: return@listener
|
||||
val side = (if (hitSideOnly.value) GeometryMasks.FACEMAP[hitObject.sideHit] else GeometryMasks.Quad.ALL)
|
||||
?: return@listener
|
||||
renderer.add(box.grow(0.002), color, side)
|
||||
}
|
||||
renderer.render(true)
|
||||
|
|
|
@ -2,10 +2,11 @@ package me.zeroeightsix.kami.module.modules.render
|
|||
|
||||
import me.zeroeightsix.kami.mixin.client.gui.MixinGuiScreen
|
||||
import me.zeroeightsix.kami.module.Module
|
||||
import me.zeroeightsix.kami.util.color.ColorConverter
|
||||
import me.zeroeightsix.kami.util.color.ColorHolder
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.client.renderer.*
|
||||
import net.minecraft.client.renderer.BufferBuilder
|
||||
import net.minecraft.client.renderer.GlStateManager
|
||||
import net.minecraft.client.renderer.RenderHelper
|
||||
import net.minecraft.client.renderer.Tessellator
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats
|
||||
import net.minecraft.inventory.ItemStackHelper
|
||||
import net.minecraft.item.ItemShulkerBox
|
||||
|
|
|
@ -57,7 +57,8 @@ object Trajectories : Module(
|
|||
}
|
||||
|
||||
listener<RenderWorldEvent> {
|
||||
val type = getThrowingType(mc.player?.heldItemMainhand) ?: getThrowingType(mc.player?.heldItemOffhand) ?: return@listener
|
||||
val type = getThrowingType(mc.player?.heldItemMainhand) ?: getThrowingType(mc.player?.heldItemOffhand)
|
||||
?: return@listener
|
||||
val path = ArrayList<Vec3d>()
|
||||
val flightPath = FlightPath(type)
|
||||
path.add(flightPath.position)
|
||||
|
|
|
@ -49,8 +49,8 @@ object WaypointRender : Module(
|
|||
private val outline = setting("Outline", true, { page.value == Page.ESP })
|
||||
private val tracer = setting("Tracer", true, { page.value == Page.ESP })
|
||||
private val r = setting("Red", 31, 0..255, 1, { page.value == Page.ESP })
|
||||
private val g = setting("Green",200, 0..255, 1, { page.value == Page.ESP })
|
||||
private val b = setting("Blue",63, 0..255, 1, { page.value == Page.ESP })
|
||||
private val g = setting("Green", 200, 0..255, 1, { page.value == Page.ESP })
|
||||
private val b = setting("Blue", 63, 0..255, 1, { page.value == Page.ESP })
|
||||
private val aFilled = setting("FilledAlpha", 63, 0..255, 1, { page.value == Page.ESP && filled.value })
|
||||
private val aOutline = setting("OutlineAlpha", 160, 0..255, 1, { page.value == Page.ESP && outline.value })
|
||||
private val aTracer = setting("TracerAlpha", 200, 0..255, 1, { page.value == Page.ESP && tracer.value })
|
||||
|
|
|
@ -25,11 +25,12 @@ object EntityUtils {
|
|||
val Entity.flooredPosition get() = BlockPos(floor(posX).toInt(), floor(posY).toInt(), floor(posZ).toInt())
|
||||
val Entity.prevPosVector get() = Vec3d(this.prevPosX, this.prevPosY, this.prevPosZ)
|
||||
|
||||
val Entity.isPassive get() = this is EntityAnimal
|
||||
|| this is EntityAgeable
|
||||
|| this is EntityTameable
|
||||
|| this is EntityAmbientCreature
|
||||
|| this is EntitySquid
|
||||
val Entity.isPassive
|
||||
get() = this is EntityAnimal
|
||||
|| this is EntityAgeable
|
||||
|| this is EntityTameable
|
||||
|| this is EntityAmbientCreature
|
||||
|| this is EntitySquid
|
||||
|
||||
val Entity.isNeutral get() = isNeutralMob(this) && !isMobAggressive(this)
|
||||
|
||||
|
@ -111,7 +112,7 @@ object EntityUtils {
|
|||
}
|
||||
|
||||
fun playerTypeCheck(player: EntityPlayer, friend: Boolean, sleeping: Boolean) = (friend || !FriendManager.isFriend(player.name))
|
||||
&& (sleeping || !player.isPlayerSleeping)
|
||||
&& (sleeping || !player.isPlayerSleeping)
|
||||
|
||||
/**
|
||||
* Ray tracing the 8 vertex of the entity bounding box
|
||||
|
|
|
@ -2,7 +2,7 @@ package me.zeroeightsix.kami.util
|
|||
|
||||
open class Timer {
|
||||
var time = currentTime; protected set
|
||||
|
||||
|
||||
protected val currentTime get() = System.currentTimeMillis()
|
||||
|
||||
fun reset(offset: Long = 0L) {
|
||||
|
|
|
@ -132,17 +132,17 @@ object WorldUtils {
|
|||
return Vec3d(vec.x * 0.5 + 0.5, vec.y * 0.5 + 0.5, vec.z * 0.5 + 0.5)
|
||||
}
|
||||
|
||||
fun SafeClientEvent.rayTraceHitVec(pos: BlockPos) : RayTraceResult? {
|
||||
fun SafeClientEvent.rayTraceHitVec(pos: BlockPos): RayTraceResult? {
|
||||
val eyePos = player.getPositionEyes(1f)
|
||||
val bb = world.getBlockState(pos).getSelectedBoundingBox(world, pos)
|
||||
|
||||
return world.rayTraceBlocks(eyePos, bb.center, false, false, true)?.takeIf {
|
||||
it.isEqualTo(pos)
|
||||
} ?: bb.corners(0.95).mapNotNull { corner ->
|
||||
world.rayTraceBlocks(eyePos, corner, false, false, true)?.takeIf { it.isEqualTo(pos) }
|
||||
}.minByOrNull {
|
||||
it.hitVec?.distanceTo(eyePos) ?: 69420.0
|
||||
}
|
||||
it.isEqualTo(pos)
|
||||
} ?: bb.corners(0.95).mapNotNull { corner ->
|
||||
world.rayTraceBlocks(eyePos, corner, false, false, true)?.takeIf { it.isEqualTo(pos) }
|
||||
}.minByOrNull {
|
||||
it.hitVec?.distanceTo(eyePos) ?: 69420.0
|
||||
}
|
||||
}
|
||||
|
||||
private fun RayTraceResult.isEqualTo(pos: BlockPos) = typeOfHit == RayTraceResult.Type.BLOCK && blockPos == pos
|
||||
|
|
|
@ -15,7 +15,7 @@ val AxisAlignedBB.zLength get() = maxY - minY
|
|||
|
||||
val AxisAlignedBB.lengths get() = Vec3d(xLength, yLength, zLength)
|
||||
|
||||
fun AxisAlignedBB.corners(scale: Double) : Array<Vec3d> {
|
||||
fun AxisAlignedBB.corners(scale: Double): Array<Vec3d> {
|
||||
val growSizes = lengths * (scale - 1.0)
|
||||
return grow(growSizes.x, growSizes.y, growSizes.z).corners()
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ fun AxisAlignedBB.corners() = arrayOf(
|
|||
Vec3d(maxX, maxY, maxZ),
|
||||
)
|
||||
|
||||
fun AxisAlignedBB.side(side: EnumFacing, scale: Double = 0.5) : Vec3d {
|
||||
fun AxisAlignedBB.side(side: EnumFacing, scale: Double = 0.5): Vec3d {
|
||||
val lengths = lengths
|
||||
val sideDirectionVec = side.directionVec.toVec3d()
|
||||
return lengths * sideDirectionVec * scale + center
|
||||
|
|
Loading…
Reference in New Issue