Posted February 17, 201411 yr Have the client send a chat message to self without sending it to the server? [solved] All I want to do is force the player to left click (from the client side - that also sends the packet to the server JUST as if I would have done it myself). Minecraft.getMinecraft().playerController.clickBlock(Minecraft.getMinecraft().objectMouseOver.blockX, Minecraft.getMinecraft().objectMouseOver.blockY, Minecraft.getMinecraft().objectMouseOver.blockZ, Minecraft.getMinecraft().objectMouseOver.sideHit); thought this line of code would punch the block currently in view, but I tried it out and nothing works D: please help
February 17, 201411 yr Author Edit- this actually works, but for some reason I can't seem to figure out how to have the client send itself a message to appear in his chat box, without sending it to the server?
February 17, 201411 yr Pretty sure this is what you want Minecraf.getMinecraft().thePlayer.addChatMessage("chat message") Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
February 17, 201411 yr Author Fixed using this line of code: Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("ring-ding-ding-ding-ding"));
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.