MineColonies

MineColonies

57M Downloads

Luke, the wood worker, now has an AI problem: NPE (AbstractEntityAICrafting.java:279)

Strohtaler opened this issue ยท 5 comments

commented

Minecolonies version

Branch (yesterday): version/1.15
minecolonies commit: 24052de
structurize commit: 444a4ef
(1.15.2-forge-31.2.20)

Actual behaviour

AI problem message from wood worker to check latest.log
Excerpt:

[16Jun2020 14:15:57.893] [Server thread/WARN] [minecolonies/]: Statemachine for transition com.minecolonies.api.entity.ai.statemachine.AITarget@3bddacd threw an exception:
java.lang.NullPointerException: null
	at com.minecolonies.coremod.entity.ai.basic.AbstractEntityAICrafting.craft(AbstractEntityAICrafting.java:279) ~[?:unspecified]
	at com.minecolonies.coremod.entity.ai.basic.AbstractEntityAICrafting$$Lambda$5468/1118551974.get(Unknown Source) ~[?:?]
	at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition.getNextState(BasicTransition.java:79) ~[?:unspecified]
	at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.transitionToNext(BasicStateMachine.java:150) [?:unspecified]
	at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.checkTransition(BasicStateMachine.java:133) [?:unspecified]
	at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.checkTransition(TickRateStateMachine.java:126) [?:unspecified]
	at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.tick(TickRateStateMachine.java:105) [?:unspecified]
	at com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton.func_75246_d(AbstractAISkeleton.java:131) [?:unspecified]
	at net.minecraft.entity.ai.goal.PrioritizedGoal.func_75246_d(SourceFile:55) [?:?]
	at com.minecolonies.api.entity.CustomGoalSelector.func_75774_a(CustomGoalSelector.java:222) [?:unspecified]
	at net.minecraft.entity.MobEntity.func_70626_be(MobEntity.java:856) [?:?]
...
[16Jun2020 14:15:57.903] [Server thread/ERROR] [minecolonies/]: Pausing Entity Luke I. Colmer (WORKING)[CRAFT] (com.minecolonies.coremod.job.Sawmill) at BlockPos{x=619, y=71, z=213} for 100 Seconds because of error:
[16Jun2020 14:15:57.904] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: java.lang.NullPointerException
[16Jun2020 14:15:57.905] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: 	at com.minecolonies.coremod.entity.ai.basic.AbstractEntityAICrafting.craft(AbstractEntityAICrafting.java:279)

Logs: Latest.log and crashlog at https://gist.github.com/

commented

after checking the source line I believe that just before checking the sawmill, I've deleted one or more requests from miner for oak planks - not sure if that is causing currentRequest == null

commented

#5250 related?

commented

Yeah, this is what happened to me to, i dont think ive deleted any request from my citizen. any solution on how to reset the AI or reset the citizen?

commented

okay so, the AI is fixed. i didnt change anything. my LUMBARJACK said her AI crashed. i clicked on ''try cancel that request", afterwards i just ignored her for a few minecraft days, i just now clicked RECALL ALL CITIZEN. she jumped to the townhall aswell and now she just starts cutting wood again. it fixed itself.

commented

FYI, after clicking"try cancel that request" she didnt move anymore until i recalled her to the townhall.