Builder AI exception
hietalai opened this issue · 6 comments
Built a Nordic style Barracks. The associated Barrack Towers are built rotated 90 degrees clockwise from the barracks rotation. Ordered deconstruction of the Barrack Towers and placed it again in the correct rotation. The builder successfully repairs the Barrack Towers but then continues sending a status message that the building has finished. Builder gets status that its AI has an error and the following .log is created.
Running Minecraft 1.15.2 with Minecolonies 0.13.74-BETA on Forge 31.2.8.
[14Aug2020 20:28:56.626] [Server thread/INFO] [minecolonies/]: WorkOrderBuild at location BlockPos{x=-452, y=68, z=290} is using schematics/nordic/barrackstower1 instead of schematics/nordic/barrackstower1
[14Aug2020 20:28:56.635] [Server thread/WARN] [minecolonies/]: Statemachine for transition com.minecolonies.api.entity.ai.statemachine.AITarget@15d1ca3a threw an exception:
java.lang.NullPointerException: null
at com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingBarracksTower.onUpgradeComplete(BuildingBarracksTower.java:125) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.colony.Colony.onBuildingUpgradeComplete(Colony.java:1265) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.colony.workorders.WorkOrderBuild.onCompleted(WorkOrderBuild.java:219) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.colony.jobs.AbstractJobStructure.complete(AbstractJobStructure.java:127) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIStructureWithWorkOrder.executeSpecificCompleteActions(AbstractEntityAIStructureWithWorkOrder.java:265) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIStructure.completeBuild(AbstractEntityAIStructure.java:165) ~[?:0.13.74-BETA]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition.getNextState(BasicTransition.java:79) ~[?:0.13.74-BETA]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.transitionToNext(BasicStateMachine.java:148) ~[?:0.13.74-BETA]
at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.checkTransition(BasicStateMachine.java:134) ~[?:0.13.74-BETA]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.checkTransition(TickRateStateMachine.java:126) ~[?:0.13.74-BETA]
at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.tick(TickRateStateMachine.java:105) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton.func_75246_d(AbstractAISkeleton.java:130) ~[?:0.13.74-BETA]
at net.minecraft.entity.ai.goal.PrioritizedGoal.func_75246_d(SourceFile:55) ~[?:?]
at com.minecolonies.api.entity.CustomGoalSelector.func_75774_a(CustomGoalSelector.java:222) ~[?:0.13.74-BETA]
at net.minecraft.entity.MobEntity.func_70626_be(MobEntity.java:595) ~[?:?]
at net.minecraft.entity.LivingEntity.func_70636_d(LivingEntity.java:2262) ~[?:?]
at net.minecraft.entity.MobEntity.func_70636_d(MobEntity.java:462) ~[?:?]
at net.minecraft.entity.AgeableEntity.func_70636_d(SourceFile:159) ~[?:?]
at com.minecolonies.api.entity.citizen.AbstractEntityCitizen.func_70636_d(AbstractEntityCitizen.java:347) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.entity.citizen.EntityCitizen.func_70636_d(EntityCitizen.java:388) ~[?:0.13.74-BETA]
at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2104) ~[?:?]
at net.minecraft.entity.MobEntity.func_70071_h_(MobEntity.java:274) ~[?:?]
at net.minecraft.world.server.ServerWorld.func_217479_a(ServerWorld.java:600) ~[?:?]
at net.minecraft.world.World.func_217390_a(World.java:536) [?:?]
at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:401) [?:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:849) [?:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:330) [?:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:784) [?:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:637) [?:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
[14Aug2020 20:28:56.638] [Server thread/ERROR] [minecolonies/]: Pausing Entity Félix I. Gomershall (com.minecolonies.coremod.job.Builder) at BlockPos{x=-460, y=68, z=286} for 1600 Seconds because of error:
[14Aug2020 20:28:56.642] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: java.lang.NullPointerException
[14Aug2020 20:28:56.643] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingBarracksTower.onUpgradeComplete(BuildingBarracksTower.java:125)
[14Aug2020 20:28:56.644] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.colony.Colony.onBuildingUpgradeComplete(Colony.java:1265)
[14Aug2020 20:28:56.645] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.colony.workorders.WorkOrderBuild.onCompleted(WorkOrderBuild.java:219)
[14Aug2020 20:28:56.645] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.colony.jobs.AbstractJobStructure.complete(AbstractJobStructure.java:127)
[14Aug2020 20:28:56.646] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIStructureWithWorkOrder.executeSpecificCompleteActions(AbstractEntityAIStructureWithWorkOrder.java:265)
[14Aug2020 20:28:56.647] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIStructure.completeBuild(AbstractEntityAIStructure.java:165)
[14Aug2020 20:28:56.648] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition.getNextState(BasicTransition.java:79)
[14Aug2020 20:28:56.648] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.transitionToNext(BasicStateMachine.java:148)
[14Aug2020 20:28:56.649] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicStateMachine.checkTransition(BasicStateMachine.java:134)
[14Aug2020 20:28:56.650] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.checkTransition(TickRateStateMachine.java:126)
[14Aug2020 20:28:56.650] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickRateStateMachine.tick(TickRateStateMachine.java:105)
[14Aug2020 20:28:56.651] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton.func_75246_d(AbstractAISkeleton.java:130)
[14Aug2020 20:28:56.653] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.entity.ai.goal.PrioritizedGoal.func_75246_d(SourceFile:55)
[14Aug2020 20:28:56.654] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.api.entity.CustomGoalSelector.func_75774_a(CustomGoalSelector.java:222)
[14Aug2020 20:28:56.654] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.entity.MobEntity.func_70626_be(MobEntity.java:595)
[14Aug2020 20:28:56.655] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.entity.LivingEntity.func_70636_d(LivingEntity.java:2262)
[14Aug2020 20:28:56.655] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.entity.MobEntity.func_70636_d(MobEntity.java:462)
[14Aug2020 20:28:56.656] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.entity.AgeableEntity.func_70636_d(SourceFile:159)
[14Aug2020 20:28:56.657] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.api.entity.citizen.AbstractEntityCitizen.func_70636_d(AbstractEntityCitizen.java:347)
[14Aug2020 20:28:56.657] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at com.minecolonies.coremod.entity.citizen.EntityCitizen.func_70636_d(EntityCitizen.java:388)
[14Aug2020 20:28:56.658] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2104)
[14Aug2020 20:28:56.658] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.entity.MobEntity.func_70071_h_(MobEntity.java:274)
[14Aug2020 20:28:56.659] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.world.server.ServerWorld.func_217479_a(ServerWorld.java:600)
[14Aug2020 20:28:56.659] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.world.World.func_217390_a(World.java:536)
[14Aug2020 20:28:56.660] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:401)
[14Aug2020 20:28:56.660] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:849)
[14Aug2020 20:28:56.661] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:330)
[14Aug2020 20:28:56.661] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:784)
[14Aug2020 20:28:56.662] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:637)
[14Aug2020 20:28:56.665] [Server thread/INFO] [STDERR/]: [com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIBasic:onException:337]: at java.lang.Thread.run(Unknown Source)
[14Aug2020 20:29:18.652] [Server thread/INFO] [minecolonies/]: WorkOrderBuild at location BlockPos{x=-452, y=68, z=290} is using schematics/nordic/barrackstower1 instead of schematics/nordic/barrackstower1
[14Aug2020 20:29:18.661] [Server thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Server
java.lang.NullPointerException: null
at com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingBarracksTower.onUpgradeComplete(BuildingBarracksTower.java:125) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.network.messages.server.colony.building.BuildingSetStyleMessage.onExecute(BuildingSetStyleMessage.java:64) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.network.messages.server.AbstractBuildingServerMessage.onExecute(AbstractBuildingServerMessage.java:79) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.network.messages.server.AbstractColonyServerMessage.onExecute(AbstractColonyServerMessage.java:144) ~[?:0.13.74-BETA]
at com.minecolonies.coremod.network.NetworkChannel.lambda$null$3(NetworkChannel.java:233) ~[?:0.13.74-BETA]
at net.minecraftforge.fml.network.NetworkEvent$Context.enqueueWork(NetworkEvent.java:215) ~[?:?]
at com.minecolonies.coremod.network.NetworkChannel.lambda$registerMessage$4(NetworkChannel.java:233) ~[?:0.13.74-BETA]
at net.minecraftforge.fml.network.simple.IndexedMessageCodec.lambda$tryDecode$3(IndexedMessageCodec.java:128) ~[?:?]
at java.util.Optional.ifPresent(Unknown Source) ~[?:1.8.0_221]
at net.minecraftforge.fml.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:128) ~[?:?]
at net.minecraftforge.fml.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:162) ~[?:?]
at net.minecraftforge.fml.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:80) ~[?:?]
at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) ~[eventbus-2.2.0-service.jar:?]
at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) ~[eventbus-2.2.0-service.jar:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.2.0-service.jar:?]
at net.minecraftforge.fml.network.NetworkInstance.dispatch(NetworkInstance.java:84) ~[?:?]
at net.minecraftforge.fml.network.NetworkHooks.lambda$onCustomPayload$1(NetworkHooks.java:78) ~[?:?]
at java.util.Optional.map(Unknown Source) ~[?:1.8.0_221]
at net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(NetworkHooks.java:78) ~[?:?]
at net.minecraft.network.play.ServerPlayNetHandler.func_147349_a(ServerPlayNetHandler.java:1279) ~[?:?]
at net.minecraft.network.play.client.CCustomPayloadPacket.func_148833_a(CCustomPayloadPacket.java:42) ~[?:?]
at net.minecraft.network.play.client.CCustomPayloadPacket.func_148833_a(CCustomPayloadPacket.java:12) ~[?:?]
at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?]
at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) [?:?]
at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) [?:?]
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:731) [?:?]
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:141) [?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) [?:?]
at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:714) [?:?]
at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:708) [?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127) [?:?]
at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:694) [?:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:641) [?:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
Yes, you can't place a barrackstower manually. Barrackstowers may only be placed by builders to set the necessary data.
I am unsure if the Barracks were placed mirrored, and haven't been able to test it because of life happening. I will check it and try to see if placing the barracks "normally" helps with the Tower rotation, and get back to you.
Might be another instance of #5560. If so, this is not a schematic issue.