MineColonies

MineColonies

57M Downloads

Problem: Construction sites unlit, become spawners

spacewolfcub opened this issue ยท 2 comments

commented

Minecolonies version

1.12.2-0.10.170-ALPHA-universal

Expected behavior

During construction or upgrades, building sites do not become hostile-mob spawners.

Actual behaviour

Very large buildings (like the Medieval Libraries)
or very slow workers (at the start of games or due to low traits caused by many citizens dying)
are left overnight without any kind of lighting
during construction or upgrade process.
Sometimes construction is halted for days while an ingredient that was not originally listed as required is obtained.

This is a problem because workers will hide away from hostiles and interrupt their work day, guards waste time wandering around the construction site instead of patrolling borders, and players will be ambushed. Players usually cannot light the worksite effectively because as soon as the BuilderNPC returns to work ze will tear out all lighting then continue building.

Suggested solutions

  1. Hut block actively undergoing construction remotely "lights up" every block within the schematic boundaries. Example of blocks that do this already: Thaumcraft Arcane Lamp.
    This has the disadvantage of not looking realistic.

  2. Hut block actively undergoing construction defines area of no-hostile-spawns-allowed within the schematic boundaries. Example of blocks that do this already: TorchMaster by xalcon.
    This has the advantage of not creating anything visually unrealistic.
    This has the disadvantage that it would require creating from scratch the entire no-hostile-spawns-allowed variable-size code.

commented

Results from more chats:

  1. Right after work hours end,
    each hut block actively under construction
    checks if it is raining.
    If it is not raining, it
    checks for spawnable surfaces within the schematic boundary,
    it spawns "dust" in those areas (visually thin but hitbox is half-slab).
    Dust allows no natural spawns,
    dust despawns when player or citizenNPC walk through it (like walking through a placed string),
    dust can have things placed through it and despawns like thin snow layers do.

Raycoms says:

We might be able to optimize it to only do it at construction sites that changed
but all of that gets more complex by the minute
definitely an all-weekend project
I'm still a fan of calling up to x guards to take care of it
maybe the closest x to be configured in the townhall, by default 3
to make sure the guards don't die too badly
But there is still no one size fits all solution, guards would have to take care to not get built over by the builder
It's not a problem we're going to solve tonight with a bit of brainstorming, especially not codewise
minecraft is single threaded so we have to take care in what we put resources
I will put some thought into it
maybe I can come up with something

commented

Closed in favor of: #3362
edit Nightenom: wrong issue number