Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Villagers are unable to spawn #1605

Closed
3 of 4 tasks
D3dWiz opened this issue Nov 7, 2024 · 2 comments · Fixed by #1611
Closed
3 of 4 tasks

Villagers are unable to spawn #1605

D3dWiz opened this issue Nov 7, 2024 · 2 comments · Fixed by #1611

Comments

@D3dWiz
Copy link

D3dWiz commented Nov 7, 2024

Spark link

https://spark.lucko.me/NBJUKdAhfV

Expected behavior

The villager spawns correctly

Observed/Actual behavior

The villager despawns, throwing IllegalArgumentException

[16:12:33] [Server thread/ERROR]: Entity threw exception at MainLands:152.5,62.0,35.5
java.lang.IllegalArgumentException: Can't find attribute minecraft:tempt_range
	at net.minecraft.world.entity.ai.attributes.AttributeSupplier.getAttributeInstance(AttributeSupplier.java:20) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.ai.attributes.AttributeSupplier.getValue(AttributeSupplier.java:27) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.ai.attributes.AttributeMap.getValue(AttributeMap.java:73) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.LivingEntity.getAttributeValue(LivingEntity.java:2796) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.ai.goal.TemptGoal.canUse(TemptGoal.java:55) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.ai.goal.WrappedGoal.canUse(WrappedGoal.java:22) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.ai.goal.GoalSelector.tick(GoalSelector.java:100) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.Mob.serverAiStep(Mob.java:968) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3643) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.Mob.aiStep(Mob.java:700) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.AgeableMob.aiStep(AgeableMob.java:156) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3352) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.Mob.tick(Mob.java:465) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.entity.npc.Villager.tick(Villager.java:396) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1366) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.level.Level.guardEntityTick(Level.java:1535) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.server.level.ServerLevel.lambda$tick$4(ServerLevel.java:826) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:39) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:808) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1917) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1705) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1367) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:342) ~[purpur-1.21.3.jar:1.21.3-2332-962ee30]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Steps/models to reproduce

Summon a villager with a spawn egg/command

Purpur version

1.21.3-2332-ver/1.21.3@962ee30

Agreements

  • I am running the latest version of Purpur available from https://purpurmc.org/downloads.
  • I have searched for and ensured there isn't already an open issue regarding this.
  • I ticked all the boxes without actually reading them
  • My version of Minecraft is supported by Purpur.

Other

https://mclo.gs/KSb7ciJ

@thegatesdev
Copy link

Issue is the mobs.villager.follow-emerald-blocks option, adds a TemptGoal to a villager, which accesses the tempt_range attribute which is (for some reason) no longer accessible for villagers.

@Onako2
Copy link
Contributor

Onako2 commented Nov 23, 2024

@thegatesdev do you know when tempt_range was removed for villagers? I am currently working on a PR to fix it and I need the tempt_range value. (Which in vanilla 1.21.3 is at 10.0D and is probably different in older versions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants