Posted February 22, 201510 yr Hello everyone, I am trying to create a mod that on enable walks in a hollowed cube, and fills it up with blocks, then later breaks it. The only problem is that I don't know where to start with auto walking, etc
February 22, 201510 yr Could you try and word it again, with a bit more detail? Do you mean you want the player to walk, place blocks, and later have those blocks deleted or something else?
February 22, 201510 yr Author Yes I want the player to set what blocks to place and break, then when enabled the player will automatically walk around placing those blocks and then later breaking them
February 22, 201510 yr so you want to make a minecraft bot? Also, I should have you know that you are reading my signature.
February 22, 201510 yr Then you should trigger some methods in playercontroller. See Minecraft and PlayerController code that how it works. (Yes, it should be handled on client side) I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
February 22, 201510 yr Author Then you should trigger some methods in playercontroller. See Minecraft and PlayerController code that how it works. (Yes, it should be handled on client side) can you give me an example of walking to a location and placing a block there?
February 22, 201510 yr Author It's not just a "walk to location". You will have to implement some pathfinding algorithm (A* is a good one). I am going to add blocks and there locations to a list, and then do if its air go to it and place a block
February 22, 201510 yr Author maybe I can make every block, the player needs to break, etc send packets to the player, making fake mobs where he has to place it, this way he has away going around it, etc?
February 23, 201510 yr You don't need any fake mobs. Just find the path, and force the player to follow the path on client side. (Some Entity AIs contain pathfinding code, so it would be helpful) And on placing and breaking, you would just invoke right click to place, and left click to break. (NOTE : You might need some reflection trick to do that.) I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
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.