MineColonies

MineColonies

65M Downloads

Miner AI Issue

Closed this issue ยท 6 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues.

Are you using the latest MineColonies Version?

  • I am running the latest beta/release version of MineColonies for my Minecraft version.
    I am also running the latest versions of other mods that are part of my problem.

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.20

MineColonies Version

1.1.864

Structurize Version

1.0.768

Related Mods and their Versions

Forge - 47.3.39

Current Behavior

Miner no longer works due to an error in their AI code

Expected Behavior

Miner goes mining I suppose.

Reproduction Steps

  1. Give the miner an order
  2. They break.

Logs

https://gist.github.com/PoofThePuff/767996d2f4b70a152fa060bb17c37d8e

Anything else?

Image

Footer


Viewers

  • 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

could you sent/upload your colony which is having this bug? You can get a small zip file by using the /mc colony export
and find the id with /mc whereami

commented

colony1Export.zip
Here you go.
Just realised the file is empty. Not sure why. I've tried most things to see why the file is empty. I'm not sure it is supposed to be but I will leave it like this unless you say otherwise for now

commented

I just ran into the same problem

[15Apr2025 01:28:25.569] [Server thread/ERROR] [minecolonies/]: Pausing Citizen Halo U. Hammond (com.minecolonies.job.miner) in colony:1 at BlockPos{x=3203, y=-14, z=2120} for 6400 Seconds because of error:]
[15Apr2025 01:50:06.817] [Server thread/WARN] [minecolonies/]: Statemachine for state MINER_MINING_NODE threw an exception:
java.lang.NullPointerException: Cannot invoke "com.minecolonies.api.colony.workorders.IBuilderWorkOrder.getBlueprint()" because the return value of "com.minecolonies.core.colony.jobs.JobMiner.getWorkOrder()" is null
at com.minecolonies.core.entity.ai.workers.production.EntityAIStructureMiner.executeStructurePlacement(EntityAIStructureMiner.java:783) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.core.entity.ai.workers.production.EntityAIStructureMiner.searchANodeToMine(EntityAIStructureMiner.java:749) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.core.entity.ai.workers.production.EntityAIStructureMiner.executeNodeMining(EntityAIStructureMiner.java:670) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition.getNextState(BasicTransition.java:79) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.transitionToNext(BasicStateMachine.java:163) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.checkTransition(BasicStateMachine.java:149) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.checkTransition(TickRateStateMachine.java:125) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.tick(TickRateStateMachine.java:101) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.core.entity.ai.workers.AbstractAISkeleton.tick(AbstractAISkeleton.java:63) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.core.entity.ai.workers.CitizenAI.lambda$registerWorkAI$4(CitizenAI.java:99) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition.getNextState(BasicTransition.java:79) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.transitionToNext(BasicStateMachine.java:163) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.checkTransition(BasicStateMachine.java:149) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.checkTransition(TickRateStateMachine.java:125) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.tick(TickRateStateMachine.java:101) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.core.entity.citizen.EntityCitizen.lambda$new$11(EntityCitizen.java:275) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition.checkCondition(BasicTransition.java:87) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.checkTransition(BasicStateMachine.java:138) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.checkTransition(TickRateStateMachine.java:125) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.tick(TickRateStateMachine.java:101) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.api.entity.citizen.AbstractEntityCitizen.m_8107_(AbstractEntityCitizen.java:432) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at com.minecolonies.core.entity.citizen.EntityCitizen.m_8107_(EntityCitizen.java:700) ~[minecolonies-1.20.1-1.1.864-snapshot.jar%23434!/:1.20.1-1.1.864-snapshot]
at net.minecraft.world.entity.LivingEntity.m_8119_(LivingEntity.java:2298) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.world.entity.Mob.m_8119_(Mob.java:337) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:693) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.world.level.Level.mixinextras$bridge$accept$161(Level.java) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at com.bawnorton.neruina.handler.NeruinaTickHandler.safelyTickEntities$notTheCauseOfTickLag(NeruinaTickHandler.java:115) ~[neruina-1.3.0-forge+1.18.2-1.20.1.jar%23445!/:?]
at net.minecraft.world.level.Level.wrapOperation$bjp000$neruina$catchTickingEntities(Level.java:6540) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.world.level.Level.m_46653_(Level.java:479) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:343) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:323) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23494!/:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]

commented

I also am getting an AI error with the miner. MC 1.20.1, Forge 47.4.0, Block UI 1.0.190, Structurize 1.0.768, minecol 1.1.864

https://gist.github.com/rrusciguy/9d6503def7d08c939340b157a400c8f3

Colony export keeps failing to upload, dropped it into Google Drive, here is the link https://drive.google.com/file/d/1QPCTWQFUh2HhpL3RKRW8xy4Oetw92HWO/view?usp=sharing

Ordering the active level to be repaired did have the miner go through and demolish a few things, request materials, replace things... but then as soon as they went to expand the level again, the same AI error occurred.

commented

After further testing, changing the mining level and hiring a new miner did not fix this issue either.

Edit: Upgrading MC to 865 did not fix the issue.

Edit2: upon upgrading the mine, miner has begun to extend the shaft downwards,

commented

I am also having this issue on single player.

https://gist.github.com/Ashlockheart/2092d23b5425fb6232a335ec7d177c81

At this point no one can use a miner.