From c930ec329ee977e3a0a4c8558486814520c4255c Mon Sep 17 00:00:00 2001 From: ChristoCoder Date: Thu, 26 Oct 2017 16:17:26 -0400 Subject: [PATCH] Allow getting yaw of player through tablet component --- src/main/scala/li/cil/oc/server/component/Tablet.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/scala/li/cil/oc/server/component/Tablet.scala b/src/main/scala/li/cil/oc/server/component/Tablet.scala index bb9aae736..cbffec1df 100644 --- a/src/main/scala/li/cil/oc/server/component/Tablet.scala +++ b/src/main/scala/li/cil/oc/server/component/Tablet.scala @@ -37,4 +37,7 @@ class Tablet(val tablet: TabletWrapper) extends prefab.ManagedEnvironment with D @Callback(doc = """function():number -- Gets the pitch of the player holding the tablet.""") def getPitch(context: Context, args: Arguments): Array[AnyRef] = result(tablet.player.rotationPitch) + + @Callback(doc = """function():number -- Gets the yaw of the player holding the tablet.""") + def getYaw(context: Context, args: Arguments): Array[AnyRef] = result(tablet.player.rotationYaw) }