MineColonies

MineColonies

59M Downloads

[BUG] <Builders not upgrading builder huts past level 2 >

tatertotskk opened this issue · 38 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest MineColonies Verison?

  • I am running the latest alpha version of MineColonies for my Minecraft version.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.2

MineColonies Version

minecolonies-1.20.1-1.1.28-RELEASE.jar

Structurize Version

structurize-1.20-1.0.584-BETA.jar

Related Mods and their Versions

No response

Current Behavior

Starts upgrading builder hut to level 3 from level 2 gets to 60 percent used "when it needs to place down spruce buttons for the caledonia pack the ai bugs out and stops working" they also never clear the basement area of the dirt/stone even tho they have tools

Untitled.video.-.Made.with.Clipchamp.mp4

Expected Behavior

Starts upgrading builder to level 3 from level 2 clears out basement and finishes

Reproduction Steps

  1. get a level 2 builder hut
  2. request to upgrade to level 3 builder hut
  3. give resources to build hut
  4. wait for 60 percent

Logs

dont have

Anything else?

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

What building pack did you use? from what I have tested the problem comes from the caledonia pack and I have made other building and have had the same issue

commented

I used Caledonia as well. Can you reproduce this in a fresh world? Only with minecolonies?
Log would still be helpful.

commented

Seems to also affect Decorations:
I'm having this Issue with Cavern Megahall decorations.
At some point in building the builder will stop, stand in one spot, and stop working.
The video above also applies to this.
See here
https://github.com/ldtteam/minecolonies/assets/139875314/6eb14e2f-8471-4449-8a14-3e38d97b23fc

commented

It worked fine for me in my test world. Can you maybe send us the logs of when it gets stuck?

commented

I am having the same issue with Caledonia as well, I have had it happen with two different builder huts and it seems consistent. I observed the same thing where it kept trying to place a part and it keeps giving up. In my case it was the front door, which there was not a good reason why it could not place it. Once I manually placed the front door on both buildings, they moved on to the next step. But got caught right away trying to place a spruce button (which appears to already be there?).

Just to test, I removed the two buttons and it continued to have the same issue, even after saving and reloading.

I am going to see if changing the style helps, but I suspect that it is likely an issue with Caledonia specifically.

Logs did not say anything interesting at the time of the issue, but I will include them anyway.
latest.log

If there is any additional information I can provide please let me know.

commented

I dont think its a caledonia issue then but probably some mod changes redstone related things

commented

Hm, could be since both doors and buttons have redstone interaction. I did run a quick test on a fresh install with just minecolonies and can confirm that everything seems to be working as expected when upgrading to tier 3.

Do you have any ideas on what type of interaction could cause this?

commented

Would have to do some binary search on the mods (remove half, check if it still broken, if not, readd half, if so, remove other half, etc)

commented

Yeah, I was afraid of that. Figures there is no easy solution there. I will probably poke around locally a bit more and see if I can figure anything out.

commented

I finally had a chance to sit down a look at this a bit. I started going through the mods installed, and was able to track down at least one conflicting mod.

It looks like GregTechCEu does cause this error, I was able to confirm this both in ATM9 and standalone with just MineColonies.

That being said I do think there is another conflict somewhere. When I enabled all the mods again the issue still persisted. I will keep looking and see if I can find which ones still have problems.

commented

Someone seems to have had the same issue while the builder was placing shingle blocks (from Domum Ornamentum), according to their report on discord.
The only similarity between doors and shingles I can think of is that both have a block state which is partially determined externally (for shingles by adjacent shingles, and for doors whether they have been opened)

commented

I noticed, when the builder was trying to place the door, that they had shingles in their hand (at least at times). Additionally, they had started the shingle portion of the upgrade but that is about where they decided messing with doors would be fun.

I could see some sort of code change for doors in either AE2 or GregTech, but shingles are not something I would think they would touch. It makes sense that state could be the trigger for the bug, but then I am not sure why racks do not seem to be impacted (I assume they have state also).

That makes me wonder if shingles are the actual issue here, since I think that is about where it should have been in the build process.

commented

Found the other one. It looks like AE2 is causing the exact same issue. Removing both from ATM9 causes the tier 3 build to complete (either from scratch or continuing an existing build). Adding either mod to a fresh pack with just MC also exhibits the same bug at the same spot. Neither mod has external dependencies so it does not seem to be outside of the mods themselves. Not sure what the similarity is with the two mods other than world-gen stuff.

Looking at the build process several dozen times allowed me to notice a few different things. I think that the issue is not redstone related, but probably closer related to doors themselves (but kinda not). When the bug shows up, it is somewhere around 58-61% of the upgrade process. The first thing that I notice though is that when the offending mod is removed the builder will go inside and start doing other stuff. It will not continue to try to place the door, but build the rest of the building. Normally, without the bug the doors and buttons are addressed at about 98%, they are saved for the very end, probably (wild guess) because they are interactive and animated? Doors are the only ones (I think) that have a toggle state.

I am not sure what dictates the upgrade order, but doors should be placed at 98%, not 61%. But additionally, there are buttons in the first builder's hut blueprint and this does not cause a problem until upgrading to tier 3 (this is when the doors change). Then there is the oddity where when I placed the door manually it moved on to the buttons but remained stuck there no matter what.

Additionally, tier 3 housing is also impacted with this bug, and I am guessing most other things at tier 3 (for Caledonia) if the door is being replaced.

I hope this additional information helps, still seems like a bit of an odd issue to me.

commented

this issue it seems might also need to be shared with gregtech and ae2 repsectively so that the issue gets fixed on all sides.

commented

ok so I just did a minimal instance test with minecolonies and ae2 and a small number of assorted mods like jei, jade (and all addons for jade plus oculus and rubidium with both magnesium mods and stylecolonies. roughly 15 mods total. and I noticed right away in singleplayer that once the builder got to 63% used on the lvl 3 upgrade it would drop back down to 59% and would rinse and repeat like its stuck in a loop.

here are all the logs I can produce for it:

debug.log
latest.log
launcher_log.txt

forge version 47.1.3
mc 1.20.1
minecolonies: minecolonies-1.20.1-1.1.28-RELEASE.jar
ae2: appliedenergistics2-forge-15.0.5-beta.ja

hope this helps. Im also going to be posting about this in the ae2 bug report forum and linking to this thread.

commented

and here are the logs with ae2 disabled, and the hut upgrade completed normally

debug.log
latest.log
launcher_log.txt

commented

I have a question, hopefully someone with more insight in to the build / upgrade process could explain. What code set is responsible for the build / upgrade process. My understanding is that structurize handles the blueprints, but I am not sure who is handling the priority and build process itself.

The reason I ask, is that the minecolonies debug logging does not really provide the information I would expect to see. It seems like it would be useful for either MC or structurize to provide a log of what the builder is doing / thinking (more than a floating message above their head.

For example:

[29Jul2023 08:42:49.233] [Render thread/DEBUG] [minecolonies/builder]: Upgrading builders hut 1 step 6 of 9 block minecraft:oak_stairs at -4 -49 -9 with do:shingles.
[29Jul2023 08:42:49.233] [Render thread/DEBUG] [minecolonies/builder]: Upgrading builders hut 1 step 7 of 9 block minecraft:oak_stairs at -4 -49 -8 with do:shingles.
[29Jul2023 08:42:49.243] [Render thread/DEBUG] [minecolonies/builder]: Stubbed my toe, it hurt, going to cry in a corner.
[29Jul2023 08:42:51.420] [Render thread/DEBUG] [minecolonies/builder]: While standing the corner, licked the paint, it was sweet.  Will continue licking the paint.

Maybe there is already logging like this, if so can someone let me know where I can enable it.

Based on other related reports, it almost feels like the DO shingles are playing a major factor here. Something with the state is likely mismatching with what structurize or MC is expecting, likely due to something AE2 is doing. For whatever reason that is causing the build order to mess up or for it to just skip the faulty steps (ie the shingles).

commented

I've experienced this exact behavior, but instead of it being the DO shingles, it was simple colored blocks of wool.

I did figure out how to unblock it though, It turns out when the builder stops and stands there, it often has the supplies in the hut, but not in the builders inventory, and the builder won't pick it up. If you put the correct block in the builders inventory, they will place it an move on, until they hit a similar issue on either the next block or many down the road.

I've also noticed the builder is carrying around a great deal of unnecessary blocks. In my residence 2-> upgrade, when the builder is working on the top stories of the residence, it's carrying around a lot of cobble/spruce DO blocks, when all it needs is Paper/spruce. The hut is actually thinking it needs almost a full set of the cobble/spruce even though the builder is done with them entirely.

Something is really off about the material tracking in this situation. And yes, my scenario has AE2 in it. @someaddons , I saw the same "there part time" for multiple supplies, but once the blocking issue (which had nothing to do with those) was resolved, it stabilized.

Things I've seen it get blocked on:

Blue Wool
Chain
DO Shingles
Cobblestone
Spruce Stairs.
Oak Pressure plates
Spruce Buttons
Oak doors

and more.

commented

Here is the debug log from an install having just minecolonies and AE2. I did not realize that curse was disabling the log that is why I did not provide it originally. This is loading at the point where the observed bug is occurring, but that may be too late for the relevant data, if needed I can start a fresh world and generate a new debug log.

I do have the server enableindevelopmentfeatures enabled as well as the client enabledebuglogging values set to true.
If there is any additional information I can provide please let me know.

debug.log

commented

For anyone who would like to replicate this bug in a controlled environment, the following steps should get you to the point where it happens:

  1. Create a new profile in curseforge (you can skip this if you want to do it manually).
  2. Add the latest MineColonies and AE2 mods to the profile (GregTech requires a manual download right now).
  3. Launch a new world in creative (I do superflat with 12 blocks of dirt since there is a basement).
  4. Place the townhall block and start a colony, make sure you select Caledonia as the style.
  5. Place the builder's hut using the builders tool, and select Level 2, and place it as constructed (save you some time).
  6. Start the upgrade process, and provide the materials.
    *. Added bonus increase the colonist's stats to 99

Given a bit of time you will hit the bug shortly after the shingles are placed on the front of the building.

commented

Could reproduce it myself with just minecolonies and AE2, the builder gets stuck at 59-61%, he's stuck in the LOAD_STRUCTURE AI step and keeps recalculating the required material list. The list switches between 59% and 61% every second, one time displaying dark oak doors, one time not. I guess AE2 somehow does affect the material requirement calculations

After removing Ae2, the builder immediately jumped to 89% and kept going as normal, and started digging out thebasement which he did not before

commented

Could this be related to #8488, which also seems to be caused by AE2?

commented

It might help is someone is able to enable debuglogging in the Minecolonies config, and share the debug.log?
*if they catch the bug happening

commented

The flickering items are not indicative of what it needs. To figure it out the first time I had to place a level 3 builders hut in another world, and compare it to the progress. When I moved the blue wool from the hut to the builders inventory, it unblocked for a row and a half, until it blocked on chain. The doors and buttons are what was flickering during the blocks.

So, the summary of what I'm seeing, with some interpretation:

  • Not crediting placed items against needed, causing over-requesting of those items
  • Not managing builder inventory well, and overfilling it with already placed items, causing a great deal of delay in walking back and forth
  • Not having the builder pick up the right items, even though they are available in the hut, and thus hang being unable to place what it doesn't have.
  • As a result of the above, the builder often finishes the build while the hut shows unused materials in it's required list, some often not even requested.

In my residence upgrade, the builder is dying the white beds blue, needs one blue bed for a level 3, and ended up with 2 blue ones in the hut after finishing the upgrade, having dyed 3 total for some reason.

commented

I did some testing, with this specific issue, where the dark oak door or spruce buttons are cycling in and out of the requirements list.

Giving the builder a full stack of dark oak doors does not cause it to move on to the next step. Even exiting out and going back in does not resolve the behavior. I do think something is going on with the resource availability tracking, but I am not sure that it is related to this specific issue.

I do think that the resource availability issue is causing delays, as there will be request bubbles above the builder for things that they do have, but they will eventually place all the items (even without giving them more). I am not saying the issue is not somehow related, but for this issue providing the items does not appear to resolve it.

commented

I tested against the Tier 3 builders hut, and was able to partially replicate this. I crammed all of the remaining items into her inventory and she was able to place a few blocks (wool iirc). But then after that she stopped building again. No amount of resetting her inventory, the builders hut's inventory, resetting the character, cancelling and restarting the upgrade or reloading the game seemed to get her out of that state. This included emptying all inventories and starting over. Strangely I also did not get any requests from her for the missing items, which seems very wrong.

All items requested were in her personal inventory, so she should have had what she needed.

I did then make a copy of the save, and reloaded it without AE2. With all of the same items in her inventory she was able to finish the building. I noticed that she went downstairs, and then immediately built the hammer on the back of the building before placing the shingles again.

commented

Does Minecolonies load in Neoforge? AE2 released a newer version, but for neoforge, so I have not been able to test is any changes they made fixed the issue

commented
commented
commented

I was able to test on the latest version of AE2, which includes some object orientation changes, but it did not make a difference.

One fun thing was that AE2 bumped the forge version up to 47.1.56, probably to force Neo Forge. MineColonies requires 46.0.1- 47.1.3, but I was able to work around that for testing.

With the new version of AE2 on Neo Forge 47.1.56, the issue still seemed to persist. I did not do a full clean start, but loaded from the broken state. I doubt that will make a difference here, since removing AE2 allows things to move forward properly.

commented

Ok, I've been able to identify what I believe is the root cause. It appears that ae2 is modifying the in world tile entities. This is causing us to not recognize that the right thing is in place. This effects Do blocks particularly, and on larger builds, it causes the builder to overfill it's inventory with already placed blocks.

This surfaced recently, because there was a fix to ensure that we were properly comparing the materials for Do blocks. We are discussing the right solution.

commented

Hello, I found this issue via a link posted in an issue made in the ATM9 modpack github:
AllTheMods/ATM-9#166
The bug appears as mentioned in this discussion, but another instance I found is never mentioned here. For me the bug first happened when upgrading the builder from 2 to 3 in the colonial style pack, stuck on an itemframe with pickaxe instead. Does this fix hopefully repair this instance of the bug as well?

commented

This is specifically about blocks in world being changed.
If you have a mod that changes tools or armour in your inventory (e.g. Spoorn could do that), you may need to do any of the following:

  • Teach the blacksmith that tool or armour item
  • Use some other crafting mechanic that doesn't require you to carry the item
  • Craft and drop the item close enough to the builder, without ever holding it yourself, or
  • Load the preview again (e.g. with builder's goggles) and find an item frame or armour stand with that tool and place it yourself

The reason that tools and armour with extra data are not accepted, is because it may otherwise accept the enchanted tool you could use as weapon by accident, instead of just a new plain one

commented

The AE2 thing seems to be happening in 1.19 as well (version 1.19.2 1.1.36)
https://discord.com/channels/139070364159311872/1003402487417548801/1136795142213353553
They removed AE2 and builder worked as expected

commented

Hello, I'm right now testing this version to see fo the bug #9255
had been fixed, It seems that the current master version does not cut it.
Issue is still present

commented

Please test with the newest structurize

commented

@Raycoms,
I tried with the lastest master.
I build it locally and replaced the jar with the new one on my server.
Maybe it's the interaction with other mods, it could very well be since i don't have only MineColonies and AE2 but other stuff as well.

How did you tested that it's fixed ? what exact version / build did you used of MineColones, Structurize and AE2 ?