Jump to content

Creating a bot


Gingerbreadman

Recommended Posts

hello everyone and I need help to create a grass bot

this bot has to automatically place dirt in selected blocks, and when they turn into grass harvest them automatically, it will also have to be able to use commands like /tell

though I need help doing this, as I am not familiar with the forge api

Link to comment
Share on other sites

Should bot be a static block (machine) that operates on some block (around or below or facing for example) or should it be a living entity that walks around and does bot stuff?

 

You will either go with TileEntity (for block-machine).

or custom entity, where you will certainly want to look at how sheep eats grass (they actually find grass and set it to dirt - eating it).

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

And if it is an entity you'll definitely need to start programming custom AIs for your entity to run on. Like Ernio said look into the sheep class to see how they locate and change grass.

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Link to comment
Share on other sites

Like Asweez points out, that is basically a type of hacking (assuming you create a bot that is better than a human).

 

It also would be a tough programming exercise.  Are you an experienced modder and Java programmer.  I think you'd have to create an AI and pathfinding system and then you'd have to intercept all the user input or at least generate user input that achieves what you want.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Well, I'm not entirely sure what the person wants, but if he wants the player to be able to change to an automated state, then he either needs a transforming command to make the player into a separate entity, or a piece of code that directly 'hacks' into the players buttons and causes them to be physically pressed in a certain manner. I lean towards the first as the second one is easily replicable with programs you can make separately. The second one is somewhat simple though. Just make a basic player, but replace the keyboard functions with repeating timers. I'm afraid I can't actually help you do this, though, as I am not fully aware how to mod the player entity.

Link to comment
Share on other sites

I lean towards the first as the second one is easily replicable with programs you can make separately.

 

No, you wouldn't want a separate bot program for this because it would need too much "vision processing" to figure what to do.  Separate bots work well for games like Runescape where there is a fixed map (everything is in a known location), resources regenerate in the exact same place and the colors are set (they don't change with lighting and such) so you can look for particular pixel colors and assume what is there.  To try to prevent bots in Runescape the game developers actively disrupt repetitive tasks with random mini games, although they too can be accomplished with a bot.

 

In Minecraft you would need the bot to be in-game so it could find the block to be mined or whatever.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

I lean towards the first as the second one is easily replicable with programs you can make separately.

 

No, you wouldn't want a separate bot program for this because it would need too much "vision processing" to figure what to do.  Separate bots work well for things like Runescape where there is a fixed map (everything is in a known location) and the colors are set (they don't change with lighting and such) so you can look for particular pixel colors and assume what is there.  In Minecraft you would need the bot to be in-game so it could find the block to be mined or whatever.

 

I assume that he just wants a repeating button masher, correct?

Link to comment
Share on other sites

I assume that he just wants a repeating button masher, correct?

 

That wouldn't be very useful in Minecraft (unlike games like Runescape).  According to the poster, the bot is supposed to plant things and then harvest them.  I assume he'd want more than one plant going.  So it would have to be aware of where it can plant, know how to check back for harvesting, etc.

 

Also, when someone asks a question like this you know their next question will be: now how do I make a bot that can fight zombies, etc.

 

But yes, if it were just button mashing he could do that simply with separate program.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.