PosToInt() public method

public PosToInt ( BlockPos pos ) : int
pos BlockPos
return int
Ejemplo n.º 1
0
 public BlockPos(ushort x, ushort y, ushort z, Level l)
 {
     X = x;
     Y = y;
     Z = z;
     Level = l;
     Index = l.PosToInt(X, Y, Z);
     InBounds = !l.NotInBounds(X, Y, Z);
     BlockType = !InBounds ? (byte)255 : l.GetTile(Index);
     BlockMCType = (MCBlocks)BlockType;
 }
Ejemplo n.º 2
0
 public BlockPos(int x, int y, int z, Level l)
 {
     X = (ushort)x;
     Y = (ushort)y;
     Z = (ushort)z;
     Level = l;
     Index = l.PosToInt(X, Y, Z);
     InBounds = !l.NotInBounds(X, Y, Z);
     BlockType = !InBounds ? (byte)255 : l.GetTile(Index);
     BlockMCType = (MCBlocks)BlockType;
 }
Ejemplo n.º 3
0
 public BlockPos(int x, int y, int z, Level l)
 {
     Stopwatch sw = Stopwatch.StartNew();
     X = (ushort)x;
     Y = (ushort)y;
     Z = (ushort)z;
     Level = l;
     Index = l.PosToInt(X, Y, Z);
     InBounds = !l.NotInBounds(X, Y, Z);
     BlockType = !InBounds ? (byte)255 : l.GetTile(Index);
     BlockMCType = (MCBlocks)BlockType;
     Level.BlockPosCreationAverager.Add(sw.ElapsedTicks);
 }