@clawd21 It won't work since it requires Core.lib which isn't compatible with the latest LB versions.
FaaatPotato
Posts
-
-
@FaaatPotato Actually it is too cool to not be used. So I included your way of doing it and you can whitelist items via text setting
///api_version=2 (script = registerScript({ name: "DepositFish", version: "1.0", authors: ["some fisherman"] })); var GuiChest = Java.type("net.minecraft.client.gui.inventory.GuiChest"), ItemFish = Java.type("net.minecraft.item.ItemFishFood") script.registerModule({ name: "DepositFish", category: "Misc", description: "Stores fish lol", settings: { modeValue: mode = Setting.list({ name: "Mode", values: ["FaaatPotato", "ToolTip"], default: "FaaatPotato" }), itemsValue: items = Setting.text({ name: "ItemsToStore", default: "fish", isSupported: function() { return mode.get() == "ToolTip" } }) } }, function (module) { module.on("update", function() { if (mc.currentScreen instanceof GuiChest) { var inventoryContainer = Java.from(mc.thePlayer.inventoryContainer.getInventory()) var openContainer = Java.from(mc.thePlayer.openContainer.getInventory()) if (mode.get() == "FaaatPotato") { var fishSlots = inventoryContainer.filter(function (stack) stack && stack.getItem() instanceof ItemFish/*|| you can add more items here, you need to import them*/) fishSlots.length && fishSlots.forEach(function (stack) mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, openContainer.indexOf(stack), 0, 1, mc.thePlayer)); } if (mode.get() == "ToolTip") { var itemsToStore = items.get().toLowerCase().split(",") var itemSlots = inventoryContainer.filter(function (stack) stack && itemsToStore.some(function (itemName) Java.from(stack.getTooltip(mc.thePlayer, true)).toString().toLowerCase().contains(itemName))) itemSlots.length && itemSlots.forEach(function (stack) mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, openContainer.indexOf(stack), 0, 1, mc.thePlayer)) } } }); });
just make sure to type the whole item name in the text field so no similar items will be put in the storage
e.g.
.depositfish itemstostore diamond_sword,fishing_rod,fishhowever this could lead to issues if names contain for example fish as in fishing_rod. Thats why you checked for != contains("rod"). But that should be solvable for you.
-
What is AutoInsultReloaded?
Another port...
It is an AutoInsult which is very customizable. It supports links and has some serious formatting settings (e.g. Hyperlink ...). It allows own insult lists. It allows mixed messages.
Thats how a link looks to every user:
Thats how it looks to you:
Actually I am too lazy to type the whole introduction again so look at this post for full detail.
Settings:
Have fun
(let me know if it has any issues, besides the known ones)
-
Well i do like that you tried to debug. There are a couple vars that are not needed, e.g. ENABLED because onUpdate will only be called when the module is enabled - you don't need to worry about that.
I just recoded your script to get it working. I don't know if this is the most memory efficient way to do it tho. If you want to add some Items you will have to do that on your own (via import ...).
This script won't allow to take fish out of a storage when enabled, so you could optimize it.
To understand what is going on you could take a look at this script since what you want is basically a reverse chest stealer
///api_version=2 (script = registerScript({ name: "DepositFish", version: "1.0", authors: ["some fisherman"] })); var GuiChest = Java.type("net.minecraft.client.gui.inventory.GuiChest"), ItemFish = Java.type("net.minecraft.item.ItemFishFood") script.registerModule({ name: "DepositFish", category: "Misc", description: "Stores fish lol" }, function (module) { module.on("update", function() { if (mc.currentScreen instanceof GuiChest) { var inventoryContainer = Java.from(mc.thePlayer.inventoryContainer.getInventory()) var openContainer = Java.from(mc.thePlayer.openContainer.getInventory()) var fishSlots = inventoryContainer.filter(function (stack) stack && stack.getItem() instanceof ItemFish/*|| you can add more items here, you need to import them*/) fishSlots.length && fishSlots.forEach(function (stack) mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, openContainer.indexOf(stack), 0, 1, mc.thePlayer)); } }); });
PS: Unique way of detecting a fish! :))
-
make it yourself with the help of this
-
@moon commitment. Be committed to learn JavaScript and get a basic understanding of LiquidBounce ScriptAPI. This forum helps a lot if you invest the time it takes.
-
@Player
///api_version=2 (script = registerScript({ name: "CancelS08", version: "1.0.0", authors: ["FaaatPotato"] })); var S08 = Java.type("net.minecraft.network.play.server.S08PacketPlayerPosLook"); script.registerModule({ name: "CancelS08", category: "Misc", }, function (module) { module.on("packet", function(e) { if (e.getPacket() instanceof S08) { e.cancelEvent(); } }); });
-
context:
I've recently posted this script in which I messed with the players model and the different rotation angles which I built into an animation. However the script seems to apply angles of one players model to another. Hence the animation is broken.
//function to retrive the MainModel to access rotationAngle... and do rendering function getMainModel(entity) { return mc.getRenderManager().getEntityRenderObject(entity).getMainModel() }
fast forward to today
I sat down and again tried to fix the issue. I've noticed that this in Multiplayer
Chat.print(getMainModel(mc.thePlayer).bipedRightArm.rotateAngleX)
doesn't even return the given instances'
bipedRightArm.rotateAngleX
rather some angle of another player. However, in Singleplayer it seems to work, probably because theres just one player, me.showcase:
rotation singleplayer – 00:08
— FaaatPotatorotation multiplayer – 00:05
— FaaatPotatoIn Singleplayer a drastic change in the angle is noticable while hitting. However in Multiplayer this can't be said at all times.
Does anybody know how to fix this/know another method to retrieve the rigtht angle? Or more importantly explain this behaviour?
-
️️️️ some1 needs to add own little utils to ScriptAPI
-
Ported it for you and added
- NoMoveStop -> makes you stop if you dont press any movement key
- OnlyOnMove -> requires you to press movement keys to speed up
///api_version=2 (script = registerScript({ name: "NCPSpeed", version: "1.3.3.7", authors: ["Kellohylly"] })); script.registerModule({ name: "NCPSpeed", category: "Fun", description: "NCP-Speed", settings: { nomovestop: Setting.boolean({ name: "NoMoveStop", default: false }), onlyonmove: Setting.boolean({ name: "OnlyOnMove", default: false }), }, }, function (module) { module.on("disable", function() { mc.timer.timerSpeed = 1; }); module.on("motion", function() { if (mc.thePlayer.onGround) { if ((module.settings.onlyonmove.get() && !isMoving()) || (module.settings.nomovestop.get() && !isMoving())) return; mc.thePlayer.jump(); //represents MovementUtils.strafe() var yaw = mc.thePlayer.rotationYaw * Math.PI / 180 //represents Math.rad(deg) mc.thePlayer.motionX = -Math.sin(yaw) * 0.485 mc.thePlayer.motionZ = Math.cos(yaw) * 0.485 } }); module.on("move", function(e) { if (module.settings.nomovestop.get() && !isMoving()) e.zeroXZ() }); }); //represents MovementUtils.isMoving() -> true/false function isMoving() { if (mc.thePlayer.movementInput.moveForward != 0 || mc.thePlayer.movementInput.moveStrafe != 0) return true; }
-
Here's a SkeletonESP i tried to build today. Used some information from the internet but couldnt get it to work that good.
Issues:
-
GL11 code isn't being rendered for each individual player, map entries somehow overwrite or rather synchronize animation-data hence every players' skeleton is doing the same -> looks async/broken (picture 2)
-
made it render your own player for debugging, colored every bone
-
I dont really know how to work with GL, code is probably messy
-
idk if it would work with
for each (var player in entityList) { ... }
but then it iterates through values instead of keys -> requires reverse search for key and that's (i think) not offered by js (can't doentityList.get(value)
-> and expect a key)
Showcase
showcase2 | Skeleton – 00:39
— FaaatPotatoshowcase1 | Skeleton – 00:38
— FaaatPotatoConclusion
Needs to be fixed (by me) (sometime)
Code:
///api_version=2 (script = registerScript({ name: "Skeleton", version: "1.0.0", authors: ["FaaatPotato"] })); GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager") RenderPlayer = Java.type("net.minecraft.client.renderer.entity.RenderPlayer") GL11 = Java.type("org.lwjgl.opengl.GL11") Frustum = Java.type("net.minecraft.client.renderer.culling.Frustum") Vec3 = Java.type("net.minecraft.util.Vec3") renderManager = mc.getRenderManager() HashMap = Java.type("java.util.HashMap") ModelRenderer = Java.type("net.minecraft.client.model.ModelRenderer") EntityPlayer = Java.type("net.minecraft.entity.player.EntityPlayer") entityList = new HashMap() list = { lineWidth: Setting.integer({ name: "LineWidth", default: 1, min: 1, max: 10 }), r: Setting.integer({ name: "Red", default: 1, min: 1, max: 10 }), g: Setting.integer({ name: "Green", default: 1, min: 1, max: 10 }), b: Setting.integer({ name: "Blue", default: 1, min: 1, max: 10 }), alpha: Setting.integer({ name: "Alpha", default: 1, min: 1, max: 10 }), } script.registerModule({ name: "Skeleton", category: "Render", description: "Renders player-skeleton", settings: list, }, function (module) { module.on("update", function() { }); module.on("render3D", function() { updateList() for (var player in entityList) { var playerData = entityList.get(player) var headRotation = playerData.headRotation, rightArmRotation = playerData.rightArmRotation, leftLegRotation = playerData.leftLegRotation, rightLegRotation = playerData.rightLegRotation, leftArmRotation = playerData.leftArmRotation //DEBUG - rotations get overwritten, something aint right here /*Chat.print(player.getName()+" "+ headRotation+" "+ rightArmRotation+" "+ leftLegRotation+" "+ rightLegRotation+" "+ leftArmRotation );*/ //setting up camera var posX = mc.thePlayer.lastTickPosX + (mc.thePlayer.posX - mc.thePlayer.lastTickPosX) * mc.timer.renderPartialTicks var posY = mc.thePlayer.lastTickPosY + (mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * mc.timer.renderPartialTicks var posZ = mc.thePlayer.lastTickPosZ + (mc.thePlayer.posZ - mc.thePlayer.lastTickPosZ) * mc.timer.renderPartialTicks var camFrustum = new Frustum() camFrustum.setPosition(posX, posY, posZ) if (player && !player.isDead && player.isEntityAlive() && camFrustum.isBoundingBoxInFrustum(player.getEntityBoundingBox())) { //used variables GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); var xOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * mc.timer.renderPartialTicks; var yOffset = player.isSneaking() ? 0.6 : 0.75 //translating to traget pos var x = player.lastTickPosX + (player.posX - player.lastTickPosX) * mc.timer.renderPartialTicks - renderManager.renderPosX; var y = player.lastTickPosY + (player.posY - player.lastTickPosY) * mc.timer.renderPartialTicks - renderManager.renderPosY; var z = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * mc.timer.renderPartialTicks - renderManager.renderPosZ; GL11.glTranslated(x, y, z) //setting up GL11.glLineWidth(module.settings.lineWidth.get()); glColor(200.0, 0.0, 0.0, 255.0) GL11.glRotatef(-xOffset, 0, 1, 0) GL11.glTranslated(0.0, 0.0, player.isSneaking() ? -0.235 : 0.0); GL11.glPushMatrix() //right leg GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(100.0, 100.0, 0.0, 255.0) GL11.glTranslated(-0.125, yOffset, 0) if (rightLegRotation[0] != 0) { GL11.glRotatef(rightLegRotation[0] * 57.295776, 1.0, 0.0, 0.0); } if (rightLegRotation[1] != 0.0) { GL11.glRotatef(rightLegRotation[1] * 57.295776, 0.0, 1.0, 0.0); } if (rightLegRotation[2] != 0.0) { GL11.glRotatef(rightLegRotation[2] * 57.295776, 0.0, 0.0, 1.0); } GL11.glBegin(3); GL11.glVertex3d(0.0, 0.0, 0.0); GL11.glVertex3d(0.0, -yOffset, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glPopMatrix(); GL11.glPushMatrix(); //left leg GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(200.0, 50.0, 0.0, 255.0) GL11.glTranslated(0.125, yOffset, 0.0); if (leftLegRotation[0] != 0.0) { GL11.glRotatef(leftLegRotation[0] * 57.295776, 1.0, 0.0, 0.0); } if (leftLegRotation[1] != 0.0) { GL11.glRotatef(leftLegRotation[1] * 57.295776, 0.0, 1.0, 0.0); } if (leftLegRotation[2] != 0.0) { GL11.glRotatef(leftLegRotation[2] * 57.295776, 0.0, 0.0, 1.0); } GL11.glBegin(3); GL11.glVertex3d(0.0, 0.0, 0.0); GL11.glVertex3d(0.0, -yOffset, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glPopMatrix(); GL11.glTranslated(0.0, 0.0, player.isSneaking() ? 0.25 : 0.0); GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(10.0, 200.0, 40.0, 255.0) GL11.glTranslated(0.0, player.isSneaking() ? -0.05 : 0.0, player.isSneaking() ? -0.01725 : 0.0); GL11.glPushMatrix(); //right arm GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(50.0, 10.0, 40.0, 255.0) GL11.glTranslated(-0.375, yOffset + 0.55, 0.0); if (rightArmRotation[0] != 0.0) { GL11.glRotatef(rightArmRotation[0] * 57.295776, 1.0, 0.0, 0.0); } if (rightArmRotation[1] != 0.0) { GL11.glRotatef(rightArmRotation[1]* 57.295776, 0.0, 1.0, 0.0); } if (rightArmRotation[2] != 0.0) { GL11.glRotatef(-rightArmRotation[2] * 57.295776, 0.0, 0.0, 1.0); } GL11.glBegin(3); GL11.glVertex3d(0.0, 0.0, 0.0); GL11.glVertex3d(0.0, -0.5, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glPopMatrix(); GL11.glPushMatrix(); //left arm GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(50.0, 10.0, 255.0, 255.0) GL11.glTranslated(0.375, yOffset + 0.55, 0.0); if (leftArmRotation[0] != 0.0) { GL11.glRotatef(leftArmRotation[0] * 57.295776, 1.0, 0.0, 0.0); } if (leftArmRotation[1] != 0.0) { GL11.glRotatef(leftArmRotation[1] * 57.295776, 0.0, 1.0, 0.0); } if (leftArmRotation[2] != 0.0) { GL11.glRotatef(-leftArmRotation[2] * 57.295776, 0.0, 0.0, 1.0); } GL11.glBegin(3); GL11.glVertex3d(0.0, 0.0, 0.0); GL11.glVertex3d(0.0, -0.5, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glPopMatrix(); GL11.glRotatef(xOffset - player.rotationYawHead, 0.0, 1.0, 0.0); GL11.glPushMatrix(); //head GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(0.0, 255.0, 0.0, 255.0) GL11.glTranslated(0.0, yOffset + 0.55, 0.0); if (headRotation[0] != 0.0) { GL11.glRotatef(headRotation[0] * 57.295776, 1.0, 0.0, 0.0); } GL11.glBegin(3); GL11.glVertex3d(0.0, 0.0, 0.0); GL11.glVertex3d(0.0, 0.3, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glPopMatrix(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH); GL11.glPopMatrix(); //if player sneaking GL11.glRotatef(player.isSneaking() ? 25.0 : 0.0, 1.0, 0.0, 0.0); GL11.glTranslated(0.0, player.isSneaking() ? -0.16175 : 0.0, player.isSneaking() ? -0.48025 : 0.0); GL11.glPushMatrix(); //hip bone GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(50.0, 200.0, 200.0, 255.0) GL11.glTranslated(0.0, yOffset, 0.0); GL11.glBegin(3); GL11.glVertex3d(-0.125, 0.0, 0.0); GL11.glVertex3d(0.125, 0.0, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glPopMatrix(); GL11.glPushMatrix(); //rib vertical GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(110.0, 30.0, 80.0, 255.0) GL11.glTranslated(0.0, yOffset, 0.0); GL11.glBegin(3); GL11.glVertex3d(0.0, 0.0, 0.0); GL11.glVertex3d(0.0, 0.55, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glPopMatrix(); GL11.glPushMatrix(); //shoulder bone GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); glColor(110.0, 0.0, 100.0, 255.0) GL11.glTranslated(0.0, yOffset + 0.55, 0.0); GL11.glBegin(3); GL11.glVertex3d(-0.375, 0.0, 0.0); GL11.glVertex3d(0.375, 0.0, 0.0); GL11.glEnd(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH); GL11.glPopMatrix(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LINE_SMOOTH); GL11.glPopMatrix() } } }); }); function updateList() { entityList.clear(); for each (var player in mc.theWorld.playerEntities) { var model = getPlayerModel(player); entityList.put(player, { headRotation: [model.bipedHead.rotateAngleX, model.bipedHead.rotateAngleY, model.bipedHead.rotateAngleZ], rightArmRotation: [model.bipedRightArm.rotateAngleX, model.bipedRightArm.rotateAngleY, model.bipedRightArm.rotateAngleZ], leftLegRotation: [model.bipedLeftLeg.rotateAngleX, model.bipedLeftLeg.rotateAngleY, model.bipedLeftLeg.rotateAngleZ], rightLegRotation: [model.bipedRightLeg.rotateAngleX, model.bipedRightLeg.rotateAngleY, model.bipedRightLeg.rotateAngleZ], leftArmRotation: [model.bipedLeftArm.rotateAngleX, model.bipedLeftArm.rotateAngleY, model.bipedLeftArm.rotateAngleZ] }); } } function glColor(r, g, b, a) { return GlStateManager.color(r/255, g/255, b/255, a/255) } function getPlayerModel(playerEntity) { return renderManager.getEntityRenderObject(playerEntity).getMainModel() }
-
-
it is broken tho and apiv1, requires conversion
https://forums.ccbluex.net/topic/796/vanillaautoblock-v2?_=1693278009481 -
@FaaatPotato Okay so because the old ported version is pretty much ugly and trash i properly recoded it and added customization + visuals and item display
Functions still the same.
Features:
- breaks first layer around bed after that bed itself
- exploits some bad fucker checks
- visualises its progress
Pictures:
Code:
///api_version=2 (script = registerScript({ name: "LayerFucker", version: "1.0.0", authors: ["FaaatPotato", "CzechHek"] })); var BlockPos = Java.type("net.minecraft.util.BlockPos"), Block = Java.type("net.minecraft.block.Block"), Blocks = Java.type("net.minecraft.init.Blocks"), BlockBed = Java.type("net.minecraft.block.BlockBed"), Color = Java.type("java.awt.Color"), BlockDirectional = Java.type("net.minecraft.block.BlockDirectional"), C07PacketPlayerDigging = Java.type("net.minecraft.network.play.client.C07PacketPlayerDigging"), C0APacketAnimation = Java.type("net.minecraft.network.play.client.C0APacketAnimation"), EnumFacing = Java.type("net.minecraft.util.EnumFacing"), breakDamage = 0, blockHitDelay = 0, breakingBlock, Gui = Java.type("net.minecraft.client.gui.Gui"), GL11 = Java.type("org.lwjgl.opengl.GL11"), Tessellator = Java.type("net.minecraft.client.renderer.Tessellator"), DefaultVertexFormats = Java.type("net.minecraft.client.renderer.vertex.DefaultVertexFormats"), ItemStack = Java.type("net.minecraft.item.ItemStack"), RenderHelper = Java.type("net.minecraft.client.renderer.RenderHelper"), tessellator = Tessellator.getInstance(), worldRenderer = tessellator.getWorldRenderer(), Fonts = Java.type("net.ccbluex.liquidbounce.ui.font.Fonts"); list = { range: Setting.integer({ name: "Range", default: 6.0, min: 1.0, max: 7.0 }), swingItem: Setting.boolean({ name: "Swing", default: true }), renderProgress: Setting.boolean({ name: "RenderProgress", default: true }) } script.registerModule({ name: "LayerFucker", category: "World", description: "Breaks first layer around bed/bed itself. Originally made for Matrix-Anticheat.", settings: list, }, function (module) { module.on("update", function() { if (blockHitDelay > 0) return blockHitDelay--; if (breakingBlock) return breakBlock(breakingBlock, module.settings.range.get(), module.settings.swingItem.get()); var bedPos = getClosestBedPos(module.settings.range.get()) if (!bedPos) return; breakBlock(getBlockToBreak(bedPos, module.settings.range.get()), module.settings.range.get(), module.settings.swingItem.get()); }); module.on("render2D", function () { if (!breakDamage || !module.settings.renderProgress.get()) return var breakPercentage = breakDamage * 100, mcFont = Fonts.INSTANCE.getFonts()[0] Gui.drawRect(470, 280, 340, 343, new Color(20,20,20).getRGB()); Gui.drawRect(467, 283, 343, 298, new Color(50, 50, 50).getRGB()); mcFont.drawString("LayerFucker: (ID: "+Block.getIdFromBlock(getBlock(breakingBlock))+")", 346, 286, 0xFFFFFF); Gui.drawRect(467, 301, 343, 332, new Color(50, 50, 50).getRGB()); mcFont.drawString("Breaking: "+breakPercentage.toFixed(2)+"%", 345, 304, 0xFFFFFF); mcFont.drawString(getBlockName(breakingBlock).toUpperCase(), 345, 320, 0xFFFFFF); Gui.drawRect(467, 335, 343, 340, new Color(50, 50, 50).getRGB()); Gui.drawRect(343, 335, 467 + 124 * breakDamage - 124, 340, Color.HSBtoRGB(breakDamage / 5.0, 1.0, 1.0) | 0xFF0000); var stack = new ItemStack(getBlock(breakingBlock).getItem(mc.theWorld, breakingBlock)) RenderHelper.enableGUIStandardItemLighting() mc.getRenderItem().renderItemIntoGUI(stack, 448, 304); mc.getRenderItem().renderItemOverlays(mc.fontRendererObj, stack, 440, 311); RenderHelper.disableStandardItemLighting(); }); module.on("render3D", function () { if (!breakDamage || !module.settings.renderProgress.get()) return; GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA) GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDepthMask(false) GL11.glColor4f(255/255, 0, 0, 50/255) GL11.glPushMatrix(); drawBlockBox(getBlockBoundingBox(getBlock(breakingBlock)), true) GL11.glPopMatrix(); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_LINE_SMOOTH) GL11.glDepthMask(true) }); }); //ported lb-code since core broken with latest lb-builds and no utils function getBlock(blockPos) { return mc.theWorld.getBlockState(blockPos).getBlock(); } function getBlockBoundingBox(block) { var renderManager = mc.getRenderManager() var posX = mc.thePlayer.lastTickPosX + (mc.thePlayer.posX - mc.thePlayer.lastTickPosX) * mc.timer.renderPartialTicks// - mc.getRenderManager().renderPosX var posY = mc.thePlayer.lastTickPosY + (mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * mc.timer.renderPartialTicks// - mc.getRenderManager().renderPosY var posZ = mc.thePlayer.lastTickPosZ + (mc.thePlayer.posZ - mc.thePlayer.lastTickPosZ) * mc.timer.renderPartialTicks// - mc.getRenderManager().renderPosZ block.setBlockBoundsBasedOnState(mc.theWorld, breakingBlock) return block.getSelectedBoundingBox(mc.theWorld, breakingBlock) .expand(0.0020000000949949026, 0.0020000000949949026, 0.0020000000949949026) .offset(-posX, -posY, -posZ) } function drawBlockBox(axisAlignedBB, border) { worldRenderer.begin(7, DefaultVertexFormats.POSITION) worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.minZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.maxZ).endVertex() worldRenderer.pos(axisAlignedBB.maxX, axisAlignedBB.minY, axisAlignedBB.maxZ).endVertex() tessellator.draw() if (border) drawBoxOutline(axisAlignedBB); } function drawBoxOutline(boundingBox) { worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION) GL11.glColor4f(255/255, 0, 0, 255/255) worldRenderer.pos(boundingBox.minX, boundingBox.minY, boundingBox.minZ).endVertex() worldRenderer.pos(boundingBox.minX, boundingBox.minY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.minY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.minY, boundingBox.minZ).endVertex() worldRenderer.pos(boundingBox.minX, boundingBox.minY, boundingBox.minZ).endVertex() worldRenderer.pos(boundingBox.minX, boundingBox.maxY, boundingBox.minZ).endVertex() worldRenderer.pos(boundingBox.minX, boundingBox.maxY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.maxY, boundingBox.minZ).endVertex() worldRenderer.pos(boundingBox.minX, boundingBox.maxY, boundingBox.minZ).endVertex() worldRenderer.pos(boundingBox.minX, boundingBox.maxY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.minX, boundingBox.minY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.minY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.maxY, boundingBox.minZ).endVertex() worldRenderer.pos(boundingBox.maxX, boundingBox.minY, boundingBox.minZ).endVertex() tessellator.draw() } function getCenterDistance(blockPos) { return mc.thePlayer.getDistance(blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5) } //lb-code port lol, pretty smart to refresh closest dist to filter tbh function getClosestBedPos(radius) { var nearestBlockDist = Number.MAX_VALUE var nearestBedPos for (var x = -radius; x <= radius; x++) { for (var y = -radius; y <= radius; y++) { for (var z = -radius; z <= radius; z++) { var currentPos = new BlockPos(mc.thePlayer.posX + x, mc.thePlayer.posY + y, mc.thePlayer.posZ + z) var dist = getCenterDistance(currentPos) if (getBlock(currentPos) != Blocks.bed) continue; if (dist > radius) continue; if (nearestBlockDist < dist) continue; nearestBlockDist = dist nearestBedPos = currentPos; } } } return nearestBedPos } //por from JartexScript-2.0, made by me function getBlockName(blockPos) getBlock(blockPos).getLocalizedName() //port from JartexScript-2.0, made by CzechHek function getFacing(state) state.getProperties().get(BlockDirectional.FACING); function getBlockToBreak(bedPos, range) { var state = mc.theWorld.getBlockState(bedPos), facing = getFacing(state); var bedFootPos = state.getProperties().get(BlockBed.PART) == "head" ? bedPos[facing](-1) : bedPos; var outerBlocks = [bedFootPos[facing](-1), bedFootPos[facing](2)]; for each (var direction in ["north", "south", "east", "west", "up"]) { if (direction == facing || direction == facing.getOpposite()) continue; outerBlocks.push(bedFootPos[direction](1), bedFootPos[direction](1)[facing](1)); } if (outerBlocks.some(function (block) mc.theWorld.isAirBlock(block))) return bedPos; return outerBlocks .filter(function (block) getCenterDistance(block) <= range) .sort(function (a, b) getCenterDistance(a) - getCenterDistance(b)) .sort(function (a, b) getBlock(b).getPlayerRelativeBlockHardness(mc.thePlayer, mc.theWorld, b) - getBlock(a).getPlayerRelativeBlockHardness(mc.thePlayer, mc.theWorld, a))[0]; } function breakBlock(blockPos, range, swing) { if (!blockPos || getCenterDistance(blockPos) > range) { if (breakingBlock) { blockHitDelay = 4; breakDamage = 0; breakingBlock = null; } return } //you could check for best block even when mining a block and compare its hardness and if it is faster to stop mining this block and start mining the other block if (!breakingBlock) breakingBlock = blockPos; if (!breakDamage) mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, blockPos, EnumFacing.DOWN)); breakDamage += getBlock(blockPos).getPlayerRelativeBlockHardness(mc.thePlayer, mc.theWorld, blockPos); if (swing == true) { mc.thePlayer.swingItem() } else mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation()); if (breakDamage >= 1) { mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK, blockPos, EnumFacing.DOWN)); mc.playerController.onPlayerDestroyBlock(blockPos, EnumFacing.DOWN); blockHitDelay = 4; breakDamage = 0; breakingBlock = null; } }
File:
LayerFucker.js -
@DreamWasFucked despite the fact that you are banned, this might still be interesting:
mc.getRenderItem().renderItemAndEffectIntoGUI(ItemStack, x, y);
This worked for me. Haven't found this one on this forum yet. Maybe it helps somebody.
and if you want to get rid of some shade when rendering blocks
RenderHelper = Java.type("net.minecraft.client.renderer.RenderHelper"); RenderHelper.enableGUIStandardItemLighting() mc.getRenderItem().renderItemIntoGUI(stack, x, y); mc.getRenderItem().renderItemOverlays(mc.fontRendererObj, stack, x, y) RenderHelper.disableStandardItemLighting();
-
@Gabriel why would you put yourself in authors tag tho
-
LayerFucker?!
-
What does it do?
It will break the inner layer around the bed and "create a hole in the inner defense". After that it'll break the bed. Worked for Matrix, probably still working. -
Ye so I just ported it. Very ugly, not customizable and doesn't have any rendering features that the original has. It works on 6 block range, however there isn't any way to change that in game. (just in code)
[release] JartexScript-2.0 (contains original)
[port] LayerFucker.jsCode:
///api_version=2 (script = registerScript({ name: "LayerFucker", version: "1.0.0", authors: ["FaaatPotato", "CzechHek", "AlienGurke"] })); var BlockPos = Java.type("net.minecraft.util.BlockPos"), Block = Java.type("net.minecraft.block.Block"), Blocks = Java.type("net.minecraft.init.Blocks"), BlockBed = Java.type("net.minecraft.block.BlockBed"), Color = Java.type("java.awt.Color"), BlockDirectional = Java.type("net.minecraft.block.BlockDirectional"), C07PacketPlayerDigging = Java.type("net.minecraft.network.play.client.C07PacketPlayerDigging"), C0APacketAnimation = Java.type("net.minecraft.network.play.client.C0APacketAnimation"), EnumFacing = Java.type("net.minecraft.util.EnumFacing"), breakDamage = 0, blockHitDelay = 0, breakingBlock; script.registerModule({ name: "LayerFucker", category: "World", description: "Breaks first layer around bed/bed itself. Originally made for Matrix-Anticheat.", }, function (module) { module.on("update", function() { if (blockHitDelay > 0) return blockHitDelay--; if (breakingBlock) return breakBlock(breakingBlock); var bedPos = getNearestBed(6) if (!bedPos) return; breakBlock(getBlockToBreak(bedPos)); }); }); //ported lb-code since core broken with latest lb-builds function getBlock(blockPos) { return mc.theWorld.getBlockState(blockPos).getBlock(); } function getCenterDistance(blockPos) { return mc.thePlayer.getDistance(blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5) } //idk if thats really memory efficient function getNearestBed(radius) { var present = []; for (var x = -radius; x <= radius; x++) { for (var y = -radius; y <= radius; y++) { for (var z = -radius; z <= radius; z++) { var currentPos = new BlockPos(mc.thePlayer.posX + x, mc.thePlayer.posY + y, mc.thePlayer.posZ + z) if (Block.getIdFromBlock(getBlock(currentPos)) == 26) present.push(currentPos) } } } return present .filter(function (pos) getCenterDistance(pos) <= radius) .sort(function (a, b) getCenterDistance(a) - getCenterDistance(b))[0] } //port from JartexScript-2.0, made by CzechHek function getFacing(state) state.getProperties().get(BlockDirectional.FACING); function getBlockToBreak(bedPos) { var state = mc.theWorld.getBlockState(bedPos), facing = getFacing(state); var bedFootPos = state.getProperties().get(BlockBed.PART) == "head" ? bedPos[facing](-1) : bedPos; var outerBlocks = [bedFootPos[facing](-1), bedFootPos[facing](2)]; for each (var direction in ["north", "south", "east", "west", "up"]) { if (direction == facing || direction == facing.getOpposite()) continue; outerBlocks.push(bedFootPos[direction](1), bedFootPos[direction](1)[facing](1)); } if (outerBlocks.some(function (block) mc.theWorld.isAirBlock(block))) return bedPos; return outerBlocks .filter(function (block) getCenterDistance(block) <= 6) .sort(function (a, b) getCenterDistance(a) - getCenterDistance(b)) .sort(function (a, b) getBlock(b).getPlayerRelativeBlockHardness(mc.thePlayer, mc.theWorld, b) - getBlock(a).getPlayerRelativeBlockHardness(mc.thePlayer, mc.theWorld, a))[0]; } function breakBlock(blockPos) { if (!blockPos || getCenterDistance(blockPos) > 6) { if (breakingBlock) { blockHitDelay = 4; breakDamage = 0; breakingBlock = null; } return } //you could check for best block even when mining a block and compare its hardness and if it is faster to stop mining this block and start mining the other block if (!breakingBlock) breakingBlock = blockPos; if (!breakDamage) mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, blockPos, EnumFacing.DOWN)); breakDamage += getBlock(blockPos).getPlayerRelativeBlockHardness(mc.thePlayer, mc.theWorld, blockPos); mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation()); //mc.thePlayer.swingItem(); if (breakDamage >= 1) { mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK, blockPos, EnumFacing.DOWN)); mc.playerController.onPlayerDestroyBlock(blockPos, EnumFacing.DOWN); blockHitDelay = 4; breakDamage = 0; breakingBlock = null; } }
idk if it has any issues, let me know.
-
-
@Marlon no problem homie
-
var textures = properties.get("textures").iterator().next() Chat.print(textures.getValue());
returns smth similar to this:
-
@Charlie-Goodwin Fucker is intended to break one block at a time (e.g bed ...)
btw, you tell me you want to break a single block with fucker
replacement for nuker, but only for a single block
but then you complain about it doing exactly that
fucker can only mine at 1 block at a time
you mean block type?
KillAuraPatch 3.0
Unsure how to fix script issue
[SCRIPT]AutoInsultReloadedAPIv2 | Port: Core -> APIv2
Unsure how to fix script issue
(req) Kill aura Visualiser
How to write modules。
need a script that cancels s08
rotationAngleX not returning angle of given player instance
I dont have ANY idea why this script is broken.
I dont have ANY idea why this script is broken.
[JS]SkeletonESP i tried to build
i need scripts
[JS]LayerFucker | Port from Core -> ScriptAPIv2
help
how can i code a script
FlyHCF Script (REUPLOAD)
[JS]LayerFucker | Port from Core -> ScriptAPIv2
[Unnicker] How to get the Textures / Property of the GameProfile of a Player
[Unnicker] How to get the Textures / Property of the GameProfile of a Player
Fast Fucker