我只是在寻找一种方法,用人工智能来孕育NPC,它只是去了某个地方,却什么也不做。有人知道怎么做这样的东西吗?
发布于 2022-09-02 00:39:36
这可以通过使用Citizens2来实现,这是一个免费的NPC,它是为“我的世界”1.8-1.19构建的。
首先,创建全国人民代表大会:
NPC npc = CitizensAPI.getNPCRegistry().createNPC(EntityType.PLAYER, "CustomPlayer"); // "CustomPlayer" is the NPC's name 接下来,给NPC一个WanderGoal,为他们提供您要寻找的漫游功能:
npc.getDefaultGoalController().addGoal(WanderGoal.createWithNPC(npc), 1);最后,产生全国人民代表大会:
npc.spawn(location);`https://stackoverflow.com/questions/72672650
复制相似问题