This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = (player.x / 32) | |
y = (player.y / 32) | |
z = (player.z / 32) | |
pitch = round((double)(player.pitch * (360 / 256))) | |
yaw = round((double)((-(sbyte)(player.yaw)) * (360 / 256))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool OnGround(Player p) { | |
if (!Block.Walkthrough(p.level.GetTile((ushort)(p.pos[0] / 32), (ushort)((p.pos[1] / 32) - 2), (ushort)(p.pos[2] / 32)))) return true; | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
, | |
_/^\_ | |
< hax > | |
/.-.\ | |
* MERRY * `/&\` | |
,@.*;@, | |
/_o.I %_\ | |
(`'--:o(_@; | |
/`;--.,__ `') | |
;@`o % O,*`'`&\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int IntSqrt(int num) // Faster than Math.Sqrt, because that uses doubles. | |
{ | |
if (num < 0) throw new Exception("Cannot get square root of negative number."); | |
if (0 == num) return 0; // Avoid zero divide | |
int n = (num / 2) + 1; // Initial estimate, never low | |
int n1 = (n + (num / n)) / 2; | |
while (n1 < n) | |
{ | |
n = n1; | |
n1 = (n + (num / n)) / 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace MCDawn | |
{ | |
public class PluginName : Plugin | |
{ | |
public override string Name { get { return "pluginname"; } } // name, all in lowercase | |
public override string PluginVersion { get { return "1.0"; } } // version | |
public override string MCDawnVersion { get { return "1.0.1.2"; } } // compatible mcdawn version | |
public override void LoadPlugin() |
NewerOlder