RandomEncounters

3.4k Downloads

Endlessly Spawning Mobs

GhostXavier opened this issue ยท 19 comments

commented

My partner WuufWuuf & I currently run a private bukkit server and love this mod. However the mob spawns are out of control with the base code. I'm not sure if this is the case with others but the mobs are continuously spawning in the high hundreds and the /butcher command does little to stem the tide.

After going through the mobs.json and adjusting probability values, one of two things would happen: Either the mobs.json would no longer become detected by the server and no longer spawn mobs or the endless numbers of spawning mobs would continue unhindered as if no value was edited.

2014-02-10_02 48 57

commented

Please provide a copy of your mobs.json configuration as well as the encounters.json. I haven't seen anything like this in any of the tests.

commented

http://pastebin.com/44gnXZ2k mobs json

http://pastebin.com/eXzSnSHz encounter json

Thanks so much for confirming it was faulty script writing on our part for the treasures. In the encounter json, i possibly also may have gotten the writing wrong as well for treasure groups.

For the mobs however, the only things edited were the tag names and the values. Is it just an error with bad writing on our part again? I appreciate the help/trouble shooting

commented

Well, this one is a bit more of a challenge. The mobs and encounters you posted give me the impression any encounter will only spawn 1 to 2 villagers. Clearly, the above image has a few more than two. So to try and figure this out:

  1. What version are you running?
  2. What other plugins do you have running?
  3. If you stop and start the server, does the spawning stop?
  4. If you can, change the logLevel in the config,yml to 9 and let me know what it says while spawning. This will flood, absolutely flood, the console with messages from the plugin, but I am wondering if you constantly get "More time needed for spawning".
commented
  1. Minecraft Version 1.7.2, Latest version of RE (V3)

  2. Bookshelf
    Better Flint
    Chop Tree2
    Command Shops
    Death Chest
    Elemental Arrows
    Horse Craftables
    iConomy
    LevelHealth
    MobArena
    MobArenaAddon
    Mobcash
    Mobpocalypse
    Multiverse
    Random Encounters
    Restart Evolution (This one uses the same /re commands as your plugin. but on a server test without this plugin, endless mass spawn still happens)
    Runecraft
    Spout
    SuperSpleef
    World Edit (5.5.8)
    XP Item Storage

  3. Stopping and Starting the server brought the spawning to a halt. No more new endless spawns upon logging in.

  4. Did the test with logLevel set to 9. Much of the log from half way down started repeating itself.
    A small cut of what it was repeating:
    http://pastebin.com/hMmH4LAU

By what it looks like, the plugin keeps trying to place the structure but it hits an error, and then continually rebuilds the structure on the existing one and making more mobs spawn. Logging out seems to snap the server out of the endless loop, but what causes the placement issue? It happens both on flatworlds and regular generated terrain on our server.

commented
  1. There is an update to RandomEncounters v0.3.1, but, it won't fix this problem.

  2. Did you omit parts of the error? There is usually a stack trace associated with the NullPointerException.

I will continue to look into this, but if there is more information on the error, that would be helpful.

commented
  1. Alright, thanks!

  2. http://wikisend.com/download/279918/2014-02-12-1.log

This is the full log for the test; the reason I wasn't able to post the original length was because it easily went over the pastebin limit. At line 1219 is where a flatworld test began in order to find one of the houses quicker. From 1850(we roughly think) on was when the house began loaded and the spawning began.

commented

So, the error occurs when trying to get the name of the world for conversion into a JSON object. What are you using to generate the new worlds?

commented

Multiverse is what we're using for it. It allows the server to run multiple world files than can be connected via portals, much like entering the nether or End.

Not entirely sure if Multiverse is what is used to create the worlds or just to link them after creating a world since the world generation is still done via the vanilla world generation (albeit done through in-chat commands).

commented

I just ran some tests with Multiverse-Core 2.4, and did not experience this issue at all. You are talking about this plugin: http://dev.bukkit.org/bukkit-plugins/multiverse-core/ correct?

commented

Okay, so what happens here is the checks were run on the new chunks. These checks happen on scheduled tasks so as not to lock the main server thread. The task attempts to finish by adding the placed encounter to the saved encounter list, during this an exception is thrown when trying to get the name of the world. Because of this exception, the task never completes, and thus doesn't cancel the tasks next run and it happens over and over again. I can see from previous logs that the error does happen if the /re place command using the player's current location is ex, but since it is not task based, it doesn't do it over and over again.

In short, this is not playing well with Multiverse, though I cannot see why. The location as a location seems fine, as it is able to place the structure and the mobs where they should go. The code that is failing is location.getWorld().getName() on line 322 of PlacedEncounter.java.

What version of Multiverse are you using? I will need to investigate more into why this is not playing well with that plugin.

commented

We're using the 2.5 beta build, this may be the issue.

edit: but yes, that is the plugin we are using

commented

Would you be able to run your tests with the latest stable release and see if the problem persists?

commented

Having some slight errors on our side; downgraded to 2.4 but now nothing is spawning in terms of structures, mobs, etc. It's probably just an issue because we've been juggling different json versions to test. I'll have a proper update when I can

commented

We still can't get anything to spawn anymore after downgrading to 2.4. We'll keep working at it, but it looks like our server isn't going to be enjoying this nice mod :( thanks for all the help; will post again or private message if we get it cooperating and what we did

commented

I am not sure if you are still following this, but just to confirm, this error occurred when using the /re place command correct? Does it occur when using the /re check command?

commented

Really sorry about the late response.

Yes, it occurs for both commands.

commented

Just created a test bukkit server, with only a few plugins installed, and ran into the same problem. Had to use mcedit to cut out the "infected" chunks.

commented

I just installed it today, got the same problem, so many mobs that I am getting 1-2fps instead of 100+fps.

commented

It has been a really long time since I have looked into this and currently I do not anticipate being able to pick it back up any time soon. Hopefully another developer can use this as a starting point to take it to the finish line.