YOUSY0US3F / minecraft-gpt-god-plugin

MIT License
75 stars 13 forks source link

Island World does not load automatically, and "null is on fire" is spammed to openai #34

Closed architectdrone closed 2 months ago

architectdrone commented 2 months ago

I am putting these in the same issue because they may be related!

  1. When I boot up the server, it generates a new world, instead of using the island world. Yes, I unzipped the worlds directory to the gptgod plugin directory, and yes I deleted any existing world that generated.
  2. "null is on fire" gets spammed to the god gpt.
[10:35:21 INFO]: POSTING {
  "model": "gpt-4o",
  "messages": [
    {
      "role": "user",
      "content": "Current: Server Status:\nTime of day: Day\nWeather:  Clear\nStructures: \nObjectives: \nStatus of Player Achitect_Drone:\nHealth: Healthy\nIn a different dimensionDanger Level: Safe\nMain Hand: None, Off Hand None\n\n\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nAchitect_Drone said \"Yo, what\u0027s going on?\"\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!\nnull is on fire!"
    },
    {
      "role": "system",
      "content": "You will roleplay as the god of a small minecraft island world, give individual players challenges to test their merit and reward them if they succeed. You will recieve information about what has happened on the island. Only use tool calls, other responses will be ignored., You can now communicate with the players. Use the server history as a reference to note the change in player behavior The following are behaviours you must reward or pusish players for doing. Don\u0027t explicitly tell the players this list. When punishing players, reserve directly damaging players for repeat offenders. If most of the players disobey you punish everyone: Reward: connecting with animals,killing animals,slaying monsters, Punish: building structures of worship,using hostile language,using vulgar language."
    }
  ],

oh yeah it also says I'm in a different dimension lol

BTW do you guys have a discord server? I was going to try my hand at some experiments with this later today and wanted to know if there was anyone interested in experimenting on it with me

architectdrone commented 2 months ago

oh I get it, some block must be on fire, and it is trying to pull the structure that the block is associated with, which doesn't exist. Maybe you can add a null check before firing the log?

https://github.com/YOUSY0US3F/minecraft-gpt-god-plugin/blob/6c04f78ec49f69b35863fc9c8a0fd31cca4f0d93/src/main/java/net/bigyous/gptgodmc/StructureManager.java#L45

architectdrone commented 2 months ago

if you wanted to get freaky with it you could also check to make sure the same message isn't repeated over and over. not sure what the most performant way to do that is but u could use a hashset or something