SHARE
TWEET

BlockWorks - "b" reading

capasha Aug 30th, 2017 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. //Example in the "b" Message
  3. // Console.WriteLine(getBlocks(m.GetInt(1))[0].X);
  4. static List<blocks> getBlocks(int value)
  5. {
  6.   List<blocks> block = new List<blocks>();
  7.   block.Clear();
  8.   block.Add(new blocks()
  9.   {
  10.     layer = value >> 30 & 3,
  11.     X = value >> 15 & 32767,
  12.     Y = value & 32767
  13.   });
  14.  return block;
  15. }
  16. class blocks
  17. {
  18.   public int layer { get; set; }
  19.   public int X { get; set; }
  20.   public int Y { get; set; }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top