summaryrefslogtreecommitdiffstats
path: root/source/cRedstoneRepeater.h
diff options
context:
space:
mode:
authoradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-03 06:53:54 +0100
committeradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-03 06:53:54 +0100
commit301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30 (patch)
treed6be56a8b03a8fecac93557db0671e32ce156174 /source/cRedstoneRepeater.h
parentUpdated the thunderbolt packet. Lightning and rain can be tested with a workbench and a chest. >:) (diff)
downloadcuberite-301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30.tar
cuberite-301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30.tar.gz
cuberite-301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30.tar.bz2
cuberite-301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30.tar.lz
cuberite-301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30.tar.xz
cuberite-301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30.tar.zst
cuberite-301569a6c92b0645b4ae6d73dc8dbcdddb5a9f30.zip
Diffstat (limited to '')
-rw-r--r--source/cRedstoneRepeater.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/cRedstoneRepeater.h b/source/cRedstoneRepeater.h
new file mode 100644
index 000000000..d772d6e6f
--- /dev/null
+++ b/source/cRedstoneRepeater.h
@@ -0,0 +1,20 @@
+#pragma once
+
+class cRedstoneRepeater //tolua_export
+{ //tolua_export
+public:
+ static char RotationToMetaData( float a_Rotation ) //tolua_export
+ { //tolua_export
+printf("a_Rotation: %f\n",a_Rotation);
+ a_Rotation += 90 + 45; // So its not aligned with axis
+ if( a_Rotation > 360.f ) a_Rotation -= 360.f;
+ if( a_Rotation >= 0.f && a_Rotation < 90.f )
+ return 0x2;
+ else if( a_Rotation >= 180 && a_Rotation < 270 )
+ return 0x3;
+ else if( a_Rotation >= 90 && a_Rotation < 180 )
+ return 0x0;
+ else
+ return 0x1;
+ } //tolua_export
+}; //tolua_export