OpenMinecraft.InfdevHandler.SetDataAt C# (CSharp) Method

SetDataAt() public method

public SetDataAt ( int px, int y, int pz, byte p ) : void
px int
y int
pz int
p byte
return void
        public override void SetDataAt(int px, int y, int pz, byte p)
        {
            int X = px / ChunkX;
            int Z = pz / ChunkZ;

            int x = px - ((px >> 4) * ChunkX); //(px >> 4) & 0xf;
            int z = pz - ((pz >> 4) * ChunkZ); //(py >> 4) & 0xf;

            Chunk c = GetChunk(X, Z);
            if (c == null) return;
            c.Data[x, y, z] = p;
        }