Skip to content

Commit 4dfa90a

Browse files
fix: NPE on griffin burrow estimate
1 parent 1964952 commit 4dfa90a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/gg/skytils/skytilsmod/features/impl/events/GriffinBurrows.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ object GriffinBurrows {
198198
}
199199
}
200200
is S04PacketEntityEquipment -> {
201-
val entity = UMinecraft.getMinecraft().theWorld.getEntityByID(event.packet.entityID)
201+
val entity = mc.theWorld?.getEntityByID(event.packet.entityID)
202202
(entity as? EntityArmorStand)?.let { armorStand ->
203-
if (event.packet.itemStack.item != Items.arrow) return
204-
if (armorStand.getDistanceSq(UPlayer.getPlayer()?.position) >= 27) return
203+
if (event.packet.itemStack?.item != Items.arrow) return
204+
if (armorStand.getDistanceSq(mc.thePlayer?.position) >= 27) return
205205
printDevMessage("Found armor stand with arrow", "griffin", "griffinguess")
206206
val yaw = Math.toRadians(armorStand.rotationYaw.toDouble())
207207
val lookVec = Vec3(

0 commit comments

Comments
 (0)