terrarium-earth / Tempad

Bringing the Loki time door to Minecraft 1.18+
Other
25 stars 12 forks source link

[Bug]: FabricWaystones getOwner should have null check #78

Closed TheWinABagel closed 10 months ago

TheWinABagel commented 11 months ago

Bug Description

https://github.com/terrarium-earth/Tempad/blob/a4aafa92104d2cbf6b101c4067714f639ead263e/fabric/src/main/java/me/codexadrian/tempad/common/compat/fabricwaystones/FabricWaystoneLocationGetter.java#L26 does not have a null check for the getOwner call adding one, ie this .filter(waystoneValue -> waystoneValue.isGlobal() || (waystoneValue.getEntity().getOwner() != null && waystoneValue.getEntity().getOwner().equals(player.getUUID()))) would resolve this issue I'd make a pr but I'm lazy :sad

How to Reproduce?

Unsure, had a crash on aof7 NA with this though so it must be able to happen somehow

Expected Behavior

No crashy

Version

2.2.4

Mod Loader Version

loader 0.14.24, fabric-api 0.91.0

Mod Loader

Fabric

Logs or additional context

I don't have the full log, as the crash report shows a different (unrelated) save issue, but here's a snippet java.lang.NullPointerExceptionCannot invoke "java.util.UUID.equals(Object)" because the return value of "wraith.fwaystones.block.WaystoneBlockEntity.getOwner()" is null at me.codexadrian.tempad.common.compat.fabricwaystones.FabricWaystoneLocationGetter.lambda$init$0(FabricWaystoneLocationGetter.java:26) ~[tempad-fabric-1.20.1-2.2.4.jar:?]

Code of Conduct

CodexAdrian commented 11 months ago

Ah right, I spoke with Trent about this issue, I forgot to fix it in my last release, I’ll make a release fixing it in a bit

CodexAdrian commented 10 months ago

Fixed in latest