Skript

Skript

743k Downloads

Another location world missing exception thrown lookAt

TheLimeGlass opened this issue ยท 1 comments

commented

Skript/Server Version

2.8.3
Spigot Paper 1.20.1

Bug Description

java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because the return value of "org.bukkit.Location.getWorld()" is null
	at org.bukkit.craftbukkit.v1_20_R1.entity.CraftMob.lookAt(CraftMob.java:113) ~[paper-1.20.1.jar:git-Paper-196]
	at ch.njol.skript.bukkitutil.PaperEntityUtils$LookGoal.tick(PaperEntityUtils.java:157)
	at com.destroystokyo.paper.entity.ai.PaperCustomGoal.e(PaperCustomGoal.java:43) ~[paper-1.20.1.jar:?]
	at net.minecraft.world.entity.ai.goal.WrappedGoal.tick(WrappedGoal.java:63) ~[?:?]
	at net.minecraft.world.entity.ai.goal.GoalSelector.tickRunningGoals(GoalSelector.java:154) ~[?:?]
	at net.minecraft.world.entity.ai.goal.GoalSelector.tick(GoalSelector.java:145) ~[?:?]
	at net.minecraft.world.entity.Mob.serverAiStep(Mob.java:923) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3351) ~[?:?]
	at net.minecraft.world.entity.Mob.aiStep(Mob.java:673) ~[?:?]
	at net.minecraft.world.entity.monster.Monster.aiStep(Monster.java:45) ~[?:?]
	at net.minecraft.world.entity.monster.EnderMan.aiStep(EnderMan.java:280) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3006) ~[?:?]
	at net.minecraft.world.entity.Mob.tick(Mob.java:435) ~[?:?]
	at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1352) ~[?:?]
	at net.minecraft.world.level.Level.guardEntityTick(Level.java:1004) ~[?:?]
	at net.minecraft.server.level.ServerLevel.lambda$tick$12(ServerLevel.java:872) ~[?:?]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:42) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:852) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1556) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1393) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
	at java.lang.Thread.run(Thread.java:833)

Expected Behavior

Run the LookAt effect with a location that has no world.

Steps to Reproduce

In an event with no default expression.
make {_entity} look at location(0, 0, 0)

or clear world of {_location}

commented

Good catch! Priority low as it rarely happens due to the fact no one reported this before