Ejemplo n.º 1
0
    // Triggers Blocktype.OnInteract()
    public void Interact()
    {
        loader.chunks[playerBody.GetChunkPos()].PrintDrawStage();

        if (!current.active)
        {
            return;
        }


        ChunkPos toUpdate  = new ChunkPos(current.chunkX, current.chunkZ);
        int      blockCode = loader.chunks[toUpdate].data.GetCell(current.blockX, current.blockY, current.blockZ);

        NetMessage message = new NetMessage(NetCode.INTERACT);

        message.Interact(toUpdate, current.blockX, current.blockY, current.blockZ, facing);
        this.loader.client.Send(message.GetMessage(), message.size);
    }