Mineshafts - Underground Mining


Explore procedurally generated underground mines beneath ore patches! Fight biter-infested dark caverns, discover boss rooms with treasure, navigate poison gas chambers, and mine rich ore deposits with tiered underground miners. Features multi-level mines, dynamic biter waves, ambient cave sounds, vault rooms, and rare ore deposits. Each mine is a unique dungeon with organic cave layouts scaling in difficulty with distance from spawn.

Content
4 months ago
2.0
421
Combat Enemies Environment Mining

b Extreme entity growth and Lua error [Solved]

4 months ago

Hi, I think these issues might be related.

I started a new world using the default settings with only the Mineshafts mod enabled. I explored quickly and covered a large area early on.

While exploring, I entered several mineshafts and moved further away from the starting point. The more mineshafts I found, the entity count increased rapidly until it reached around 1.1 million.

After about 20 minutes of gameplay, the game started lagging heavily and eventually crashed.

The following error occurred during the crash:

Error while running event Mineshafts::on_nth_tick(300)
LuaEntity doesn't contain key set_command.
stack traceback:
[C]: in function 'index'
__Mineshafts
/control.lua:405: in function <Mineshafts/control.lua:347>

4 months ago

Thanks for letting me know. I'll take a look at it tomorrow and try to fix the problem, but due to time constraints, it might take until the weekend.

4 months ago

I think I fixed the problem pretty quickly: I applied a limiter to the “Cave Active Bitters” and put them on hold. So things should run much more smoothly with the new version until I find another solution.

Thanks for testing and i hope you like the mod so far : )

4 months ago

Sounds good! I’ll test the new version. I really like the mod.

4 months ago
(updated 4 months ago)

Update to my previous report: I tested the new version in a fresh world using only the Mineshafts mod. The issue still occurs.

The total entity count and chunk count increase significantly over time. This happens after multiple mineshaft entrances are generated during normal exploration. Each generated entrance appears to contribute to ongoing additional entity and chunk growth in the overworld. After ~30 minutes of exploration and letting the game run, the total entity count reached ~1.9M and chunk count reached ~23k, and the game becomes increasingly laggy.

The increase continues while staying in the overworld and during AFK time. It stops when entering a mineshaft or when switching to remote view. It seem to depend on the existence of generated mineshaft entrances in the overworld.

1 Mineshaft entrance generates around 100k entities in 30 minutes in an empty world where I was AFK and didnt explore.

4 months ago

Hmm, that's strange; I'll take a closer look at that.

The problem is that I haven't noticed any lag or entity spikes.

4 months ago
(updated 4 months ago)

Could you please upload a save file so I can check it there? I just can't seem to reproduce the issue. Nevertheless, I'll release an update for it, since it could be caused by the guards at the entrance.

Another workaround would be to use his stacking system like Rampant biters, stacking the biters in groups of 10 or more so that 10 entities become 1, and as soon as that one takes damage, all 10 respawn.

4 months ago

https://www.swisstransfer.com/d/20a456f9-6749-4998-92a8-8e7c985881bc

this save file is from standing 30 min afk and generating over 100k entities in that time

4 months ago

https://www.swisstransfer.com/d/5a510f90-bc26-4a07-8b53-e08db51dfbef

this is the same world, i just explored. my game is lagging at this point.

4 months ago

Thanks ill take a closer look

4 months ago

The new update should fix the issue you described. Now, lag only occur when a large mine is being generated. Once the mine is generated, the lags disappear.

4 months ago

Thanks a lot, it works much better now! I tested it and the issue seems to be fixed.

This thread has been locked.