𝐏𝐋𝐄𝐀𝐒𝐄 𝐇𝐄𝐋𝐏, how can I make an entity have artificial intelligence

Started by modbroz on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
𝐏𝐋𝐄𝐀𝐒𝐄 𝐇𝐄𝐋𝐏, how can I make an entity have artificial intelligence

PLEASE HELP, I want to know how to make an entity do certain things with artificial intelligence from Gemini or ChatGPT.

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
mcreator cannot do that, you…
Sat, 10/12/2024 - 17:36

mcreator cannot do that, you could make a markov chain to make semi-intellegent speech.

If you just want the entity…
Sat, 10/12/2024 - 19:29

If you just want the entity to have intelligent dialogue, it wouldn't be that difficult, and I can help you with that. But if you want it to actually result in movement, attacking, etc. that would be a real challenge in both programming, prompt engineering, and parsing the response.

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well can I at least make an…
Mon, 10/14/2024 - 22:35

Well can I at least make an AI chatbot or smh, I've heard of Mcreator mods that have AI chatbots and stuff.

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You also said I could do…
Mon, 10/14/2024 - 22:39

You also said I could do that so could you show me how to do it

First you can get an API key…
Sat, 01/25/2025 - 02:00

First you can get an API key from OpenAI, which is required if you want to use their GPT models. Of course, they are paid, but you can put in an arbitrary amount of money and it's largely pay as you go. I've sent over hundreds of messages for the past couple months yet it only cost like three dollars.

You then want to use Java's HttpURLConnection class to create a POST request to OpenAI, the payload structure of which can be found here:

https://platform.openai.com/docs/quickstart

Making a POST request is a little more complicated compared to GET, and requires you to read the OutputStream to stick on the required parameters, but I found a quick guide with an example here:

https://www.baeldung.com/httpurlconnection-post

Once you get the JSON response, you can parse it as you like, and to avoid doing more coding, just use the procedure system for the rest of the process up to sending the message or handling it however you'd like.

There are some good JSON parsing plugins for MCreator out there.